gethead.c | gethead.c | |||
---|---|---|---|---|
/* File gethead.c | /* File gethead.c | |||
* August 12, 2011 | * December 14, 2011 | |||
* By Doug Mink Harvard-Smithsonian Center for Astrophysics) | * By Jessica Mink Harvard-Smithsonian Center for Astrophysics) | |||
* Send bug reports to dmink@cfa.harvard.edu | * Send bug reports to jmink@cfa.harvard.edu | |||
Copyright (C) 1996-2011 | Copyright (C) 1996-2011 | |||
Smithsonian Astrophysical Observatory, Cambridge, MA USA | Smithsonian Astrophysical Observatory, Cambridge, MA USA | |||
This program is free software; you can redistribute it and/or | This program is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU General Public License | modify it under the terms of the GNU General Public License | |||
as published by the Free Software Foundation; either version 2 | as published by the Free Software Foundation; either version 2 | |||
of the License, or (at your option) any later version. | of the License, or (at your option) any later version. | |||
This program is distributed in the hope that it will be useful, | This program is distributed in the hope that it will be useful, | |||
skipping to change at line 50 | skipping to change at line 50 | |||
#define FILE_FITS 1 | #define FILE_FITS 1 | |||
#define FILE_IRAF 2 | #define FILE_IRAF 2 | |||
#define FILE_ASCII 3 | #define FILE_ASCII 3 | |||
static void usage(); | static void usage(); | |||
extern char *GetFITShead(); | extern char *GetFITShead(); | |||
static char nextnsp(); | static char nextnsp(); | |||
static int PrintValues(); | static int PrintValues(); | |||
static char *RevMsg = "GETHEAD WCSTools 3.8.4, 1 September 2011, Doug Mink (dmink@cfa.harvard.edu)"; | static char *RevMsg = "GETHEAD WCSTools 3.8.5, 12 April 2012, Jessica Mink (jmink@cfa.harvard.edu)"; | |||
static int verbose = 0; /* verbose/debugging flag */ | static int verbose = 0; /* verbose/debugging flag */ | |||
static int nfile = 0; | static int nfile = 0; | |||
static int ndec = -9; | static int ndec = -9; | |||
static int maxlfn = 0; | static int maxlfn = 0; | |||
static int listall = 0; | static int listall = 0; | |||
static int listpath = 0; | static int listpath = 0; | |||
static int j2000 = 0; /* If 1, convert ra, dec keywords to J2000 * / | static int j2000 = 0; /* If 1, convert ra, dec keywords to J2000 * / | |||
static int tabout = 0; | static int tabout = 0; | |||
static int tabpad = 0; | static int tabpad = 0; | |||
skipping to change at line 820 | skipping to change at line 820 | |||
if (!tabout && listall) | if (!tabout && listall) | |||
printfill = 1; | printfill = 1; | |||
/* Read ASCII file into buffer */ | /* Read ASCII file into buffer */ | |||
if (filetype == FILE_ASCII) { | if (filetype == FILE_ASCII) { | |||
if ((header = getfilebuff (filepath)) == NULL) { | if ((header = getfilebuff (filepath)) == NULL) { | |||
if (mstring != NULL) | if (mstring != NULL) | |||
free (mstring); | free (mstring); | |||
if (namext != NULL) | if (namext != NULL) | |||
free (namext); | free (namext); | |||
if (verbose) fprintf (stderr, "GETHEAD: file %s has no content\n | ||||
", | ||||
filepath); | ||||
if (filepath != NULL) | ||||
free (filepath); | ||||
return (-1); | ||||
} | ||||
else if (strlen (header) == 0) { | ||||
if (mstring != NULL) | ||||
free (mstring); | ||||
if (namext != NULL) | ||||
free (namext); | ||||
if (verbose) fprintf (stderr, "GETHEAD: file %s has null at star | ||||
t\n", | ||||
filepath); | ||||
if (filepath != NULL) | if (filepath != NULL) | |||
free (filepath); | free (filepath); | |||
return (-1); | return (-1); | |||
} | } | |||
} | } | |||
/* Retrieve FITS header from FITS or IRAF .imh file */ | /* Retrieve FITS header from FITS or IRAF .imh file */ | |||
else if ((header = GetFITShead (filepath, verbose)) == NULL) { | else if ((header = GetFITShead (filepath, verbose)) == NULL) { | |||
if (mstring != NULL) | if (mstring != NULL) | |||
free (mstring); | free (mstring); | |||
skipping to change at line 1431 | skipping to change at line 1444 | |||
* Apr 03 2009 Increase default size of multi-line value buffer to 20000 | * Apr 03 2009 Increase default size of multi-line value buffer to 20000 | |||
* | * | |||
* Apr 06 2010 Add fillblank argument to agets() | * Apr 06 2010 Add fillblank argument to agets() | |||
* | * | |||
* May 19 2011 Free all allocated memory to eliminate memory leaks | * May 19 2011 Free all allocated memory to eliminate memory leaks | |||
* May 20 2011 Add -j option to convert output RA and Dec to J2000 | * May 20 2011 Add -j option to convert output RA and Dec to J2000 | |||
* May 20 2011 Make RA seconds output at least 3 decimal places; Dec, 2 | * May 20 2011 Make RA seconds output at least 3 decimal places; Dec, 2 | |||
* Jun 21 2011 If FILENAME keyword is requested, first column is FILE_NAME | * Jun 21 2011 If FILENAME keyword is requested, first column is FILE_NAME | |||
* Aug 12 2011 Fix range of extensions from -x | * Aug 12 2011 Fix range of extensions from -x | |||
* Aug 12 2011 Add prefixed range of extensions from -x | * Aug 12 2011 Add prefixed range of extensions from -x | |||
* Dec 14 2011 If length of header/file content string is zero, exit with e rror | ||||
*/ | */ | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 20 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |