Changeset 39395
- Timestamp:
- Feb 26, 2016, 6:20:45 AM (10 years ago)
- Location:
- trunk/Ohana/src/libdvo/src
- Files:
-
- 5 edited
-
HostTable.c (modified) (2 diffs)
-
LoadPhotcodesText.c (modified) (3 diffs)
-
RegionHostTable.c (modified) (2 diffs)
-
dvo_catalog.c (modified) (1 diff)
-
dvo_catalog_split.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/src/HostTable.c
r39319 r39395 124 124 125 125 // XXXX use this for safety: int status = scan_line_maxlen (f, line, 1024); 126 int status = scan_line (f, line);126 int status = scan_line_maxlen (f, line, 1024); 127 127 if (status == EOF) break; 128 128 … … 702 702 int HostTableTestHost (SkyRegion *region, int hostID) { 703 703 704 myAssert (region, "oops"); 705 704 706 // if hostID is not set, then we are not in a remote client 705 707 if (!hostID) return TRUE; -
trunk/Ohana/src/libdvo/src/LoadPhotcodesText.c
r37035 r39395 14 14 return (value); 15 15 } 16 17 # define MAX_LINE_LENGTH 1024 18 # define MAX_WORD_LENGTH 64 16 19 17 20 /* load the text photcode table */ … … 26 29 int code; 27 30 char *c; 28 char line[ 256], **c1_names, **c2_names, **eq_names;29 char name[ 32], type[32], Zero[32], Airmass[32], Offset[32];30 char C1[ 32], C2[32], Slope[32], Color[32], Primary[32];31 char astromErrSys[ 32], astromErrScale[32], astromErrMagScale[32], photomErrSys[32];32 char astromPoorMask[ 32], astromBadMask[32], photomPoorMask[32], photomBadMask[32];31 char line[MAX_LINE_LENGTH], **c1_names, **c2_names, **eq_names; 32 char name[MAX_WORD_LENGTH], type[MAX_WORD_LENGTH], Zero[MAX_WORD_LENGTH], Airmass[MAX_WORD_LENGTH], Offset[MAX_WORD_LENGTH]; 33 char C1[MAX_WORD_LENGTH], C2[MAX_WORD_LENGTH], Slope[MAX_WORD_LENGTH], Color[MAX_WORD_LENGTH], Primary[MAX_WORD_LENGTH]; 34 char astromErrSys[MAX_WORD_LENGTH], astromErrScale[MAX_WORD_LENGTH], astromErrMagScale[MAX_WORD_LENGTH], photomErrSys[MAX_WORD_LENGTH]; 35 char astromPoorMask[MAX_WORD_LENGTH], astromBadMask[MAX_WORD_LENGTH], photomPoorMask[MAX_WORD_LENGTH], photomBadMask[MAX_WORD_LENGTH]; 33 36 34 37 table = GetPhotcodeTable (); … … 59 62 ALLOCATE (c2_names, char *, NPHOTCODE); 60 63 61 while (scan_line (f, line) != EOF) {64 while (scan_line_maxlen (f, line, MAX_LINE_LENGTH) != EOF) { 62 65 for (c = line; isspace (*c); c++); 63 66 if (*c == '#') continue; -
trunk/Ohana/src/libdvo/src/RegionHostTable.c
r38553 r39395 58 58 } 59 59 60 # define MAX_LINE_LENGTH 1024 60 61 RegionHostTable *RegionHostTableLoad (char *catdir, char *rootname) { 61 62 … … 95 96 for (Nline = 0; TRUE; Nline ++) { 96 97 int ID; 97 char tmphost[1024]; 98 char line[1024]; 99 100 // XXXX use this for safety: int status = scan_line_maxlen (f, line, 1024); 101 int status = scan_line (f, line); 98 char tmphost[MAX_LINE_LENGTH]; 99 char line[MAX_LINE_LENGTH]; 100 101 int status = scan_line_maxlen (f, line, MAX_LINE_LENGTH); 102 102 if (status == EOF) break; 103 103 -
trunk/Ohana/src/libdvo/src/dvo_catalog.c
r39380 r39395 999 999 catalog[0].measure = NULL; 1000 1000 } 1001 if (catalog[0].measureT) { 1002 free (catalog[0].measureT); 1003 } 1001 1004 if (catalog[0].missing) { 1002 1005 free (catalog[0].missing); -
trunk/Ohana/src/libdvo/src/dvo_catalog_split.c
r39359 r39395 445 445 if (!gfits_scan (&catalog[0].header, "NLENSOBJ", OFF_T_FMT, 1, &Nlensobj)) Nlensobj = 0; 446 446 if (!gfits_scan (&catalog[0].header, "NSTARPAR", OFF_T_FMT, 1, &Nstarpar)) Nstarpar = 0; 447 if (!gfits_scan (&catalog[0].header, "NGALPHOT", OFF_T_FMT, 1, &Ngalphot)) Ngalphot= 0;447 if (!gfits_scan (&catalog[0].header, "NGALPHOT", OFF_T_FMT, 1, &Ngalphot)) Ngalphot = 0; 448 448 449 449 /* the OBJID is a counter that uniquely defines an average entry and never changes. if
Note:
See TracChangeset
for help on using the changeset viewer.
