IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38380


Ignore:
Timestamp:
Jun 5, 2015, 12:08:33 PM (11 years ago)
Author:
eugene
Message:

convert to libohana strextend

Location:
branches/eam_branches/ohana.20150429/src/fakeastro
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/fakeastro/include/fakeastro.h

    r37807 r38380  
    149149double int_gauss (int i);
    150150
    151 int strextend (char *input, char *format,...);
    152 
    153151int fakeastro_images ();
    154152Image *load_template_images (int *nimage);
  • branches/eam_branches/ohana.20150429/src/fakeastro/src/save_fakestars.c

    r37807 r38380  
    4848
    4949    // need to generate the remote command
    50     char command[1024];
    51     snprintf (command, 1024, "fakestar_client");
    52     strextend (command, "-galaxy");
    53     strextend (command, "-hostID %d", host->hostID);
    54     strextend (command, "-D CATDIR %s", CATDIR);
    55     strextend (command, "-hostdir %s", host->pathname);
    56     strextend (command, "-cpt %s", region->name);
    57     strextend (command, "-input %s", filename);
     50    char *command = NULL;
     51    strextend (&command, "fakestar_client");
     52    strextend (&command, "-galaxy");
     53    strextend (&command, "-hostID %d", host->hostID);
     54    strextend (&command, "-D CATDIR %s", CATDIR);
     55    strextend (&command, "-hostdir %s", host->pathname);
     56    strextend (&command, "-cpt %s", region->name);
     57    strextend (&command, "-input %s", filename);
    5858
    5959    // launch the job on the remote machine (no handshake)
     
    7070  return TRUE;
    7171}
    72 
    73 int strextend (char *input, char *format,...) {
    74 
    75   char tmpextra[1024], tmpline[1024];
    76   va_list argp;
    77 
    78   va_start (argp, format);
    79   vsnprintf (tmpextra, 1024, format, argp);
    80   snprintf (tmpline, 1024, "%s %s", input, tmpextra);
    81   strcpy (input, tmpline);
    82 
    83   return TRUE;
    84 }
Note: See TracChangeset for help on using the changeset viewer.