[BACK]Return to io.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / games / cribbage

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/games/cribbage/io.c between version 1.7 and 1.8

version 1.7, 1995/03/21 15:08:53 version 1.8, 1997/05/17 19:26:18
Line 256  incard(crd)
Line 256  incard(crd)
         if (!(line = getline()))          if (!(line = getline()))
                 goto gotit;                  goto gotit;
         p = p1 = line;          p = p1 = line;
         while (*p1 != ' ' && *p1 != NULL)          while (*p1 != ' ' && *p1 != '\0')
                 ++p1;                  ++p1;
         *p1++ = NULL;          *p1++ = '\0';
         if (*p == NULL)          if (*p == '\0')
                 goto gotit;                  goto gotit;
   
         /* IMPORTANT: no real card has 2 char first name */          /* IMPORTANT: no real card has 2 char first name */
Line 295  incard(crd)
Line 295  incard(crd)
         if (rnk == EMPTY)          if (rnk == EMPTY)
                 goto gotit;                  goto gotit;
         p = p1;          p = p1;
         while (*p1 != ' ' && *p1 != NULL)          while (*p1 != ' ' && *p1 != '\0')
                 ++p1;                  ++p1;
         *p1++ = NULL;          *p1++ = '\0';
         if (*p == NULL)          if (*p == '\0')
                 goto gotit;                  goto gotit;
         if (!strcmp("OF", p)) {          if (!strcmp("OF", p)) {
                 p = p1;                  p = p1;
                 while (*p1 != ' ' && *p1 != NULL)                  while (*p1 != ' ' && *p1 != '\0')
                         ++p1;                          ++p1;
                 *p1++ = NULL;                  *p1++ = '\0';
                 if (*p == NULL)                  if (*p == '\0')
                         goto gotit;                          goto gotit;
         }          }
         sut = EMPTY;          sut = EMPTY;
Line 354  number(lo, hi, prompt)
Line 354  number(lo, hi, prompt)
   
         for (sum = 0;;) {          for (sum = 0;;) {
                 msg(prompt);                  msg(prompt);
                 if (!(p = getline()) || *p == NULL) {                  if (!(p = getline()) || *p == '\0') {
                         msg(quiet ? "Not a number" :                          msg(quiet ? "Not a number" :
                             "That doesn't look like a number");                              "That doesn't look like a number");
                         continue;                          continue;
Line 369  number(lo, hi, prompt)
Line 369  number(lo, hi, prompt)
                                 ++p;                                  ++p;
                         }                          }
   
                 if (*p != ' ' && *p != '\t' && *p != NULL)                  if (*p != ' ' && *p != '\t' && *p != '\0')
                         sum = lo - 1;                          sum = lo - 1;
                 if (sum >= lo && sum <= hi)                  if (sum >= lo && sum <= hi)
                         break;                          break;

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVSweb <webmaster@jp.NetBSD.org>