Changeset - 83087d3f4678
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-06-25 19:18:40

More of the belowage
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/client/distren.c
Show inline comments
 
@@ -163,51 +163,51 @@ int main(int argc, char *argv[])
 
	    return 1;
 
	  }
 
	buf[readlen] = '\0';
 
	fprintf(stderr, "read \"%s\"\n", buf);
 
      }
 
    execio_close(testrem);
 
    */
 
  // Can we prune off some of this code up here^? I'm not exactly sure how execio returns output, but it seems like more could be happening in execio itself, and less happening where it is actually called.
 
  // We need some code to ssh, and if the SSH fails, tell the user to register.
 
  // Killed the user reg code, as the php interface will take care of this. Although it should check for users...
 

	
 

	
 

	
 
  // ------------------------------
 
  // Ok, this is just to do something to keep distren aliveish... Kill if needed/wanted/meh'd. Borrowed some code from matt's blender.c
 

	
 

	
 
// Vars to fill:
 
    int os=1;
 
    unsigned int frame_to_render; // initialize this somewhere else...
 
    frame_to_render = 10; // temporary, the number 10 will be replaced with a function call
 
    char *filename;
 

	
 

	
 
    if(os == 1){char *bin = 'blender.exe';}
 
    else{char *bin = 'blender';}   // mac/*nix
 
    if(os == 1){char *bin[44] = 'blender.exe';}
 
    else{char *bin[28] = 'blender';}   // mac/*nix
 

	
 
    // Placeholders? figure out what the last one is...
 
    char *format = "%s -b \"%s\" -o %s -f %d -F JPEG -x 1",bin,input,output; /* the format string to pass to sprintf */
 
     size_t blenderstrlen;
 

	
 
     // This seems pretty ridik. Just sayin'. We gotta switch this up.
 
     blenderstrlen = strlen(format) - 2 * 2 /* format string minus placeholders */ + strlen(filename) + intstrlen(frame_to_render) + 1 /* NULL terminator */;
 
     char *blendercmd = malloc(blenderstrlen);
 
     snprintf(blendercmd, blenderstrlen, format, filename, frame_to_render);
 

	
 
     fprintf(stderr, "will run job num. %d ``%s''\n",jobid,blendercmd);
 
     fprintf(stderr, "will run job num. %s ``%s''\n",jobid,blendercmd);
 
     free(blendercmd);
 

	
 

	
 
  // -------------End cruddy code that will eventually compose blender.c-----------------
 

	
 

	
 

	
 
 return 0;
 
};
 

	
 

	
 

	
 

	
 

	
0 comments (0 inline, 0 general)