diff -urN cfitsio/cfileio.c cfitsio.new/cfileio.c
old
|
new
|
|
6688 | 6688 | for (ii = 1; ii <= nkeys; ii++) /* copy keywords */ |
6689 | 6689 | { |
6690 | 6690 | ffgrec(tptr, ii, card, status); |
| 6691 | |
| 6692 | /* must reset the PCOUNT keyword to zero in the new output file */ |
| 6693 | if (strncmp(card, "PCOUNT ",8) == 0) { /* the PCOUNT keyword? */ |
| 6694 | if (strncmp(card+25, " 0", 5)) { /* non-zero value? */ |
| 6695 | strncpy(card, "PCOUNT = 0", 30); |
| 6696 | } |
| 6697 | } |
| 6698 | |
6691 | 6699 | ffprec(fptr, card, status); |
6692 | 6700 | } |
6693 | 6701 | |
diff -urN cfitsio/drvrnet.c cfitsio.new/drvrnet.c
old
|
new
|
|
996 | 996 | } |
997 | 997 | } else { |
998 | 998 | /* Try the .gz one */ |
999 | | /* |
1000 | 999 | strcpy(newfilename,filename); |
1001 | 1000 | strcat(newfilename,".gz"); |
1002 | 1001 | alarm(NETTIMEOUT); |
… |
… |
|
1007 | 1006 | strcat(newfilename,".Z"); |
1008 | 1007 | alarm(NETTIMEOUT); |
1009 | 1008 | if (ftp_open_network(newfilename,&ftpfile,&command,&sock)) { |
1010 | | */ |
| 1009 | |
1011 | 1010 | /* Now as given */ |
1012 | 1011 | alarm(0); |
1013 | 1012 | strcpy(newfilename,filename); |
… |
… |
|
1018 | 1017 | ffpmsg(newfilename); |
1019 | 1018 | goto error; |
1020 | 1019 | } |
1021 | | /* |
1022 | 1020 | } |
1023 | 1021 | } |
1024 | | */ |
1025 | 1022 | } |
1026 | 1023 | |
1027 | 1024 | closeftpfile++; |
… |
… |
|
1587 | 1584 | fclose(*command); |
1588 | 1585 | return (FILE_NOT_OPENED); |
1589 | 1586 | } |
1590 | | |
1591 | | printf("Return: %s",recbuf); |
1592 | 1587 | |
1593 | 1588 | /* Passive mode response looks like |
1594 | 1589 | 227 Entering Passive Mode (129,194,67,8,210,80) */ |
… |
… |
|
1711 | 1706 | int sock; |
1712 | 1707 | int stat; |
1713 | 1708 | int val = 1; |
1714 | | |
1715 | | printf("connecting to %s on port %d\n", hostname,port); |
1716 | | |
| 1709 | |
1717 | 1710 | CreateSocketAddress(&sockaddr,hostname,port); |
1718 | 1711 | /* Create socket */ |
1719 | 1712 | if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { |
… |
… |
|
1776 | 1769 | #ifdef DEBUG |
1777 | 1770 | printf ("send raw end, sent %d bytes\n",n); |
1778 | 1771 | #endif |
1779 | | |
1780 | | printf ("sent: %s", buf); |
1781 | | |
1782 | | |
1783 | 1772 | return n; |
1784 | 1773 | } |
1785 | 1774 | |
… |
… |
|
1803 | 1792 | else if (nrecv == 0) |
1804 | 1793 | break; /*/ EOF */ |
1805 | 1794 | } |
1806 | | printf ("NET_RecvRaw received %d bytes: %s",length, buf); |
1807 | 1795 | |
1808 | 1796 | return n; |
1809 | 1797 | } |
… |
… |
|
2121 | 2109 | #ifdef DEBUG |
2122 | 2110 | printf("ftp_status, return string was %s\n",recbuf); |
2123 | 2111 | #endif |
2124 | | printf("Return: %s",recbuf); |
2125 | 2112 | |
2126 | 2113 | recbuf[len] = '\0'; /* make it short */ |
2127 | 2114 | if (!strcmp(recbuf,statusstr)) { |
diff -urN cfitsio/region.c cfitsio.new/region.c
old
|
new
|
|
5 | 5 | #include <ctype.h> |
6 | 6 | #include "fitsio2.h" |
7 | 7 | #include "region.h" |
| 8 | static int Pt_in_Poly( double x, double y, int nPts, double *Pts ); |
8 | 9 | |
9 | 10 | /*---------------------------------------------------------------------------*/ |
10 | 11 | int fits_read_rgnfile( const char *filename, |
diff -urN cfitsio/region.h cfitsio.new/region.h
old
|
new
|
|
78 | 78 | void fits_setup_shape ( RgnShape *shape); |
79 | 79 | int fits_read_fits_region ( fitsfile *fptr, WCSdata * wcs, SAORegion **Rgn, int *status); |
80 | 80 | int fits_read_ascii_region ( const char *filename, WCSdata * wcs, SAORegion **Rgn, int *status); |
81 | | static int Pt_in_Poly( double x, double y, int nPts, double *Pts ); |
82 | 81 | |
83 | 82 | |