Changeset 37004
- Timestamp:
- Jul 13, 2014, 10:59:29 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src
- Files:
-
- 16 edited
-
dbExtractAverages.c (modified) (1 diff)
-
dbExtractImages.c (modified) (1 diff)
-
dbExtractMeasures.c (modified) (1 diff)
-
dvo_catalog.c (modified) (2 diffs)
-
dvo_convert_PS1_DEV_1.c (modified) (3 diffs)
-
dvo_convert_PS1_DEV_2.c (modified) (5 diffs)
-
dvo_convert_PS1_REF.c (modified) (3 diffs)
-
dvo_convert_PS1_V1.c (modified) (5 diffs)
-
dvo_convert_PS1_V2.c (modified) (7 diffs)
-
dvo_convert_PS1_V3.c (modified) (7 diffs)
-
dvo_convert_PS1_V4.c (modified) (8 diffs)
-
dvo_convert_PS1_V5.c (modified) (9 diffs)
-
dvo_convert_elixir.c (modified) (3 diffs)
-
dvo_convert_loneos.c (modified) (3 diffs)
-
dvo_convert_panstarrs_DEV_0.c (modified) (3 diffs)
-
dvo_convert_panstarrs_DEV_1.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dbExtractAverages.c
r36908 r37004 162 162 break; 163 163 case AVE_REF_COLOR: 164 value.Flt = average[0].refColor ;164 value.Flt = average[0].refColorBlue; 165 165 break; 166 166 -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dbExtractImages.c
r36833 r37004 376 376 377 377 case IMAGE_REF_COLOR: 378 value.Flt = image[N].refColor ;378 value.Flt = image[N].refColorBlue; 379 379 break; 380 380 } -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dbExtractMeasures.c
r36912 r37004 476 476 477 477 case MEAS_REF_COLOR: 478 value.Flt = average[0].refColor ;478 value.Flt = average[0].refColorBlue; 479 479 break; 480 480 -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_catalog.c
r37002 r37004 137 137 average->extendOffset = -1; 138 138 139 average->refColor = NAN; 139 average->refColorBlue = NAN; 140 average->refColorRed = NAN; 140 141 141 142 average->flags = 0; … … 253 254 measure->XoffDCR = NAN; 254 255 measure->YoffDCR = NAN; 255 measure-> XoffGAL = NAN;256 measure-> YoffGAL = NAN;256 measure->RoffGAL = NAN; 257 measure->DoffGAL = NAN; 257 258 258 259 measure->Sky = NAN; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_1.c
r36975 r37004 208 208 } 209 209 210 # define RAW_IMAGE_NAME_LEN 64 211 210 212 Image *Image_PS1_DEV_1_ToInternal (Image_PS1_DEV_1 *in, off_t Nvalues, off_t Nalloc) { 211 213 … … 221 223 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 222 224 223 strncpy (out[i].name, in[i].name, 63); // out[128], in[64] 224 out[i].name[63] = 0; // force termination 225 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 226 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 227 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 225 228 226 229 out[i].tzero = in[i].tzero; … … 288 291 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 289 292 290 strncpy (out[i].name, in[i].name, 63); // out[128], in[64] 291 out[i].name[63] = 0; // force termination 293 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 294 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 295 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 292 296 293 297 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c
r36975 r37004 123 123 out[i].measureOffset = in[i].measureOffset; 124 124 out[i].missingOffset = in[i].missingOffset; 125 out[i].refColor = in[i].refColor;125 out[i].refColorBlue = in[i].refColor; 126 126 out[i].objID = in[i].objID; 127 127 out[i].catID = in[i].catID; … … 157 157 out[i].measureOffset = in[i].measureOffset; 158 158 out[i].missingOffset = in[i].missingOffset; 159 out[i].refColor = in[i].refColor ;159 out[i].refColor = in[i].refColorBlue; 160 160 out[i].objID = in[i].objID; 161 161 out[i].catID = in[i].catID; … … 203 203 } 204 204 205 # define RAW_IMAGE_NAME_LEN 64 206 205 207 Image *Image_PS1_DEV_2_ToInternal (Image_PS1_DEV_2 *in, off_t Nvalues, off_t Nalloc) { 206 208 … … 216 218 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 217 219 218 strncpy (out[i].name, in[i].name, 63); // out[121], in[64] 219 out[i].name[63] = 0; // force termination 220 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 221 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 222 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 220 223 221 224 out[i].tzero = in[i].tzero; … … 280 283 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 281 284 282 strncpy (out[i].name, in[i].name, 63); // in[121], out[64] 283 out[i].name[63] = 0; // force termination 285 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 286 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 287 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 284 288 285 289 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_REF.c
r36898 r37004 132 132 } 133 133 134 # define RAW_IMAGE_NAME_LEN 121 135 134 136 Image *Image_PS1_REF_ToInternal (Image_PS1_REF *in, off_t Nvalues, off_t Nalloc) { 135 137 … … 145 147 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 146 148 147 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 148 out[i].name[120] = 0; // force termination 149 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 150 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 151 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 149 152 150 153 out[i].tzero = in[i].tzero; … … 207 210 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 208 211 209 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 210 out[i].name[120] = 0; // force termination 212 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 213 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 214 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 211 215 212 216 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_V1.c
r36975 r37004 143 143 out[i].measureOffset = in[i].measureOffset; 144 144 out[i].missingOffset = in[i].missingOffset; 145 out[i].refColor = in[i].refColor;145 out[i].refColorBlue = in[i].refColor; 146 146 out[i].flags = in[i].flags; 147 147 out[i].objID = in[i].objID; … … 178 178 out[i].measureOffset = in[i].measureOffset; 179 179 out[i].missingOffset = in[i].missingOffset; 180 out[i].refColor = in[i].refColor;180 out[i].refColor = in[i].refColorBlue; 181 181 out[i].flags = in[i].flags; 182 182 out[i].objID = in[i].objID; … … 227 227 } 228 228 229 # define RAW_IMAGE_NAME_LEN 121 230 229 231 Image *Image_PS1_V1_ToInternal (Image_PS1_V1 *in, off_t Nvalues, off_t Nalloc) { 230 232 … … 240 242 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 241 243 242 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 243 out[i].name[120] = 0; // force termination 244 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 245 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 246 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 244 247 245 248 out[i].tzero = in[i].tzero; … … 303 306 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 304 307 305 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 306 out[i].name[120] = 0; // force termination 308 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 309 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 310 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 307 311 308 312 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_V2.c
r36975 r37004 148 148 out[i].measureOffset = in[i].measureOffset; 149 149 out[i].missingOffset = in[i].missingOffset; 150 out[i].refColor = in[i].refColor;150 out[i].refColorBlue = in[i].refColor; 151 151 out[i].flags = in[i].flags; 152 152 out[i].objID = in[i].objID; … … 187 187 out[i].measureOffset = in[i].measureOffset; 188 188 out[i].missingOffset = in[i].missingOffset; 189 out[i].refColor = in[i].refColor ;189 out[i].refColor = in[i].refColorBlue; 190 190 out[i].flags = in[i].flags; 191 191 out[i].objID = in[i].objID; … … 238 238 } 239 239 240 # define RAW_IMAGE_NAME_LEN 121 241 240 242 Image *Image_PS1_V2_ToInternal (Image_PS1_V2 *in, off_t Nvalues, off_t Nalloc) { 241 243 … … 251 253 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 252 254 253 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 254 out[i].name[120] = 0; // force termination 255 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 256 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 257 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 255 258 256 259 out[i].tzero = in[i].tzero; … … 272 275 out[i].DECo = in[i].DECo; 273 276 out[i].Radius = in[i].Radius; 274 out[i].refColor = in[i].refColor;277 out[i].refColorBlue = in[i].refColor; 275 278 276 279 out[i].detection_limit = in[i].detection_limit; … … 314 317 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 315 318 316 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 317 out[i].name[120] = 0; // force termination 319 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 320 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 321 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 318 322 319 323 out[i].tzero = in[i].tzero; … … 335 339 out[i].DECo = in[i].DECo; 336 340 out[i].Radius = in[i].Radius; 337 out[i].refColor = in[i].refColor ;341 out[i].refColor = in[i].refColorBlue; 338 342 339 343 out[i].detection_limit = in[i].detection_limit; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_V3.c
r36975 r37004 148 148 out[i].measureOffset = in[i].measureOffset; 149 149 out[i].missingOffset = in[i].missingOffset; 150 out[i].refColor = in[i].refColor;150 out[i].refColorBlue = in[i].refColor; 151 151 out[i].flags = in[i].flags; 152 152 out[i].photFlagsUpper = in[i].photFlagsUpper; … … 189 189 out[i].measureOffset = in[i].measureOffset; 190 190 out[i].missingOffset = in[i].missingOffset; 191 out[i].refColor = in[i].refColor;191 out[i].refColor = in[i].refColorBlue; 192 192 out[i].flags = in[i].flags; 193 193 out[i].photFlagsUpper = in[i].photFlagsUpper; … … 248 248 } 249 249 250 # define RAW_IMAGE_NAME_LEN 121 251 250 252 Image *Image_PS1_V3_ToInternal (Image_PS1_V3 *in, off_t Nvalues, off_t Nalloc) { 251 253 … … 261 263 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 262 264 263 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 264 out[i].name[120] = 0; // force termination 265 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 266 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 267 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 265 268 266 269 out[i].tzero = in[i].tzero; … … 282 285 out[i].DECo = in[i].DECo; 283 286 out[i].Radius = in[i].Radius; 284 out[i].refColor = in[i].refColor;287 out[i].refColorBlue = in[i].refColor; 285 288 286 289 out[i].detection_limit = in[i].detection_limit; … … 324 327 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 325 328 326 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 327 out[i].name[120] = 0; // force termination 329 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 330 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 331 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 328 332 329 333 out[i].tzero = in[i].tzero; … … 345 349 out[i].DECo = in[i].DECo; 346 350 out[i].Radius = in[i].Radius; 347 out[i].refColor = in[i].refColor ;351 out[i].refColor = in[i].refColorBlue; 348 352 349 353 out[i].detection_limit = in[i].detection_limit; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_V4.c
r36975 r37004 169 169 out[i].measureOffset = in[i].measureOffset; 170 170 out[i].missingOffset = in[i].missingOffset; 171 out[i].refColor = in[i].refColor;171 out[i].refColorBlue = in[i].refColor; 172 172 out[i].flags = in[i].flags; 173 173 out[i].photFlagsUpper = in[i].photFlagsUpper; … … 213 213 out[i].measureOffset = in[i].measureOffset; 214 214 out[i].missingOffset = in[i].missingOffset; 215 out[i].refColor = in[i].refColor ;215 out[i].refColor = in[i].refColorBlue; 216 216 out[i].flags = in[i].flags; 217 217 out[i].photFlagsUpper = in[i].photFlagsUpper; … … 286 286 } 287 287 288 # define RAW_IMAGE_NAME_LEN 121 289 288 290 Image *Image_PS1_V4_ToInternal (Image_PS1_V4 *in, off_t Nvalues, off_t Nalloc) { 289 291 … … 299 301 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 300 302 301 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 302 out[i].name[120] = 0; // force termination 303 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 304 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 305 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 303 306 304 307 out[i].tzero = in[i].tzero; … … 320 323 out[i].DECo = in[i].DECo; 321 324 out[i].Radius = in[i].Radius; 322 out[i].refColor = in[i].refColor;325 out[i].refColorBlue = in[i].refColor; 323 326 324 327 out[i].detection_limit = in[i].detection_limit; … … 362 365 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 363 366 364 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 365 out[i].name[120] = 0; // force termination 367 // RAW_IMAGE_NAME_LEN > DVO_IMAGE_NAME_LEN 368 strncpy (out[i].name, in[i].name, DVO_IMAGE_NAME_LEN - 1); 369 out[i].name[DVO_IMAGE_NAME_LEN - 1] = 0; // force termination 366 370 367 371 out[i].tzero = in[i].tzero; … … 383 387 out[i].DECo = in[i].DECo; 384 388 out[i].Radius = in[i].Radius; 385 out[i].refColor = in[i].refColor ;389 out[i].refColor = in[i].refColorBlue; 386 390 387 391 out[i].detection_limit = in[i].detection_limit; … … 686 690 out[i].measureOffset = in[i].measureOffset; 687 691 out[i].missingOffset = in[i].missingOffset; 688 out[i].refColor = in[i].refColor;692 out[i].refColorBlue = in[i].refColor; 689 693 out[i].flags = in[i].flags; 690 694 out[i].photFlagsUpper = in[i].photFlagsUpper; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c
r36975 r37004 40 40 out[i].XoffDCR = in[i].XoffDCR; 41 41 out[i].YoffDCR = in[i].YoffDCR; 42 out[i]. XoffGAL = in[i].XoffGAL;43 out[i]. YoffGAL = in[i].YoffGAL;42 out[i].RoffGAL = in[i].RoffGAL; 43 out[i].DoffGAL = in[i].DoffGAL; 44 44 out[i].Sky = in[i].Sky; 45 45 out[i].dSky = in[i].dSky; … … 112 112 out[i].XoffDCR = in[i].XoffDCR; 113 113 out[i].YoffDCR = in[i].YoffDCR; 114 out[i]. XoffGAL = in[i].XoffGAL;115 out[i]. YoffGAL = in[i].YoffGAL;114 out[i].RoffGAL = in[i].RoffGAL; 115 out[i].DoffGAL = in[i].DoffGAL; 116 116 out[i].Sky = in[i].Sky; 117 117 out[i].dSky = in[i].dSky; … … 198 198 out[i].lensobjOffset = in[i].lensobjOffset; 199 199 out[i].extendOffset = in[i].extendOffset; 200 201 out[i].refColor = in[i].refColor; 200 out[i].paramsOffset = in[i].paramsOffset; 201 202 out[i].refColorBlue = in[i].refColorBlue; 203 out[i].refColorRed = in[i].refColorRed; 204 202 205 out[i].flags = in[i].flags; 203 206 out[i].photFlagsUpper = in[i].photFlagsUpper; … … 258 261 out[i].lensobjOffset = in[i].lensobjOffset; 259 262 out[i].extendOffset = in[i].extendOffset; 260 261 out[i].refColor = in[i].refColor; 263 out[i].paramsOffset = in[i].paramsOffset; 264 265 out[i].refColorBlue = in[i].refColorBlue; 266 out[i].refColorRed = in[i].refColorRed; 267 262 268 out[i].flags = in[i].flags; 263 269 out[i].photFlagsUpper = in[i].photFlagsUpper; … … 620 626 } 621 627 628 # define RAW_IMAGE_NAME_LEN 117 629 622 630 Image *Image_PS1_V5_ToInternal (Image_PS1_V5 *in, off_t Nvalues, off_t Nalloc) { 623 631 … … 633 641 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 634 642 635 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 636 out[i].name[120] = 0; // force termination 643 // RAW_IMAGE_NAME_LEN == DVO_IMAGE_NAME_LEN 644 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 645 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 637 646 638 647 out[i].tzero = in[i].tzero; … … 654 663 out[i].DECo = in[i].DECo; 655 664 out[i].Radius = in[i].Radius; 656 out[i].refColor = in[i].refColor; 665 out[i].refColorBlue = in[i].refColorBlue; 666 out[i].refColorRed = in[i].refColorRed; 657 667 658 668 out[i].detection_limit = in[i].detection_limit; … … 696 706 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 697 707 698 strncpy (out[i].name, in[i].name, 120); // out[121], in[121] 699 out[i].name[120] = 0; // force termination 708 // RAW_IMAGE_NAME_LEN == DVO_IMAGE_NAME_LEN 709 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 710 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 700 711 701 712 out[i].tzero = in[i].tzero; … … 717 728 out[i].DECo = in[i].DECo; 718 729 out[i].Radius = in[i].Radius; 719 out[i].refColor = in[i].refColor; 730 out[i].refColorBlue = in[i].refColorBlue; 731 out[i].refColorRed = in[i].refColorRed; 720 732 721 733 out[i].detection_limit = in[i].detection_limit; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_elixir.c
r36975 r37004 196 196 } 197 197 198 # define RAW_IMAGE_NAME_LEN 32 199 198 200 /* convert elixir-format images to internal images */ 199 201 Image *Image_Elixir_ToInternal (Image_Elixir *in, off_t Nvalues, off_t Nalloc) { … … 210 212 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 211 213 212 strncpy (out[i].name, in[i].name, 31); // in[32], out[128] 213 out[i].name[31] = 0; // force termination 214 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 215 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 216 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 214 217 215 218 out[i].tzero = in[i].tzero; … … 279 282 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 280 283 281 strncpy (out[i].name, in[i].name, 31); // out[32], in[128] 282 out[i].name[31] = 0; // force termination 284 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 285 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 286 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 283 287 284 288 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_loneos.c
r36975 r37004 174 174 } 175 175 176 # define RAW_IMAGE_NAME_LEN 32 177 176 178 /* convert loneos-format images to internal images */ 177 179 Image *Image_Loneos_ToInternal (Image_Loneos *in, off_t Nvalues, off_t Nalloc) { … … 188 190 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 189 191 190 strncpy (out[i].name, in[i].name, 31); // in[32], out[128] 191 out[i].name[31] = 0; // force termination 192 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 193 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 194 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 192 195 193 196 out[i].tzero = in[i].tzero; … … 258 261 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 259 262 260 strncpy (out[i].name, in[i].name, 31); // out[32], in[128] 261 out[i].name[31] = 0; // force termination 263 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 264 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 265 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 262 266 263 267 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_0.c
r36975 r37004 213 213 } 214 214 215 # define RAW_IMAGE_NAME_LEN 32 216 215 217 /* convert panstarrs-format images to internal images */ 216 218 Image *Image_Panstarrs_DEV_0_ToInternal (Image_Panstarrs_DEV_0 *in, off_t Nvalues, off_t Nalloc) { … … 227 229 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 228 230 229 strncpy (out[i].name, in[i].name, 31); // out[128], in[32] 230 out[i].name[31] = 0; // force termination 231 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 232 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 233 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 231 234 232 235 out[i].tzero = in[i].tzero; … … 296 299 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 297 300 298 strncpy (out[i].name, in[i].name, 31); // out[32], in[128] 299 out[i].name[31] = 0; // force termination 301 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 302 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 303 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 300 304 301 305 out[i].tzero = in[i].tzero; -
branches/eam_branches/ipp-20140610/Ohana/src/libdvo/src/dvo_convert_panstarrs_DEV_1.c
r36975 r37004 213 213 } 214 214 215 # define RAW_IMAGE_NAME_LEN 64 216 215 217 /* convert panstarrs-format images to internal images */ 216 218 Image *Image_Panstarrs_DEV_1_ToInternal (Image_Panstarrs_DEV_1 *in, off_t Nvalues, off_t Nalloc) { … … 227 229 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 228 230 229 strncpy (out[i].name, in[i].name, 63); // in[64], out[128] 230 out[i].name[63] = 0; // force termination 231 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 232 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 233 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 231 234 232 235 out[i].tzero = in[i].tzero; … … 296 299 memcpy (&out[i].coords, &in[i].coords, sizeof(Coords)); 297 300 298 strncpy (out[i].name, in[i].name, 63); // in[128], out[64] 299 out[i].name[63] = 0; // force termination 301 // RAW_IMAGE_NAME_LEN < DVO_IMAGE_NAME_LEN 302 strncpy (out[i].name, in[i].name, RAW_IMAGE_NAME_LEN - 1); 303 out[i].name[RAW_IMAGE_NAME_LEN - 1] = 0; // force termination 300 304 301 305 out[i].tzero = in[i].tzero;
Note:
See TracChangeset
for help on using the changeset viewer.
