Revision 1291

trunk/src/nh99/model33.cpp (revision 1291)
67 67
    ssbul_l(ptmp);
68 68
    do
69 69
    {
70
      ptmp=strtok('\0'," ");
70
      ptmp = strtok(NULL, " ");
71 71
      if (ptmp) nopt++;
72 72
    }
73 73
    while(ptmp);
......
84 84
    }
85 85
    do
86 86
    {
87
      ptmp=strtok('\0'," ");
87
      ptmp = strtok(NULL, " ");
88 88
      if (ptmp)
89 89
      {
90 90
        //a[nopt]=(char *)malloc((strlen(ptmp)+5)*sizeof(char));
trunk/src/linad99/optmatch.cpp (revision 1291)
42 42
   char * s=(char*)ss;
43 43
   int rval=-1;
44 44
   int i=1;
45
   char * p;
46
   p=strtok(s," ");
45
   char* p = strtok(s," ");
47 46
   do {
48 47
     if (!strcmp(p,string))
49 48
     {
......
51 50
       break;
52 51
     }
53 52
     i++;
54
     p=strtok('\0'," ");
53
     p = strtok(NULL, " ");
55 54
   }
56 55
   while (p);
57 56
   return rval;
......
64 63
int option_match(char *_s, const char *string, const int& _nopt)
65 64
 {
66 65
   adstring ss=_s;
67
   char * s=(char*)ss;
68
   int& nopt = (int&) _nopt;
66
   char* s=(char*)ss;
67
   int& nopt = (int&)_nopt;
69 68
   int rval=-1;
70 69
   int i=1;
71 70
   nopt=0;
72
   char * p;
73
   p=strtok(s," ");
71
   char* p = strtok(s," ");
74 72
   do {
75 73
     if (!strcmp(p,string))
76 74
     {
77 75
       rval=i;
78 76
       break;
79 77
     }
80
     p=strtok('\0'," ");
78
     p = strtok(NULL, " ");
81 79
     i++;
82 80
   }
83 81
   while (p);
84 82
   do
85 83
   {
86
     p=strtok('\0'," ");
84
     p = strtok(NULL, " ");
87 85
     if (!p) break;
88 86
     if (p[0] == '-') break;
89 87
     nopt++;

Also available in: Unified diff