aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/health/args.c
blob: f8e7a8cc8377892f0729d503d1cc09ae7aa3b0f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* For copyright information, see olden_v1.0/COPYRIGHT */

/*****************************************************************
 * args.c:  Handles arguments to command line.                   *
 *          To be used with health.c.                            *
 *****************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include "health.h"

#ifdef SS_PLAIN
#include "ssplain.h"
#endif SS_PLAIN

void dealwithargs(int argc, char *argv[]) { 

  if (argc < 4) 
    {
      fprintf(stderr, "usage:  health <# levels> <time> <seed>\n");
      exit(1); 
    }
  
  max_level = atoi(argv[1]);
  fprintf(stderr, "This is max_level : %d\n", max_level);
  max_time = atol(argv[2]);
  fprintf(stderr, "This is max_time : %ld\n", max_time);    // sm: "%d" -> "%ld"
  seed = atol(argv[3]);
}