Skip to content

Commit

Permalink
Added -r option for running CodeRunner for just one epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankkumar committed Nov 20, 2011
1 parent 61eed9f commit ca377ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions includeh.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef INCLUDEH_H
#define INCLUDEH_H
#include "includes.h"
#ifndef CONFIG_H
#define CONFIG_H
#include "config.h"
#endif
#include "Logs.h"
#endif
8 changes: 6 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ int main(int argc, char* argv[])

int opt;
int SleepInterval = SLEEPINTERVAL;
bool RunOnce = false;
FileInfoFetchOptionsStruct* FileInfoFetchOptions = new FileInfoFetchOptionsStruct();
FileInfoFetchOptions->Init();
while((opt = getopt(argc, argv, "ncbf:p:l:s:")) != -1){
while((opt = getopt(argc, argv, "ncbfr:p:l:s:")) != -1){
switch(opt){
case 'f':
FileInfoFetchOptions->f=true;
Expand All @@ -63,8 +64,11 @@ int main(int argc, char* argv[])
case 's':
SleepInterval = atoi(optarg);
break;
case 'r':
RunOnce = true;
break;
default: /* '?' */
fprintf(stderr, "Usage: %s [-f fileid | [-p problemcode] [-l language]] [-s sleepinterval] [-b] [-n] [-c]", argv[0]);
fprintf(stderr, "Usage: %s [-f fileid | [-p problemcode] [-l language]] [-s sleepinterval] [-b] [-n] [-c] [-r]", argv[0]);
exit(EXIT_FAILURE);
}
}
Expand Down

0 comments on commit ca377ba

Please sign in to comment.