IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42345


Ignore:
Timestamp:
Jan 31, 2023, 5:15:33 PM (3 years ago)
Author:
eugene
Message:

converting various snprintf statements to snprintf_nowarn

Location:
branches/eam_branches/ipp-20220316
Files:
58 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/Ohana/src/addstar/src/sky_tessalation.c

    r40528 r42345  
    5252  Ntotal = Nbase*pow(4.0, level);
    5353  Ndigit = (int)(log10(Ntotal)) + 1 ;
    54   snprintf (format, 16, "skytri.%%0%dd", Ndigit);
     54  snprintf_nowarn (format, 16, "skytri.%%0%dd", Ndigit);
    5555
    5656  // to what depth do we need to go to have only Nmax foreach subcell?
     
    9090    for (j = 0; j < Ntriangles; j++) {
    9191      sky_triangle_to_image (&image[j], &tri[j]);
    92       snprintf (image[j].name, DVO_IMAGE_NAME_LEN, format, Nout);
     92      snprintf_nowarn (image[j].name, DVO_IMAGE_NAME_LEN, format, Nout);
    9393      Nout++;
    9494    } 
     
    128128  Ntotal = Nbase*pow(4.0, level);
    129129  Ndigit = (int)(log10(Ntotal)) + 1 ;
    130   snprintf (format, 16, "skycell.%%0%dd", Ndigit);
     130  snprintf_nowarn (format, 16, "skycell.%%0%dd", Ndigit);
    131131
    132132  // to what depth do we need to go to have only Nmax foreach subcell?
     
    173173      if (!strcmp(rectangle[j].coords.ctype, "DROP")) continue;
    174174      memcpy (&subset[Nsubset], &rectangle[j], sizeof(SkyRectangle));
    175       snprintf (subset[Nsubset].name, DVO_IMAGE_NAME_LEN, format, Nname);
     175      snprintf_nowarn (subset[Nsubset].name, DVO_IMAGE_NAME_LEN, format, Nname);
    176176      Nname++;
    177177      Nsubset++;
     
    254254  for (double dec = -90.0; dec < +90.01; dec += CELLSIZE, Ndec ++) {
    255255
    256     snprintf (format, 32, "skycell.%%03d.%03d", Ndec);
     256    snprintf_nowarn (format, 32, "skycell.%%03d.%03d", Ndec);
    257257
    258258    int Nring;
     
    310310  Ntotal = 41254.2 / (dDEC*dDEC);
    311311  Ndigit = (int)(log10(Ntotal)) + 1 ;
    312   snprintf (format, 16, "skycell.%%0%dd", Ndigit);
     312  snprintf_nowarn (format, 16, "skycell.%%0%dd", Ndigit);
    313313
    314314  // generate the a collection of rectangles for each ring
     
    367367  Ntotal = 41254.2 / (dDEC*dDEC);
    368368  Ndigit = (int)(log10(Ntotal)) + 1 ;
    369   snprintf (format, 16, "skycell.%%0%dd", Ndigit);
     369  snprintf_nowarn (format, 16, "skycell.%%0%dd", Ndigit);
    370370
    371371  double d2r = M_PI / 180; // is RAD_DEG
     
    716716    // CFIS uses names with centers based on ra,dec
    717717    // format = skycell.%03d.%03d
    718     snprintf (ring[i].name, DVO_IMAGE_NAME_LEN, format, i);
     718    snprintf_nowarn (ring[i].name, DVO_IMAGE_NAME_LEN, format, i);
    719719  }
    720720
     
    826826    ring[i].photcode = 1; // this needs to be set more sensibly
    827827
    828     snprintf (ring[i].name, DVO_IMAGE_NAME_LEN, format, Nname);
     828    snprintf_nowarn (ring[i].name, DVO_IMAGE_NAME_LEN, format, Nname);
    829829    Nname++;
    830830
     
    897897      ring[N].photcode = 1; // this needs to be set more sensibly
    898898
    899       snprintf (ring[N].name, DVO_IMAGE_NAME_LEN, format, Nname);
     899      snprintf_nowarn (ring[N].name, DVO_IMAGE_NAME_LEN, format, Nname);
    900900      Nname++;
    901901    }
     
    927927  if (Nx * Ny > 1) {
    928928    Ndigit = (int)(log10(Nx*Ny)) + 1 ;
    929     snprintf (format, 80, "%s.%%0%dd", input[0].name, Ndigit);
     929    snprintf_nowarn (format, 80, "%s.%%0%dd", input[0].name, Ndigit);
    930930  } else {
    931     snprintf (format, 80, "%s", input[0].name);
     931    snprintf_nowarn (format, 80, "%s", input[0].name);
    932932  }
    933933
     
    944944
    945945      if (Nx + Ny > 1) {
    946         snprintf (output[N].name, DVO_IMAGE_NAME_LEN, format, N);
     946        snprintf_nowarn (output[N].name, DVO_IMAGE_NAME_LEN, format, N);
    947947      } else {
    948         snprintf (output[N].name, DVO_IMAGE_NAME_LEN, "%s", format);
     948        snprintf_nowarn (output[N].name, DVO_IMAGE_NAME_LEN, "%s", format);
    949949      }
    950950
  • branches/eam_branches/ipp-20220316/Ohana/src/delstar/src/delete_duplicate_images.c

    r39457 r42345  
    108108    // set up the basic catalog info
    109109    char hostfile[1024];
    110     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
     110    snprintf_nowarn (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
    111111
    112112    dvo_catalog_init (&catalog, TRUE);
     
    148148  // write out the subset table of image information
    149149  char imageFile[512];
    150   snprintf (imageFile, 512, "%s/ImageIDs.tmp.fits", CATDIR);
     150  snprintf_nowarn (imageFile, 512, "%s/ImageIDs.tmp.fits", CATDIR);
    151151
    152152  if (!ImageIDSave (imageFile, imageID)) {
     
    173173
    174174    char command[1024];
    175     snprintf (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -dup-images",
     175    snprintf_nowarn (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -dup-images",
    176176              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    177177              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    178178
    179179    char tmpline[1024];
    180     if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
    181     if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
     180    if (VERBOSE)       { snprintf_nowarn (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
     181    if (VERBOSE2)      { snprintf_nowarn (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    182182
    183183    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/delstar/src/delete_fix_LAP.c

    r40549 r42345  
    4040    // set up the basic catalog info
    4141    char hostfile[1024];
    42     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
     42    snprintf_nowarn (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
    4343
    4444    dvo_catalog_init (&catalog, TRUE);
     
    9292  // write out the subset table of image information
    9393  char imageFile[512];
    94   snprintf (imageFile, 512, "%s/delstar.fixLAP.%s.dat", CATDIR, uniquer);
     94  snprintf_nowarn (imageFile, 512, "%s/delstar.fixLAP.%s.dat", CATDIR, uniquer);
    9595
    9696  if (!ImageSubsetSave (imageFile, image, Nimage)) {
     
    132132
    133133    ALLOCATE (table->hosts[i].results, char, 1024);
    134     snprintf (table->hosts[i].results, 1024, "%s/delstar.fixLAP.imstats.%s.dat", table->hosts[i].pathname, uniquer);
     134    snprintf_nowarn (table->hosts[i].results, 1024, "%s/delstar.fixLAP.imstats.%s.dat", table->hosts[i].pathname, uniquer);
    135135
    136136    char command[1024];
    137     snprintf (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -images %s -imstats %s -region %f %f %f %f -fix-LAP",
     137    snprintf_nowarn (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -images %s -imstats %s -region %f %f %f %f -fix-LAP",
    138138              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, imageFile, table->hosts[i].results,
    139139              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    140140
    141141    char tmpline[1024];
    142     if (VERBOSE)    { snprintf (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
    143     if (VERBOSE2)   { snprintf (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
    144     if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
    145     if (UPDATE)     { snprintf (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
     142    if (VERBOSE)    { snprintf_nowarn (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
     143    if (VERBOSE2)   { snprintf_nowarn (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
     144    if (SINGLE_CPT) { snprintf_nowarn (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
     145    if (UPDATE)     { snprintf_nowarn (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
    146146
    147147    fprintf (stderr, "command: %s\n", command);
     
    210210  // write out the subset table of image information
    211211  char imageFile[512];
    212   snprintf (imageFile, 512, "%s/delstar.fixLAP.%s.dat", CATDIR, UNIQUER);
     212  snprintf_nowarn (imageFile, 512, "%s/delstar.fixLAP.%s.dat", CATDIR, UNIQUER);
    213213
    214214  // load the list of hosts
     
    228228
    229229    ALLOCATE (table->hosts[i].results, char, 1024);
    230     snprintf (table->hosts[i].results, 1024, "%s/delstar.fixLAP.imstats.%s.dat", table->hosts[i].pathname, UNIQUER);
     230    snprintf_nowarn (table->hosts[i].results, 1024, "%s/delstar.fixLAP.imstats.%s.dat", table->hosts[i].pathname, UNIQUER);
    231231
    232232    fprintf (stderr, "read %s\n", table->hosts[i].results);
  • branches/eam_branches/ipp-20220316/Ohana/src/delstar/src/delete_fix_LAP_edges.c

    r40549 r42345  
    4848    // set up the basic catalog info
    4949    char hostfile[1024];
    50     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
     50    snprintf_nowarn (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
    5151
    5252    dvo_catalog_init (&catalog, TRUE);
     
    122122
    123123    ALLOCATE (table->hosts[i].results, char, 1024);
    124     snprintf (table->hosts[i].results, 1024, "%s/delstar.fixLAPedges.measures.%s.dat", table->hosts[i].pathname, uniquer);
     124    snprintf_nowarn (table->hosts[i].results, 1024, "%s/delstar.fixLAPedges.measures.%s.dat", table->hosts[i].pathname, uniquer);
    125125
    126126    char command[1024];
    127     snprintf (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -measures %s -region %f %f %f %f -fix-LAP-edges",
     127    snprintf_nowarn (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -measures %s -region %f %f %f %f -fix-LAP-edges",
    128128              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname, table->hosts[i].results,
    129129              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    130130
    131131    char tmpline[1024];
    132     if (VERBOSE)    { snprintf (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
    133     if (VERBOSE2)   { snprintf (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
    134     if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
    135     // if (UPDATE)     { snprintf (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
     132    if (VERBOSE)    { snprintf_nowarn (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
     133    if (VERBOSE2)   { snprintf_nowarn (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
     134    if (SINGLE_CPT) { snprintf_nowarn (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
     135    // if (UPDATE)     { snprintf_nowarn (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
    136136
    137137    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/delstar/src/delete_fix_LAP_edges_delete.c

    r40549 r42345  
    8888    // set up the basic catalog info
    8989    char hostfile[1024];
    90     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
     90    snprintf_nowarn (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
    9191
    9292    dvo_catalog_init (&catalog, TRUE);
     
    180180
    181181    // ALLOCATE (table->hosts[i].results, char, 1024);
    182     // snprintf (table->hosts[i].results, 1024, "%s/delstar.fixLAPedges.measures.%s.dat", table->hosts[i].pathname, uniquer);
     182    // snprintf_nowarn (table->hosts[i].results, 1024, "%s/delstar.fixLAPedges.measures.%s.dat", table->hosts[i].pathname, uniquer);
    183183
    184184    char command[1024];
    185     snprintf (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -fix-LAP-edges-delete %s",
     185    snprintf_nowarn (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -fix-LAP-edges-delete %s",
    186186              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    187187              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax,
     
    189189
    190190    char tmpline[1024];
    191     if (VERBOSE)    { snprintf (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
    192     if (VERBOSE2)   { snprintf (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
    193     if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
    194     if (UPDATE)     { snprintf (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
     191    if (VERBOSE)    { snprintf_nowarn (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
     192    if (VERBOSE2)   { snprintf_nowarn (tmpline, 1024, "%s -vv",     command);             strcpy (command, tmpline); }
     193    if (SINGLE_CPT) { snprintf_nowarn (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
     194    if (UPDATE)     { snprintf_nowarn (tmpline, 1024, "%s -update", command);             strcpy (command, tmpline); }
    195195
    196196    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/delstar/src/delete_photcodes.c

    r38986 r42345  
    3838    // set up the basic catalog info
    3939    char hostfile[1024];
    40     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
     40    snprintf_nowarn (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist[0].regions[i]->name);
    4141
    4242    dvo_catalog_init (&catalog, TRUE);
     
    9494
    9595    char command[1024];
    96     snprintf (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -photcodes %s",
     96    snprintf_nowarn (command, 1024, "delstar_client -hostID %d -D CATDIR %s -hostdir %s -region %f %f %f %f -photcodes %s",
    9797              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    9898              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax,
     
    100100
    101101    char tmpline[1024];
    102     if (VERBOSE)       { snprintf (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
    103     if (VERBOSE2)      { snprintf (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
     102    if (VERBOSE)       { snprintf_nowarn (tmpline, 1024, "%s -v",              command);                    strcpy (command, tmpline); }
     103    if (VERBOSE2)      { snprintf_nowarn (tmpline, 1024, "%s -vv",             command);                    strcpy (command, tmpline); }
    104104
    105105    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvorepairFixStackIDs.c

    r39336 r42345  
    3333
    3434  while (fscanf (f, "%s", catdir) != EOF) {
    35     snprintf (imageFilenameOld, DVO_MAX_PATH, "%s/Images.dat", catdir);
    36     snprintf (imageFilenameNew, DVO_MAX_PATH, "%s/Images.dat.fixed", catdir);
     35    snprintf_nowarn (imageFilenameOld, DVO_MAX_PATH, "%s/Images.dat", catdir);
     36    snprintf_nowarn (imageFilenameNew, DVO_MAX_PATH, "%s/Images.dat.fixed", catdir);
    3737   
    3838    if ((image = LoadImages (&db, imageFilenameOld, &Nimage)) == NULL) {
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvorepairFixWarpIDs.c

    r39329 r42345  
    4646
    4747  while (fscanf (f, "%s", catdir) != EOF) {
    48     snprintf (imageFilenameOld, DVO_MAX_PATH, "%s/Images.dat", catdir);
    49     snprintf (imageFilenameNew, DVO_MAX_PATH, "%s/Images.dat.fixed", catdir);
     48    snprintf_nowarn (imageFilenameOld, DVO_MAX_PATH, "%s/Images.dat", catdir);
     49    snprintf_nowarn (imageFilenameNew, DVO_MAX_PATH, "%s/Images.dat.fixed", catdir);
    5050   
    5151    if ((image = LoadImages (&db, imageFilenameOld, &Nimage)) == NULL) {
  • branches/eam_branches/ipp-20220316/Ohana/src/dvomerge/src/dvosecfilt_catalogs.c

    r40378 r42345  
    3434
    3535    char hostfile[1024];
    36     snprintf (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
     36    snprintf_nowarn (hostfile, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
    3737
    3838    dvo_catalog_init (&catalog, TRUE);
     
    116116    // options / arguments that can affect relastro_client -update-objects:
    117117    char command[DVO_MAX_PATH];
    118     snprintf (command, DVO_MAX_PATH, "dvosecfilt_client %s %d -hostID %d -hostdir %s -region %f %f %f %f",
     118    snprintf_nowarn (command, DVO_MAX_PATH, "dvosecfilt_client %s %d -hostID %d -hostdir %s -region %f %f %f %f",
    119119              abscatdir, Nsecfilt, table->hosts[i].hostID, table->hosts[i].pathname,
    120120              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax
     
    122122
    123123    char tmpline[DVO_MAX_PATH];
    124     if (VERBOSE)    { snprintf (tmpline, DVO_MAX_PATH, "%s -v",      command);             strcpy (command, tmpline); }
    125     if (SINGLE_CPT) { snprintf (tmpline, DVO_MAX_PATH, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
     124    if (VERBOSE)    { snprintf_nowarn (tmpline, DVO_MAX_PATH, "%s -v",      command);             strcpy (command, tmpline); }
     125    if (SINGLE_CPT) { snprintf_nowarn (tmpline, DVO_MAX_PATH, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
    126126
    127127    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/dvopsps/src/insert_FGshape_dvopsps.c

    r39564 r42345  
    4747
    4848    char localFilename[1024];
    49     snprintf (localFilename, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
     49    snprintf_nowarn (localFilename, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
    5050
    5151    // set up the basic catalog info
     
    125125
    126126    char command[1024];
    127     snprintf (command, 1024, "dvopsps_client forced_galaxy_shape -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",
     127    snprintf_nowarn (command, 1024, "dvopsps_client forced_galaxy_shape -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",
    128128              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    129129              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    130130
    131131    char tmpline[1024];
    132     snprintf (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline);
    133     snprintf (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline);
    134     snprintf (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline);
    135     snprintf (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline);
     132    snprintf_nowarn (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline);
     133    snprintf_nowarn (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline);
     134    snprintf_nowarn (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline);
     135    snprintf_nowarn (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline);
    136136
    137     if (VERBOSE)    { snprintf (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
    138     if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
     137    if (VERBOSE)    { snprintf_nowarn (tmpline, 1024, "%s -v",      command);             strcpy (command, tmpline); }
     138    if (SINGLE_CPT) { snprintf_nowarn (tmpline, 1024, "%s -cpt %s", command, SINGLE_CPT); strcpy (command, tmpline); }
    139139
    140140    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/dvopsps/src/insert_FWobjects_dvopsps.c

    r40291 r42345  
    4747
    4848    char localFilename[1024];
    49     snprintf (localFilename, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
     49    snprintf_nowarn (localFilename, 1024, "%s/%s.cpt", HOSTDIR, skylist->regions[i]->name);
    5050
    5151    // set up the basic catalog info
     
    126126
    127127    char command[1024];
    128     snprintf (command, 1024, "dvopsps_client forced_warp_objects -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",
     128    snprintf_nowarn (command, 1024, "dvopsps_client forced_warp_objects -hostID %d -catdir %s -hostdir %s -region %f %f %f %f",
    129129              table->hosts[i].hostID, CATDIR, table->hosts[i].pathname,
    130130              UserPatch.Rmin, UserPatch.Rmax, UserPatch.Dmin, UserPatch.Dmax);
    131131
    132132    char tmpline[1024];
    133     snprintf (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline);
    134     snprintf (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline);
    135     snprintf (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline);
    136     snprintf (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline);
     133    snprintf_nowarn (tmpline, 1024, "%s -dbhost %s", command, DATABASE_HOST); strcpy (command, tmpline);
     134    snprintf_nowarn (tmpline, 1024, "%s -dbuser %s", command, DATABASE_USER); strcpy (command, tmpline);
     135    snprintf_nowarn (tmpline, 1024, "%s -dbpass %s", command, DATABASE_PASS); strcpy (command, tmpline);
     136    snprintf_nowarn (tmpline, 1024, "%s -dbname %s", command, DATABASE_NAME); strcpy (command, tmpline);
    137137
    138     if (VERBOSE)    { snprintf (tmpline, 1024, "%s -v",         command);             strcpy (command, tmpline); }
    139     if (TEST_MODE)  { snprintf (tmpline, 1024, "%s -test-mode", command);             strcpy (command, tmpline); }
    140     if (SINGLE_CPT) { snprintf (tmpline, 1024, "%s -cpt %s",    command, SINGLE_CPT); strcpy (command, tmpline); }
     138    if (VERBOSE)    { snprintf_nowarn (tmpline, 1024, "%s -v",         command);             strcpy (command, tmpline); }
     139    if (TEST_MODE)  { snprintf_nowarn (tmpline, 1024, "%s -test-mode", command);             strcpy (command, tmpline); }
     140    if (SINGLE_CPT) { snprintf_nowarn (tmpline, 1024, "%s -cpt %s",    command, SINGLE_CPT); strcpy (command, tmpline); }
    141141
    142142    fprintf (stderr, "command: %s\n", command);
  • branches/eam_branches/ipp-20220316/Ohana/src/elixir/src/ConfigInit.c

    r16139 r42345  
    9898  if (config == (char *) NULL) {
    9999    fprintf (stderr, "ERROR: can't find configuration file %s\n", file);
    100     if (file != (char *) NULL) free (file);
     100    // XXX note: the test below fools gcc into thinking file could be NUL
     101    // even though the test above forces an exit if it is NULL.
     102    // if (file != (char *) NULL) free (file);
    101103    Shutdown (1);
     104    exit (2);
    102105  }
    103106  if (VERBOSE) fprintf (stderr, "loaded config file: %s\n", file);
  • branches/eam_branches/ipp-20220316/Ohana/src/elixir/src/Photcodes.c

    r42343 r42345  
    7878
    7979  if (!strcasecmp (mode, "MEF")) {
    80     sprintf (fullname, "%s/%s.fits", path, name);
     80    snprintf_nowarn (fullname, 256, "%s/%s.fits", path, name);
    8181  } else {
    82     sprintf (fullname, "%s/%s/%s%s.fits", path, name, name, ccd);
     82    snprintf_nowarn (fullname, 256, "%s/%s/%s%s.fits", path, name, name, ccd);
    8383  }
    8484
  • branches/eam_branches/ipp-20220316/Ohana/src/fakeastro/src/AstromOffsetMapOps.c

    r37807 r42345  
    66
    77  char mapfile[DVO_MAX_PATH];
    8   snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
     8  snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
    99  AstromOffsetMapSave (table, mapfile);
    1010
  • branches/eam_branches/ipp-20220316/Ohana/src/fakeastro/src/ConfigInit.c

    r39926 r42345  
    44
    55  char  *config, *file;
    6   char CatdirPhotcodeFile[256];
     6  char CatdirPhotcodeFile[DVO_MAX_PATH];
    77
    88  /*** load configuration info ***/
     
    9090
    9191  /* update master photcode table if not defined */
    92   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR_CHECK);
     92  snprintf_nowarn (CatdirPhotcodeFile, DVO_MAX_PATH, "%s/Photcodes.dat", CATDIR_CHECK);
    9393  if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    9494    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
  • branches/eam_branches/ipp-20220316/Ohana/src/fakeastro/src/save_fakestars.c

    r40549 r42345  
    1818    // save to a unique filename
    1919    char filename[1024]; // CATDIR/tmpdir/starpar.PID.index.fits
    20     snprintf (filename, 1024, "%s/tmpdir/starpar.%s.%05d.fits", CATDIR, uniquer, region->index);
     20    snprintf_nowarn (filename, 1024, "%s/tmpdir/starpar.%s.%05d.fits", CATDIR, uniquer, region->index);
    2121
    2222    // write the data to the given FITS file
  • branches/eam_branches/ipp-20220316/Ohana/src/gastro/src/getusno.c

    r27611 r42345  
    99  1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10};
    1010
     11# define MY_MAX_PATH 256
     12
    1113USNOdata *getusno (USNOstats *usnostats, CatStats *catstats, int *Nusno) {
    1214
     
    1517  float hours[100];
    1618  int start[100], number[100], *buffer, *buf;
    17   char filename[128], c;
     19  char filename[MY_MAX_PATH], c;
    1820  FILE *f;
    1921  double DEC1;
     
    5254   
    5355    /* load accelerator file */
    54     sprintf (filename, "%s/zone%04d.acc", CDROM, spd);
     56    snprintf_nowarn (filename, MY_MAX_PATH, "%s/zone%04d.acc", CDROM, spd);
    5557    fprintf (stderr, "reading from %s\n", filename);
    5658    f = fopen (filename, "r");
     
    8284   
    8385    /* open data file */
    84     sprintf (filename, "%s/zone%04d.cat", CDROM, spd);
     86    snprintf_nowarn (filename, MY_MAX_PATH, "%s/zone%04d.cat", CDROM, spd);
    8587    fprintf (stderr, "reading from %s\n", filename);
    8688    f = fopen (filename, "r");
  • branches/eam_branches/ipp-20220316/Ohana/src/gastro2/src/getusno.c

    r27435 r42345  
    99  1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10};
    1010
     11# define MY_MAX_PATH 256
     12
    1113int getusno (CatStats *catstats, RefCatalog *Ref) {
    1214
     
    1517  float hours[100];
    1618  int start[100], number[100], *buffer, *buf;
    17   char filename[128];
     19  char filename[MY_MAX_PATH];
    1820  FILE *f;
    1921  double DEC1;
     
    5456   
    5557    /* load accelerator file */
    56     sprintf (filename, "%s/zone%04d.acc", USNO_A_DIR, spd);
     58    snprintf_nowarn (filename, MY_MAX_PATH, "%s/zone%04d.acc", USNO_A_DIR, spd);
    5759    fprintf (stderr, "reading from %s\n", filename);
    5860    f = fopen (filename, "r");
     
    7779   
    7880    /* open data file */
    79     sprintf (filename, "%s/zone%04d.cat", USNO_A_DIR, spd);
     81    snprintf_nowarn (filename, MY_MAX_PATH, "%s/zone%04d.cat", USNO_A_DIR, spd);
    8082    fprintf (stderr, "reading from %s\n", filename);
    8183    f = fopen (filename, "r");
  • branches/eam_branches/ipp-20220316/Ohana/src/gastro2/src/getusnob.c

    r34088 r42345  
    22# define NBYTE   4
    33# define NELEM  20
     4
     5# define MY_MAX_PATH 256
    46
    57int getusnob (CatStats *catstats, RefCatalog *Ref, double epoch) {
     
    911  float hours[100];
    1012  int start[100], number[100], *buffer, *buf;
    11   char filename[128];
     13  char filename[MY_MAX_PATH];
    1214  FILE *f;
    1315  double DEC1;
     
    4244   
    4345    /* load accelerator file */
    44     sprintf (filename, "%s/%03d/b%04d.acc", USNO_B_DIR, (int)(spd/10), spd);
     46    snprintf_nowarn (filename, MY_MAX_PATH, "%s/%03d/b%04d.acc", USNO_B_DIR, (int)(spd/10), spd);
    4547    if (VERBOSE) fprintf (stderr, "reading from %s\n", filename);
    4648    f = fopen (filename, "r");
     
    6567   
    6668    /* open data file */
    67     sprintf (filename, "%s/%03d/b%04d.cat", USNO_B_DIR, (int)(spd/10), spd);
     69    snprintf_nowarn (filename, MY_MAX_PATH, "%s/%03d/b%04d.cat", USNO_B_DIR, (int)(spd/10), spd);
    6870    if (VERBOSE) fprintf (stderr, "reading from %s\n", filename);
    6971    f = fopen (filename, "r");
  • branches/eam_branches/ipp-20220316/Ohana/src/getstar/src/ConfigInit.c

    r34749 r42345  
    11# include "getstar.h"
     2
     3# define MY_MAX_PATH 256
    24
    35int ConfigInit (int *argc, char **argv) {
    46
    57  char *config, *file;
    6   char CatdirPhotcodeFile[256];
     8  char CatdirPhotcodeFile[MY_MAX_PATH];
    79
    810  /*** load configuration info ***/
     
    3133
    3234  /* XXX this does not yet write out the master photcode table */
    33   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
     35  snprintf_nowarn (CatdirPhotcodeFile, MY_MAX_PATH, "%s/Photcodes.dat", CATDIR);
    3436  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
    3537    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
  • branches/eam_branches/ipp-20220316/Ohana/src/getstar/src/ConfigInit_coords.c

    r39998 r42345  
    2525    SKY_TABLE[0] = 0;
    2626  }
    27   sprintf (ImageCat, "%s/Images.dat", CATDIR);
     27  snprintf_nowarn (ImageCat, 256, "%s/Images.dat", CATDIR);
    2828
    2929  /* used by parse_time to find time-related keywords */
  • branches/eam_branches/ipp-20220316/Ohana/src/getstar/src/ConfigInit_extract.c

    r27435 r42345  
    2525    SKY_TABLE[0] = 0;
    2626  }
    27   sprintf (ImageCat, "%s/Images.dat", CATDIR);
     27  snprintf_nowarn (ImageCat, 256, "%s/Images.dat", CATDIR);
    2828
    2929  if (*CATMODE == 0) strcpy (CATMODE, "RAW");
  • branches/eam_branches/ipp-20220316/Ohana/src/getstar/src/ConfigInit_overlaps.c

    r41891 r42345  
    2525    SKY_TABLE[0] = 0;
    2626  }
    27   sprintf (ImageCat, "%s/Images.dat", CATDIR);
     27  snprintf_nowarn (ImageCat, 256, "%s/Images.dat", CATDIR);
    2828
    2929  /* used by parse_time to find time-related keywords */
  • branches/eam_branches/ipp-20220316/Ohana/src/imregister/base/ConfigInit.c

    r25757 r42345  
    66
    77  int i, NDB;
    8   char *config, *file, ElixirBase[80], catdir[256];
    9   char CatdirPhotcodeFile[256];
    10   char MasterPhotcodeFile[256];
     8  char *config, *file, ElixirBase[80], catdir[MY_MAX_PATH];
     9  char CatdirPhotcodeFile[MY_MAX_PATH];
     10  char MasterPhotcodeFile[MY_MAX_PATH];
    1111
    1212  /*** load configuration info ***/
     
    2828  WarnConfig (config, "CATDIR",                      "%s", 0, catdir);
    2929  WarnConfig (config, "PHOTCODE_FILE",               "%s", 0, MasterPhotcodeFile);
    30   sprintf (ImPhotDB, "%s/Images.dat", catdir);
     30  snprintf_nowarn (ImPhotDB, MY_MAX_PATH, "%s/Images.dat", catdir);
    3131
    3232  /* small text databases: filters, camera defs */
     
    7575                                                   
    7676  WarnConfig (config, "imstats",                     "%s", 0, ElixirBase);
    77   sprintf (ImstatFifo, "%s.photcode", ElixirBase);   
     77  snprintf_nowarn (ImstatFifo, MY_MAX_PATH, "%s.photcode", ElixirBase);   
    7878  WarnConfig (config, "ptolemy",                     "%s", 0, ElixirBase);
    79   sprintf (PtolemyFifo, "%s.photcode", ElixirBase);
     79  snprintf_nowarn (PtolemyFifo, MY_MAX_PATH, "%s.photcode", ElixirBase);
    8080
    8181  if (!ScanConfig (config, "CONNECT", "%s",  0, CONNECT)) {
    82     sprintf (CONNECT, "/usr/bin/rsh");
     82    snprintf_nowarn (CONNECT, 64, "/usr/bin/rsh");
    8383  }
    8484
     
    8787  NDetrendAltDB = 0;
    8888  ALLOCATE (DetrendAltDB, char *, NDB);
    89   ALLOCATE (DetrendAltDB[NDetrendAltDB], char, 256);
     89  ALLOCATE (DetrendAltDB[NDetrendAltDB], char, MY_MAX_PATH);
    9090  for (i = 1; ScanConfig (config, "DETREND_ALT_DB", "%s", i, DetrendAltDB[NDetrendAltDB]); i++) {
    9191    NDetrendAltDB ++;
     
    9494      REALLOCATE (DetrendAltDB, char *, NDB);
    9595    }
    96     ALLOCATE (DetrendAltDB[NDetrendAltDB], char, 256);
     96    ALLOCATE (DetrendAltDB[NDetrendAltDB], char, MY_MAX_PATH);
    9797  }
    9898  free (DetrendAltDB[NDetrendAltDB]);
     
    104104
    105105  /* XXX this does not yet write out the master photcode table */
    106   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", catdir);
     106  snprintf_nowarn (CatdirPhotcodeFile, MY_MAX_PATH, "%s/Photcodes.dat", catdir);
    107107  if (!LoadPhotcodes (CatdirPhotcodeFile, MasterPhotcodeFile, TRUE)) {
    108108    fprintf (stderr, "error loading photcode table %s or master file %s\n", CatdirPhotcodeFile, MasterPhotcodeFile);
  • branches/eam_branches/ipp-20220316/Ohana/src/imregister/detrend/entry.c

    r6674 r42345  
    3131  int status;
    3232  int found, Ntry, filestate;
    33   char path[256], fullpath[256], filename[256], rootname[256], fullname[256], line[512];
     33  char path[MY_MAX_PATH], fullpath[MY_MAX_PATH], filename[MY_MAX_PATH];
     34  char rootname[MY_MAX_PATH], fullname[MY_MAX_PATH], line[512];
    3435  char *dBPath;
    3536  char *filter_basename;
     
    4142
    4243  if (newdata[0].type == T_FLAT) {
    43     sprintf (path, "%s/%s", get_type_name(newdata[0].type), filter_basename);
     44    snprintf_nowarn (path, MY_MAX_PATH, "%s/%s", get_type_name(newdata[0].type), filter_basename);
    4445  } else {
    45     sprintf (path, "%s", get_type_name(newdata[0].type));
     46    snprintf_nowarn (path, MY_MAX_PATH, "%s", get_type_name(newdata[0].type));
    4647  }   
    47   sprintf (fullpath, "%s/%s", dBPath, path);
     48  snprintf_nowarn (fullpath, MY_MAX_PATH, "%s/%s", dBPath, path);
    4849
    4950  status = stat (fullpath, &statbuf);
     
    6566  case T_BIAS:
    6667  case T_MASK:
    67     sprintf (rootname, "%s.%s.%d.%02d", ID, get_type_name(newdata[0].type), (int)newdata[0].exptime, newdata[0].ccd);
     68    snprintf_nowarn (rootname, MY_MAX_PATH, "%s.%s.%d.%02d", ID, get_type_name(newdata[0].type), (int)newdata[0].exptime, newdata[0].ccd);
    6869    break;
    6970  default:
    70     sprintf (rootname, "%s.%s.%s.%02d", ID, get_type_name(newdata[0].type), filter_basename, newdata[0].ccd);
     71    snprintf_nowarn (rootname, MY_MAX_PATH, "%s.%s.%s.%02d", ID, get_type_name(newdata[0].type), filter_basename, newdata[0].ccd);
    7172  }
    7273
     
    7475  found = FALSE;
    7576  for (Ntry = 0; !found && (Ntry < 100); Ntry++) {
    76     sprintf (filename, "%s/%s.%02d.fits", path, rootname, Ntry);
    77     sprintf (fullname, "%s/%s", dBPath, filename);
     77    snprintf_nowarn (filename, MY_MAX_PATH, "%s/%s.%02d.fits", path, rootname, Ntry);
     78    snprintf_nowarn (fullname, MY_MAX_PATH, "%s/%s", dBPath, filename);
    7879    f = fsetlockfile (fullname, 2.0, LCK_XCLD, &filestate);
    7980    /* if there is an error, it may just mean file is locked. */
  • branches/eam_branches/ipp-20220316/Ohana/src/imregister/imreg/args.imregister.c

    r2823 r42345  
    7373
    7474    /* create db.log and db.bfr */
    75     sprintf (TempDB, "%s.bfr", ImageDB);
    76     sprintf (LogFile, "%s.log", ImageDB);
     75    snprintf_nowarn (TempDB, MY_MAX_PATH, "%s.bfr", ImageDB);
     76    snprintf_nowarn (LogFile, MY_MAX_PATH, "%s.log", ImageDB);
    7777   
    7878    /* check for daemon mode */
  • branches/eam_branches/ipp-20220316/Ohana/src/imregister/include/imregister.h

    r27435 r42345  
    1111*/
    1212
    13 char ImstatFifo[256];
    14 char PtolemyFifo[256];
     13# define MY_MAX_PATH 256
    1514
    16 char ImageDB[256];
    17 char DetrendDB[256];
    18 char PhotDB[256];
    19 char TransDB[256];
    20 char ImPhotDB[256];
    21 char TempDB[256];
    22 char LogFile[256];
     15char ImstatFifo[MY_MAX_PATH];
     16char PtolemyFifo[MY_MAX_PATH];
     17
     18char ImageDB[MY_MAX_PATH];
     19char DetrendDB[MY_MAX_PATH];
     20char PhotDB[MY_MAX_PATH];
     21char TransDB[MY_MAX_PATH];
     22char ImPhotDB[MY_MAX_PATH];
     23char TempDB[MY_MAX_PATH];
     24char LogFile[MY_MAX_PATH];
    2325char CONNECT[64];
    2426
     
    2628char **DetrendAltDB;
    2729
    28 char PhotCodeFile[256];
    29 char TempLogFile[256];
    30 char FilterList[256];
    31 char CameraConfig[256];
    32 char RecipeFile[256];
     30char PhotCodeFile[MY_MAX_PATH];
     31char TempLogFile[MY_MAX_PATH];
     32char FilterList[MY_MAX_PATH];
     33char CameraConfig[MY_MAX_PATH];
     34char RecipeFile[MY_MAX_PATH];
    3335
    3436char DateKeyword[64];
  • branches/eam_branches/ipp-20220316/Ohana/src/imregister/photreg/getImageData.c

    r12332 r42345  
    6060  }
    6161
    62   sprintf (photcode, "%s.%s.%02d", detector, filter, ccd);
     62  snprintf_nowarn (photcode, 64, "%s.%s.%02d", detector, filter, ccd);
    6363  if (!(criteria.photcode = GetPhotcodeCodebyName (photcode))) {
    6464    fprintf (stderr, "ERR: photcode not found table\n");
  • branches/eam_branches/ipp-20220316/Ohana/src/imregister/src/photcode-table.c

    r12332 r42345  
    6060
    6161  char *config, *file;
    62   char CATDIR[256];
     62  char CATDIR[MY_MAX_PATH];
    6363
    6464  /*** load configuration info ***/
     
    7676 
    7777  // set the CATDIR version based on CATDIR
    78   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
     78  snprintf_nowarn (CatdirPhotcodeFile, MY_MAX_PATH, "%s/Photcodes.dat", CATDIR);
    7979
    8080  free (config);
  • branches/eam_branches/ipp-20220316/Ohana/src/libfits/header/F_create_H.c

    r42143 r42345  
    2424                                       
    2525  for (i = 0; i < header[0].Naxes; i++) {
    26     snprintf (axis, 10, "NAXIS%d", i + 1);
     26    snprintf_nowarn (axis, 10, "NAXIS%d", i + 1);
    2727    gfits_modify (header,  axis, OFF_T_FMT, 1,  header[0].Naxis[i]);
    2828  }
  • branches/eam_branches/ipp-20220316/Ohana/src/libfits/matrix/F_compress_M.c

    r41739 r42345  
    8686  char keyword[11];
    8787  for (i = 0; i < header[0].Naxes; i++) {
    88     snprintf (keyword, 10, "ZNAXIS%d", i + 1);
     88    snprintf_nowarn (keyword, 10, "ZNAXIS%d", i + 1);
    8989    if (!gfits_modify (theader, keyword, OFF_T_FMT, 1,  header[0].Naxis[i])) ESCAPE;
    9090  }
    9191
    9292  for (i = 0; i < header->Naxes; i++) {
    93     snprintf (keyword, 10, "ZTILE%d", i + 1);
     93    snprintf_nowarn (keyword, 10, "ZTILE%d", i + 1);
    9494    if (!gfits_modify (theader, keyword, "%lu", 1, ztile[i])) ESCAPE;
    9595  }
     
    131131  // note the difference between the keywords (1 indexed) and the variables (0 indexed)
    132132  for (i = 0; i < Noptions; i++) {
    133     snprintf (key, 10, "ZNAME%d", i + 1);
     133    snprintf_nowarn (key, 10, "ZNAME%d", i + 1);
    134134    if (!gfits_modify (header, key, "%s", 1, optname[i])) break;
    135135
    136     snprintf (key, 10, "ZVAL%d", i + 1);
     136    snprintf_nowarn (key, 10, "ZVAL%d", i + 1);
    137137    if (!gfits_modify (header, key, "%s", 1, optvalue[i])) break;
    138138  }
  • branches/eam_branches/ipp-20220316/Ohana/src/libfits/matrix/F_uncompress_M.c

    r41474 r42345  
    9090  int axis;
    9191  for (axis = 0; axis < header->Naxes; axis++) {
    92     snprintf (zaxis, 10, "ZNAXIS%d", axis + 1);
    93     snprintf (naxis, 10, "NAXIS%d", axis + 1);
     92    snprintf_nowarn (zaxis, 10, "ZNAXIS%d", axis + 1);
     93    snprintf_nowarn (naxis, 10, "NAXIS%d", axis + 1);
    9494    MOD_KEYWORD_REQUIRED (zaxis,  naxis,  OFF_T_FMT,  &header->Naxis[axis],  header->Naxis[axis]);
    9595  }   
     
    108108    // if ZTILE1 exists, all ZTILEn must exist:
    109109    for (axis = 1; axis < header->Naxes; axis++) {
    110       snprintf (key, 10, "ZTILE%d", axis + 1);
     110      snprintf_nowarn (key, 10, "ZTILE%d", axis + 1);
    111111      if (!gfits_scan (header, key, "%lu", 1, &ztile[axis])) ESCAPE;
    112112      gfits_delete (header, key, 1);
  • branches/eam_branches/ipp-20220316/Ohana/src/mosastro/src/getstone.c

    r3323 r42345  
    2828            &regions[Nregion].RA[0], &regions[Nregion].RA[1],
    2929            &regions[Nregion].DEC[0], &regions[Nregion].DEC[1]);
    30     sprintf (line, "%s/%s", StoneRegions, filename);
     30    snprintf_nowarn (line, 1024, "%s/%s", StoneRegions, filename);
    3131    regname[Nregion] = strcreate (line);
    3232    Nregion ++;
  • branches/eam_branches/ipp-20220316/Ohana/src/mosastro/src/getusno.c

    r27435 r42345  
    99  1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10};
    1010
     11# define MY_MAX_PATH 256
     12
    1113StarData *getusno (CatStats *catstats, int *Nstars) {
    1214
     
    1517  float hours[100];
    1618  int start[100], number[100], *buffer, *buf;
    17   char filename[128];
     19  char filename[MY_MAX_PATH];
    1820  FILE *f;
    1921  int iRA0, iRA1, iDEC0, iDEC1;
     
    5961   
    6062    /* load accelerator file */
    61     sprintf (filename, "%s/zone%04d.acc", USNO_A_DIR, spd);
     63    snprintf_nowarn (filename, MY_MAX_PATH, "%s/zone%04d.acc", USNO_A_DIR, spd);
    6264    if (VERBOSE) fprintf (stderr, "reading from %s\n", filename);
    6365    f = fopen (filename, "r");
     
    8284   
    8385    /* open data file */
    84     sprintf (filename, "%s/zone%04d.cat", USNO_A_DIR, spd);
     86    snprintf_nowarn (filename, MY_MAX_PATH, "%s/zone%04d.cat", USNO_A_DIR, spd);
    8587    if (VERBOSE) fprintf (stderr, "reading from %s\n", filename);
    8688    f = fopen (filename, "r");
  • branches/eam_branches/ipp-20220316/Ohana/src/mosastro/src/getusnob.c

    r34088 r42345  
    22# define NBYTE   4
    33# define NELEM  20
     4
     5# define MY_MAX_PATH 256
    46
    57StarData *getusnob (CatStats *catstats, int *Nstars) {
     
    911  float hours[100];
    1012  int start[100], number[100], *buffer, *buf;
    11   char filename[128];
     13  char filename[MY_MAX_PATH];
    1214  FILE *f;
    1315  double DEC1;
     
    4244   
    4345    /* load accelerator file */
    44     sprintf (filename, "%s/%03d/b%04d.acc", USNO_B_DIR, (int)(spd/10), spd);
     46    snprintf_nowarn (filename, MY_MAX_PATH, "%s/%03d/b%04d.acc", USNO_B_DIR, (int)(spd/10), spd);
    4547    fprintf (stderr, "reading from %s\n", filename);
    4648    f = fopen (filename, "r");
     
    6567   
    6668    /* open data file */
    67     sprintf (filename, "%s/%03d/b%04d.cat", USNO_B_DIR, (int)(spd/10), spd);
     69    snprintf_nowarn (filename, MY_MAX_PATH, "%s/%03d/b%04d.cat", USNO_B_DIR, (int)(spd/10), spd);
    6870    fprintf (stderr, "reading from %s\n", filename);
    6971    f = fopen (filename, "r");
  • branches/eam_branches/ipp-20220316/Ohana/src/nightd/include/nightd.h

    r21153 r42345  
    33# include <errno.h>
    44
     5# define MY_MAX_PATH 256
     6
    57FILE *LogFile;
    68char *Program;
    79
    8 char logfile[256];
     10char logfile[MY_MAX_PATH];
    911char **MainCommand;
    1012char **InitCommand;
    1113char **DoneCommand;
    1214
    13 char TestCommand[256];
     15char TestCommand[MY_MAX_PATH];
    1416
    15 char DateStr[256];
    16 char TimeStr[256];
     17char DateStr[MY_MAX_PATH];
     18char TimeStr[MY_MAX_PATH];
    1719
    18 char PIDFile[256];
     20char PIDFile[MY_MAX_PATH];
    1921
    2022float NightStart;
  • branches/eam_branches/ipp-20220316/Ohana/src/nightd/src/GetStatus.c

    r27611 r42345  
    2323int ResetConfig () {
    2424
    25   char user[256], machine[256], line[256];
     25  char user[MY_MAX_PATH], machine[MY_MAX_PATH], line[MY_MAX_PATH];
    2626  pid_t pid;
    2727
     
    3232  }
    3333
    34   sprintf (line, "rsh %s kill -USR1 %d", machine, pid);
     34  snprintf_nowarn (line, MY_MAX_PATH, "rsh %s kill -USR1 %d", machine, pid);
    3535  if (system (line) == -1) {
    3636    fprintf (stderr, "failed to send signal\n");
     
    4242int SendShutdown () {
    4343
    44   char user[256], machine[256], line[256];
     44  char user[MY_MAX_PATH], machine[MY_MAX_PATH], line[MY_MAX_PATH];
    4545  pid_t pid;
    4646
     
    5151  }
    5252
    53   sprintf (line, "rsh %s kill -TERM %d", machine, pid);
     53  snprintf_nowarn (line, MY_MAX_PATH, "rsh %s kill -TERM %d", machine, pid);
    5454  if (system (line) == -1) {
    5555    fprintf (stderr, "failed to send signal\n");
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.basic/list.c

    r42081 r42345  
    111111      set_str_variable (line, argv[i+3]);
    112112    }
    113     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     113    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    114114    set_int_variable (line, i);
    115115
     
    133133    int isFound;
    134134
    135     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     135    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    136136    int nList = get_int_variable (line, &isFound);
    137137    if (!isFound) {
     
    145145
    146146    for (i = start; i < nList; i++) {
    147       snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
     147      snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
    148148      char *word = get_variable (line);
    149149      if (!word) break;
    150150      if (i > 0) {
    151         snprintf (output, MAX_LINE_LENGTH, "%s %s", tmpline, word);
     151        snprintf_nowarn (output, MAX_LINE_LENGTH, "%s %s", tmpline, word);
    152152      } else {
    153         snprintf (output, MAX_LINE_LENGTH, "%s", word);
     153        snprintf_nowarn (output, MAX_LINE_LENGTH, "%s", word);
    154154      }
    155155      strcpy (tmpline, output);
     
    179179   
    180180    // old list must exist, or give an error
    181     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[3]);
     181    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[3]);
    182182    N = get_int_variable (line, &found);
    183183    if (!found) {
     
    188188     
    189189
    190     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     190    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    191191    set_int_variable (line, N);
    192192    for (i = 0; i < N; i++) {
    193       snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[3], i);
     193      snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[3], i);
    194194      value = get_variable (line);
    195       // snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
     195      // snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
    196196      set_list_varname (line, argv[1], i, EXCEL_STYLE);
    197197      set_str_variable (line, value);
     
    207207    }
    208208   
    209     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     209    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    210210    N = get_int_variable (line, &found);
    211211    for (i = 0; i < argc - 3; i++) {
    212       // snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], N + i);
     212      // snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[1], N + i);
    213213      set_list_varname (line, argv[1], N + i, EXCEL_STYLE);
    214214      set_str_variable (line, argv[i+3]);
    215215    }
    216     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     216    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    217217    set_int_variable (line, N + i);
    218218
     
    231231    char line2[MAX_LINE_LENGTH];
    232232
    233     snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]); // line = LIST:n
     233    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]); // line = LIST:n
    234234    N = get_int_variable (line, &found);
    235235
    236236    // loop over all list elements:
    237237    for (i = 0; i < N; i++) {
    238       // snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
     238      // snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
    239239      set_list_varname (line, argv[1], i, EXCEL_STYLE); // line = LIST:i
    240240      value = get_variable (line);
     
    245245        free (value);
    246246        for (j = i + 1; j < N; j++) {
    247           // snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], j);
     247          // snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[1], j);
    248248          set_list_varname (line2, argv[1], j, EXCEL_STYLE); // line2 = LIST:j
    249249          next_value = get_variable (line2);
     
    252252        }
    253253        DeleteNamedScalar (line); // line = LIST:(N-1)
    254         snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]); // line = LIST:n (new value of n)
     254        snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]); // line = LIST:n (new value of n)
    255255        set_int_variable (line, N - 1);
    256256        return (TRUE);
     
    309309      depth --;
    310310      if (depth < 0) { /* we hit the last "END", loop is done */
    311         snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     311        snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    312312        set_int_variable (line, i);
    313313        free (input);
     
    317317
    318318    if (*input) {
    319       // snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
     319      // snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i);
    320320      set_list_varname (line, argv[1], i, EXCEL_STYLE);
    321321      set_str_variable (line, input);
     
    381381  free (val);
    382382   
    383   snprintf (line, MAX_LINE_LENGTH, "%s:n", listname);
     383  snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", listname);
    384384  set_int_variable (line, i);
    385385  return (TRUE);
     
    399399  // otherwise save all glob matches
    400400  if (globList.gl_pathc == 0) {
    401     snprintf (line, MAX_LINE_LENGTH, "%s:n", listname);
     401    snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", listname);
    402402    set_int_variable (line, 0);
    403403    return TRUE;
     
    409409    set_str_variable (line, globList.gl_pathv[i]);
    410410  }
    411   snprintf (line, MAX_LINE_LENGTH, "%s:n", listname);
     411  snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", listname);
    412412  set_int_variable (line, Nfile);
    413413  return (TRUE);
     
    430430    Nline ++;
    431431  }
    432   snprintf (varname, MAX_LINE_LENGTH, "%s:n", listname);
     432  snprintf_nowarn (varname, MAX_LINE_LENGTH, "%s:n", listname);
    433433  set_int_variable (varname, Nline);
    434434  return TRUE;
     
    463463    FREE (new);
    464464  }
    465   snprintf (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
     465  snprintf_nowarn (line, MAX_LINE_LENGTH, "%s:n", argv[1]);
    466466  set_int_variable (line, nWords);
    467467
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/cmd.data/cursor.c

    r39457 r42345  
    4242    KiiCursorRead (kapa, &X, &Y, &Z, &R, &D, key);
    4343
    44     sprintf (string, "X%s", key);
    45     set_variable (string, X);
    46     sprintf (string, "Y%s", key);
    47     set_variable (string, Y);
    48     sprintf (string, "Z%s", key);
    49     set_variable (string, Z);
    50     sprintf (string, "R%s", key);
    51     set_variable (string, R);
    52     sprintf (string, "D%s", key);
    53     set_variable (string, D);
     44    snprintf_nowarn (string, 20, "X%s", key);    set_variable (string, X);
     45    snprintf_nowarn (string, 20, "Y%s", key);    set_variable (string, Y);
     46    snprintf_nowarn (string, 20, "Z%s", key);    set_variable (string, Z);
     47    snprintf_nowarn (string, 20, "R%s", key);    set_variable (string, R);
     48    snprintf_nowarn (string, 20, "D%s", key);    set_variable (string, D);
    5449
    5550    set_str_variable ("KEY", key);
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/dvo/coordmosaic.c

    r39233 r42345  
    311311     
    312312      memset (segment, 0, 16); memcpy  (segment, &SEGMENT[i*Nsegment], 4);
    313       snprintf (name, 16, "%s_L_CX%dY%d", segment, XORDER[i], YORDER[i]);
     313      snprintf_nowarn (name, 16, "%s_L_CX%dY%d", segment, XORDER[i], YORDER[i]);
    314314      double xvalue = get_double_variable (name, &found);
    315315      xmask = !found;
    316316     
    317317      memset (segment, 0, 16); memcpy  (segment, &SEGMENT[i*Nsegment], 4);
    318       snprintf (name, 16, "%s_M_CX%dY%d", segment, XORDER[i], YORDER[i]);
     318      snprintf_nowarn (name, 16, "%s_M_CX%dY%d", segment, XORDER[i], YORDER[i]);
    319319      double yvalue = get_double_variable (name, &found);
    320320      ymask = !found;
     
    437437
    438438        int found, xmask, ymask;
    439         snprintf (name, 16, "L_X%dY%d", ix, iy);
     439        snprintf_nowarn (name, 16, "L_X%dY%d", ix, iy);
    440440        double xvalue = get_double_variable (name, &found);
    441441        xmask = !found;
    442442
    443         snprintf (name, 16, "M_X%dY%d", ix, iy);
     443        snprintf_nowarn (name, 16, "M_X%dY%d", ix, iy);
    444444        double yvalue = get_double_variable (name, &found);
    445445        ymask = !found;
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/dvo/elixir.c

    r27611 r42345  
    44int ReadMsg (char *fifo, char **message);
    55
     6# define MY_MAX_PATH 256
     7
    68int elixir (int argc, char **argv) {
    79 
    8   char message[256], cmd[256], ElixirBase[256];
    9   char fifo[256], fifodir[256], msgfile[256];
     10  char message[MY_MAX_PATH], cmd[MY_MAX_PATH], ElixirBase[MY_MAX_PATH];
     11  char fifo[MY_MAX_PATH], fifodir[MY_MAX_PATH], msgfile[MY_MAX_PATH];
    1012  char *answer;
    1113  int N;
     
    3840    return (FALSE);
    3941  }
    40   sprintf (fifo, "%s.msg", ElixirBase);
     42  snprintf_nowarn (fifo, MY_MAX_PATH, "%s.msg", ElixirBase);
    4143  if (!VarConfig ("FIFOS", "%s", fifodir)) {
    4244    gprint (GP_ERR, "FIFOS not in config, using local /tmp\n");
    4345    strcpy (fifodir, "/tmp");
    4446  }
    45   sprintf (fifo, "%s.msg", ElixirBase);
     47  snprintf_nowarn (fifo, MY_MAX_PATH, "%s.msg", ElixirBase);
    4648
    47   sprintf (msgfile, "%s/EMsg.XXXXXX", fifodir);
     49  snprintf_nowarn (msgfile, MY_MAX_PATH, "%s/EMsg.XXXXXX", fifodir);
    4850  if (mkstemp (msgfile) == -1) {
    4951    gprint (GP_ERR, "can't create fifo\n");
    5052    return (FALSE);
    5153  }
    52   sprintf (message, "%s %s", cmd, msgfile);
     54  snprintf_nowarn (message, MY_MAX_PATH, "%s %s", cmd, msgfile);
    5355  unlink (msgfile);
    5456
  • branches/eam_branches/ipp-20220316/Ohana/src/opihi/pantasks/controller_status.c

    r37807 r42345  
    2626  }
    2727
    28   snprintf (command, 1024, "status");
     28  snprintf_nowarn (command, 1024, "status");
    2929  for (i = 1; i < argc; i++) {
    30     snprintf (tmpline, 1024, "%s %s", command, argv[i]);
     30    snprintf_nowarn (tmpline, 1024, "%s %s", command, argv[i]);
    3131    strcpy (command, tmpline);
    3232  }
  • branches/eam_branches/ipp-20220316/Ohana/src/photdbc/src/ConfigInit.c

    r38441 r42345  
    1313
    1414  char *config, *file;
    15   char CatdirPhotcodeFile[256];
     15  char CatdirPhotcodeFile[DVO_MAX_PATH];
    1616
    1717  /*** load configuration info ***/
     
    5959  free (tmpcatdir);
    6060
    61   sprintf (ImageCat, "%s/Images.dat", CATDIR);
     61  snprintf_nowarn (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR);
    6262
    6363  WarnConfig (config, "ZERO_PT",                "%lf", 0, &ZERO_POINT);
     
    7272
    7373  /* XXX this does not yet write out the master photcode table */
    74   sprintf (CatdirPhotcodeFile, "%s/Photcodes.dat", CATDIR);
     74  snprintf_nowarn (CatdirPhotcodeFile, DVO_MAX_PATH, "%s/Photcodes.dat", CATDIR);
    7575  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
    7676    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
  • branches/eam_branches/ipp-20220316/Ohana/src/photdbc/src/copy_images.c

    r38986 r42345  
    5858
    5959  char mapfile[DVO_MAX_PATH];
    60   snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
     60  snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
    6161  AstromOffsetTable *table_src = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
    6262
     
    7777      AstromOffsetTableAddMapFromImage (table_tgt, &subset[i]);
    7878    }
    79     snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", outdir);
     79    snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", outdir);
    8080    AstromOffsetMapSave (table_tgt, mapfile);
    8181    free (table_tgt->imageIDtoTableSeq);
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/ConfigInit.c

    r39926 r42345  
    6161  ScanConfig(config, "WHERE_B",                "%s",  0, WHERE_B);
    6262
    63   snprintf (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR);
     63  snprintf_nowarn (ImageCat, DVO_MAX_PATH, "%s/Images.dat", CATDIR);
    6464
    6565  if (!ScanConfig (config, "SKY_DEPTH",         "%d",  0, &SKY_DEPTH)) SKY_DEPTH = 2;
     
    7777
    7878  /* update master photcode table if not defined */
    79   snprintf (CatdirPhotcodeFile, DVO_MAX_PATH, "%s/Photcodes.dat", CATDIR);
     79  snprintf_nowarn (CatdirPhotcodeFile, DVO_MAX_PATH, "%s/Photcodes.dat", CATDIR);
    8080  if (!LoadPhotcodes (CatdirPhotcodeFile, NULL, FALSE)) {
    8181    fprintf (stderr, "error loading photcode table %s\n", CatdirPhotcodeFile);
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/FrameCorrection.c

    r38986 r42345  
    8080  static int version = 0;
    8181  char filename[1024];
    82   snprintf (filename, 1024, "%s/frame.%03d.corr.fits", CATDIR, version);
     82  snprintf_nowarn (filename, 1024, "%s/frame.%03d.corr.fits", CATDIR, version);
    8383  FrameCorrectionSetSave (filename, set);
    8484  version ++;
     
    217217    static int version = 0;
    218218    char filename[1024];
    219     snprintf (filename, 1024, "%s/sh.%02d.dat", CATDIR, version);
     219    snprintf_nowarn (filename, 1024, "%s/sh.%02d.dat", CATDIR, version);
    220220    FILE *f = fopen (filename, "w");
    221221    myAssert (f, "oops");
     
    519519    static int version = 0;
    520520    char filename[1024];
    521     snprintf (filename, 1024, "%s/map.%02d.dat", CATDIR, version);
     521    snprintf_nowarn (filename, 1024, "%s/map.%02d.dat", CATDIR, version);
    522522    FILE *f = fopen (filename, "w");
    523523    version ++;
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/ICRF.c

    r39375 r42345  
    5656
    5757  char filename[1024];
    58   snprintf (filename, 1024, "%s/test.icrf.dat", CATDIR);
     58  snprintf_nowarn (filename, 1024, "%s/test.icrf.dat", CATDIR);
    5959  FILE *f = fopen (filename, "w");
    6060
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/assign_images.c

    r39926 r42345  
    2525
    2626  char mapfile[DVO_MAX_PATH];
    27   snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
     27  snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
    2828  AstromOffsetTable *table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
    2929
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/bcatalog.c

    r39995 r42345  
    6464  if (VERBOSE2 && ExcludeBogus && (fbogus == NULL)) {
    6565    char name[1024];
    66     snprintf (name, 1024, "%s/bogus.%02d.dat", CATDIR, HOST_ID);
     66    snprintf_nowarn (name, 1024, "%s/bogus.%02d.dat", CATDIR, HOST_ID);
    6767    fbogus = fopen (name, "w");
    6868    if (!fbogus) {
     
    533533  if (dumpit) {
    534534    char name[64];
    535     snprintf (name, 64, "cat.%05d.dump.dat", oldcatalog[0].catID);
     535    snprintf_nowarn (name, 64, "cat.%05d.dump.dat", oldcatalog[0].catID);
    536536    FILE *fdump = fopen (name, "w");
    537537    for (i = 0; i < Nkeep; i++) {
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/launch_region_hosts.c

    r40415 r42345  
    6363    // subset images per host : CATDIR/Image.HOSTNAME.fits
    6464    char filename[1024];
    65     snprintf (filename, 1024, "%s/Image.%d.fits", CATDIR, host->hostID);
     65    snprintf_nowarn (filename, 1024, "%s/Image.%d.fits", CATDIR, host->hostID);
    6666    if (unlink (filename)) fprintf (stderr, "trouble clearing image %s\n", filename);
    6767
     
    7171    if (host->astromTable) {
    7272      char mapname[1024];
    73       snprintf (mapname, 1024, "%s/AstroMap.%d.fits", CATDIR, host->hostID);
     73      snprintf_nowarn (mapname, 1024, "%s/AstroMap.%d.fits", CATDIR, host->hostID);
    7474
    7575      // write the image subset for this host
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/load_images.c

    r39926 r42345  
    5656
    5757  char mapfile[DVO_MAX_PATH];
    58   snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
     58  snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
    5959  table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
    6060
     
    9696
    9797  char mapfile[DVO_MAX_PATH];
    98   snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
     98  snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.fits", CATDIR);
    9999  AstromOffsetMapSave (table, mapfile);
    100100
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/relastro_parallel_images.c

    r40415 r42345  
    4343
    4444  char mapfile[DVO_MAX_PATH];
    45   snprintf (mapfile, DVO_MAX_PATH, "%s/AstroMap.%d.fits", CATDIR, REGION_HOST_ID);
     45  snprintf_nowarn (mapfile, DVO_MAX_PATH, "%s/AstroMap.%d.fits", CATDIR, REGION_HOST_ID);
    4646  AstromOffsetTable *table = AstromOffsetMapLoad (mapfile, 100000, VERBOSE);
    4747
  • branches/eam_branches/ipp-20220316/Ohana/src/relastro/src/share_images_pos.c

    r39457 r42345  
    3838  if (table) {
    3939    char mapname[1024];
    40     snprintf (mapname, 1024, "%s/AstroMapUpdate.%d.fits", CATDIR, REGION_HOST_ID);
     40    snprintf_nowarn (mapname, 1024, "%s/AstroMapUpdate.%d.fits", CATDIR, REGION_HOST_ID);
    4141   
    4242    // write the image subset for this host
     
    113113
    114114    char mapname[1024];
    115     snprintf (mapname, 1024, "%s/AstroMapUpdate.%d.fits", CATDIR, regionHosts->hosts[i].hostID);
     115    snprintf_nowarn (mapname, 1024, "%s/AstroMapUpdate.%d.fits", CATDIR, regionHosts->hosts[i].hostID);
    116116   
    117117    AstromOffsetTable *table = AstromOffsetMapLoad (mapname, 100000, VERBOSE);
  • branches/eam_branches/ipp-20220316/Ohana/src/relphot/src/save_images.c

    r41556 r42345  
    1919
    2020  char filename[1024];
    21   snprintf (filename, 1024, "%s.bck", ImageCat); // ImageCat is global
     21  snprintf_nowarn (filename, 1024, "%s.bck", ImageCat); // ImageCat is global
    2222  if (!gfits_db_lock (&dbX, filename)) {
    2323    fprintf (stderr, "can't lock backup image image catalog\n");
     
    8585  dbX.format    = db->format;
    8686
    87   snprintf (filename, 1024, "%s.bck", ImageCat);
     87  snprintf_nowarn (filename, 1024, "%s.bck", ImageCat);
    8888  if (!gfits_db_lock (&dbX, filename)) {
    8989    fprintf (stderr, "can't lock backup image image catalog\n");
  • branches/eam_branches/ipp-20220316/Ohana/src/tools/src/fits_to_mysql.c

    r39093 r42345  
    252252
    253253    char field[256], tlabel[256], format[256];
    254     snprintf (field, 256, "TTYPE%d", i+1);
     254    snprintf_nowarn (field, 256, "TTYPE%d", i+1);
    255255    gfits_scan (header, field, "%s", 1, tlabel);
    256256
    257     snprintf (field, 256, "TFORM%d", i+1);
     257    snprintf_nowarn (field, 256, "TFORM%d", i+1);
    258258    gfits_scan (header, field, "%s", 1, format);
    259259
     
    270270    if (Ndup) {
    271271      char tmpname[256];
    272       snprintf (tmpname, 256, "%s_%d", tlabel, Ndup);
     272      snprintf_nowarn (tmpname, 256, "%s_%d", tlabel, Ndup);
    273273      column[Ncolumn].colname = strcreate (tmpname);
    274274    } else {
     
    357357    char colname[64];
    358358    for (j = 0; j < Nval; j++) {
    359       snprintf (colname, 64, "%s_%d", rootname, j + 1);
     359      snprintf_nowarn (colname, 64, "%s_%d", rootname, j + 1);
    360360      PrintIOBuffer (buffer, "%s %s", colname, typename);
    361361      if (j < Nval - 1) {
     
    455455      char colname[64];
    456456      for (j = 0; j < columns[i].Nval; j++) {
    457         snprintf (colname, 64, "%s_%d", columns[i].colname, j + 1);
     457        snprintf_nowarn (colname, 64, "%s_%d", columns[i].colname, j + 1);
    458458        PrintIOBuffer (insert, "%s", colname);
    459459        if (j < columns[i].Nval - 1) {
     
    649649
    650650  /* get column keywords */
    651   snprintf (field, 256, "TTYPE%d", Nfield);
     651  snprintf_nowarn (field, 256, "TTYPE%d", Nfield);
    652652  gfits_scan (header, field, "%s", 1, tlabel);
    653   snprintf (field, 256, "TSCAL%d", Nfield);
     653  snprintf_nowarn (field, 256, "TSCAL%d", Nfield);
    654654  gfits_scan (header, field, "%lf", 1, &Bscale);
    655   snprintf (field, 256, "TZERO%d", Nfield);
     655  snprintf_nowarn (field, 256, "TZERO%d", Nfield);
    656656  gfits_scan (header, field, "%lf", 1, &Bzero);
    657   snprintf (field, 256, "TFORM%d", Nfield);
     657  snprintf_nowarn (field, 256, "TFORM%d", Nfield);
    658658  gfits_scan (header, field, "%s", 1, format);
    659659
     
    669669  int Nstart = 0;
    670670  for (i = 1; i < Nfield; i++) {
    671     snprintf (field, 256, "TFORM%d", i);
     671    snprintf_nowarn (field, 256, "TFORM%d", i);
    672672    gfits_scan (header, field, "%s", 1, format);
    673673    int Nv, Nb;
  • branches/eam_branches/ipp-20220316/Ohana/src/uniphot/src/ConfigInit.c

    r33654 r42345  
    2222  ScanConfig (config, "CATFORMAT",              "%s",  0, CATFORMAT);
    2323
    24   sprintf (ImageCat, "%s/Images.dat", CATDIR);
     24  snprintf_nowarn (ImageCat, 256, "%s/Images.dat", CATDIR);
    2525
    2626  GetConfig (config, "GSCFILE",                 "%s",  0, GSCFILE);
  • branches/eam_branches/ipp-20220316/Ohana/src/uniphot/src/load_zpt_table.c

    r40549 r42345  
    323323          // photcode name
    324324          char photname[64];
    325           snprintf (photname, 64, "GPC1.%s.XY%d%d", filter, ix, iy);
     325          snprintf_nowarn (photname, 64, "GPC1.%s.XY%d%d", filter, ix, iy);
    326326          // note that the XY00, XY07, etc, chips will have photcode values of 0
    327327
  • branches/eam_branches/ipp-20220316/psconfig/tagsets/ipp-ubuntu.perl

    r42137 r42345  
    8282  01  Test::Warnings                Test-Warnings-0.026.tar.gz               0              NONE      NONE
    8383  01  Test::Without::Module         Test-Without-Module-0.20.tar.gz          0              NONE      NONE
    84   01  Text::Diff                    Text-Diff-1.45.tar.gz                    0              NONE      NONE
     84# trouble building this on clean 20.04 server.  Is it needed?
     85# 01  Text::Diff                    Text-Diff-1.45.tar.gz                    0              NONE      NONE
    8586  01  Text::Glob                    Text-Glob-0.11.tar.gz                    0              NONE      NONE
    8687  01  Text::Template                Text-Template-1.55.tar.gz                0              NONE      NONE
Note: See TracChangeset for help on using the changeset viewer.