Changeset - 1d2016dd3af2
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-09-29 21:12:18

Added argument-parser to server
1 file changed with 17 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -491,7 +491,23 @@ void printJobInfo(struct distrenjob *hea
 
int main(int argc, char *argv[])
 
{
 

	
 
  /* @TODO: Put some arg-grabbing code here */
 
  /* Argument-parser */
 
  int counter = 0;
 
  for(counter=0; counter<argc; counter++){
 
    fprintf(stderr,"argv[%d] contains: %s\n\nStarting comparisons:\n",counter,argv[counter]);
 
         if(strcmp(argv[counter], "-h") == 0) {
 
           fprintf(stderr, "Usage: distrend [option] \nStarts the distrend server\n\t-h\tshow this help\n\t-t\tlaunches queue testing interface \n");
 
           return 2;
 
          }
 

	
 
          else if(strcmp(argv[counter], "-t") == 0) {
 
            fprintf(stderr, "Entering into test mode...\n\n");
 

	
 
          }
 
          else{
 
            fprintf(stderr, "Starting the server with no arguments...n\n");
 
          }
 
  }
 

	
 
  struct distrenjob head;
 
  head.priority = 0; // make head have the highest priority
0 comments (0 inline, 0 general)