home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snpd9707.zip / QUERY.C < prev    next >
Text File  |  1997-07-05  |  847b  |  33 lines

  1. .I 0 1
  2. /* +++Date last modified: 05-Jul-1997 */
  3. .D 1 1
  4. .I 5 8
  5. **  Usage: QUERY [Prompt_string] [X] [n]
  6. **         where: X = Default answer, `Y' or `N'
  7. **                n = Seconds to wait before using default answer
  8. **
  9. **  Note:  If any option is used, those preceding it must be specified.
  10. **         For example, to use the time out feature, both the prompt
  11. **         string and default answer must have previously been specified.
  12. **
  13. .I 22 6
  14.             fputs(argv[1], stderr);
  15.             fputc(' ', stderr);
  16.       }
  17.       if (2 < argc)
  18.       {
  19.             def_ch = toupper(*argv[2]);
  20. .D 23 1
  21. .I 24 1
  22.                   prompt[1] = def_ch;
  23. .D 25 1
  24. .I 26 1
  25.                   prompt[3] = def_ch;
  26. .D 27 1
  27. .I 30 1
  28.       if (3 < argc)
  29. .D 31 1
  30. .I 33 1
  31.             limit = (clock_t)(CLK_TCK * atoi(argv[3]));
  32. .D 34 1
  33.