Changeset 38380
- Timestamp:
- Jun 5, 2015, 12:08:33 PM (11 years ago)
- Location:
- branches/eam_branches/ohana.20150429/src/fakeastro
- Files:
-
- 2 edited
-
include/fakeastro.h (modified) (1 diff)
-
src/save_fakestars.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/fakeastro/include/fakeastro.h
r37807 r38380 149 149 double int_gauss (int i); 150 150 151 int strextend (char *input, char *format,...);152 153 151 int fakeastro_images (); 154 152 Image *load_template_images (int *nimage); -
branches/eam_branches/ohana.20150429/src/fakeastro/src/save_fakestars.c
r37807 r38380 48 48 49 49 // need to generate the remote command 50 char command[1024];51 s nprintf (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); 58 58 59 59 // launch the job on the remote machine (no handshake) … … 70 70 return TRUE; 71 71 } 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.
