[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.9 and 1.10

version 1.9, 1997/07/09 06:25:47 version 1.10, 1997/10/10 12:32:32
Line 33 
Line 33 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
   #include <sys/cdefs.h>
 #ifndef lint  #ifndef lint
 #if 0  #if 0
 static char sccsid[] = "@(#)io.c        8.1 (Berkeley) 5/31/93";  static char sccsid[] = "@(#)io.c        8.1 (Berkeley) 5/31/93";
 #else  #else
 static char rcsid[] = "$NetBSD$";  __RCSID("$NetBSD$");
 #endif  #endif
 #endif /* not lint */  #endif /* not lint */
   
Line 173  prhand(h, n, win, blank)
Line 174  prhand(h, n, win, blank)
         WINDOW *win;          WINDOW *win;
         BOOLEAN blank;          BOOLEAN blank;
 {  {
         register int i;          int i;
   
         werase(win);          werase(win);
         for (i = 0; i < n; i++)          for (i = 0; i < n; i++)
Line 192  infrom(hand, n, prompt)
Line 193  infrom(hand, n, prompt)
         int n;          int n;
         char *prompt;          char *prompt;
 {  {
         register int i, j;          int i, j;
         CARD crd;          CARD crd;
   
         if (n < 1) {          if (n < 1) {
Line 246  int
Line 247  int
 incard(crd)  incard(crd)
         CARD *crd;          CARD *crd;
 {  {
         register int i;          int i;
         int rnk, sut;          int rnk, sut;
         char *line, *p, *p1;          char *line, *p, *p1;
         BOOLEAN retval;          BOOLEAN retval;
Line 330  gotit:
Line 331  gotit:
 int  int
 getuchar()  getuchar()
 {  {
         register int c;          int c;
   
         c = readchar();          c = readchar();
         if (islower(c))          if (islower(c))
Line 349  number(lo, hi, prompt)
Line 350  number(lo, hi, prompt)
         int lo, hi;          int lo, hi;
         char *prompt;          char *prompt;
 {  {
         register char *p;          char *p;
         register int sum;          int sum;
   
         for (sum = 0;;) {          for (sum = 0;;) {
                 msg(prompt);                  msg(prompt);
Line 447  void
Line 448  void
 endmsg()  endmsg()
 {  {
         static int lastline = 0;          static int lastline = 0;
         register int len;          int len;
         register char *mp, *omp;          char *mp, *omp;
   
         /* All messages should start with uppercase */          /* All messages should start with uppercase */
         mvaddch(lastline + Y_MSG_START, SCORE_X, ' ');          mvaddch(lastline + Y_MSG_START, SCORE_X, ' ');
Line 516  do_wait()
Line 517  do_wait()
  */   */
 void  void
 wait_for(ch)  wait_for(ch)
         register int ch;          int ch;
 {  {
         register char c;          char c;
   
         if (ch == '\n')          if (ch == '\n')
                 while ((c = readchar()) != '\n')                  while ((c = readchar()) != '\n')
Line 535  wait_for(ch)
Line 536  wait_for(ch)
 int  int
 readchar()  readchar()
 {  {
         register int cnt;          int cnt;
         char c;          char c;
   
 over:  over:
Line 563  over:
Line 564  over:
 char *  char *
 getline()  getline()
 {  {
         register char *sp;          char *sp;
         register int c, oy, ox;          int c, oy, ox;
         register WINDOW *oscr;          WINDOW *oscr;
   
         oscr = stdscr;          oscr = stdscr;
         stdscr = Msgwin;          stdscr = Msgwin;
Line 578  getline()
Line 579  getline()
                 else                  else
                         if (c == erasechar()) { /* process erase character */                          if (c == erasechar()) { /* process erase character */
                                 if (sp > linebuf) {                                  if (sp > linebuf) {
                                         register int i;                                          int i;
   
                                         sp--;                                          sp--;
                                         for (i = strlen(unctrl(*sp)); i; i--)                                          for (i = strlen(unctrl(*sp)); i; i--)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

CVSweb <webmaster@jp.NetBSD.org>