diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /noao/digiphot/apphot/polyphot/apycoords.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'noao/digiphot/apphot/polyphot/apycoords.x')
-rw-r--r-- | noao/digiphot/apphot/polyphot/apycoords.x | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/polyphot/apycoords.x b/noao/digiphot/apphot/polyphot/apycoords.x new file mode 100644 index 00000000..0298b0f8 --- /dev/null +++ b/noao/digiphot/apphot/polyphot/apycoords.x @@ -0,0 +1,43 @@ +include "../lib/polyphot.h" + +# AP_YCOORDS -- Procedure to fetch the next center coordinates for the polygon. + +int procedure ap_ycoords (cl, delim, xshift, yshift, stdin) + +int cl # coordinates file descriptor +int delim # delimiter character +real xshift # new x coordinate +real yshift # new y coordinate +int stdin # is cl STDIN? + +char marker +int stat +int fscan(), nscan() + +begin + if (stdin == YES) { + call printf ("Type object x and y coordinates (^D or^Z to end): ") + call flush (STDOUT) + } + + stat = fscan (cl) + while (stat != EOF) { + + call gargr (xshift) + call gargr (yshift) + + if (nscan() != 2) { + call reset_scan() + call gargc (marker) + if (int (marker) == delim) + return (NEXT_POLYGON) + #else + #return (NEXT_OBJECT) + } else + return (THIS_OBJECT) + + stat = fscan (cl) + } + + return (stat) +end |