1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)query.c	5.1 (Berkeley) 5/30/85";
   9: #endif not lint
  10: 
  11: # include   "robots.h"
  12: 
  13: /*
  14:  * query:
  15:  *	Ask a question and get a yes or no answer.  Default is "no".
  16:  */
  17: query(prompt)
  18: char    *prompt;
  19: {
  20:     register int    c, retval;
  21:     register int    y, x;
  22: 
  23:     getyx(stdscr, y, x);
  24:     move(Y_PROMPT, X_PROMPT);
  25:     addstr(prompt);
  26:     clrtoeol();
  27:     refresh();
  28:     retval = ((c = getchar()) == 'y' || c == 'Y');
  29:     move(Y_PROMPT, X_PROMPT);
  30:     clrtoeol();
  31:     move(y, x);
  32:     return retval;
  33: }

Defined functions

query defined in line 17; used 2 times

Defined variables

sccsid defined in line 8; never used
Last modified: 1985-05-31
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 902
Valid CSS Valid XHTML 1.0 Strict