ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/saidar/saidar.c
(Generate patch)

Comparing projects/libstatgrab/src/saidar/saidar.c (file contents):
Revision 1.2 by tdb, Thu Oct 9 16:00:31 2003 UTC vs.
Revision 1.3 by pajs, Thu Oct 9 16:08:16 2003 UTC

# Line 352 | Line 352 | int get_stats(){
352                  return 1;
353   }
354  
355 + void version_num(char *progname){
356 +        fprintf(stderr, "%s version %s\n", PACKAGE_VERSION);
357 +        fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT);
358 +        exit(1);
359 + }
360 +
361 + void usage(char *progname){
362 +        fprintf(stderr, "Usage: %s [-d delay] [-v] [-h]\n\n", progname);
363 +        fprintf(stderr, "  -d    Sets the update time in seconds\n");
364 +        fprintf(stderr, "  -v    Prints version number\n");
365 +        fprintf(stderr, "  -h    Displays this help information.\n");
366 +        fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT);
367 +        exit(1);
368 +
369 + }
370 +
371   int main(int argc, char **argv){
372  
373          extern char *optarg;
# Line 379 | Line 395 | int main(int argc, char **argv){
395                                  }
396                                  delay--;
397                                  break;
398 +                        case 'v':
399 +                                version_num(argv[0]);  
400 +                                break;
401 +                        case 'h':
402 +                        default:
403 +                                usage(argv[0]);
404 +                                return 1;
405 +                                break;
406 +                                
407                  }
408          }
409  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines