home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / JOT / RTR / JOT. next >
Encoding:
Text File  |  1998-07-24  |  1.0 KB  |  45 lines

  1. --- jot.c.orig    Thu Nov  7 12:56:41 1991
  2. +++ jot.c    Thu Jan 30 18:00:11 1997
  3. @@ -11,6 +11,7 @@
  4.  
  5.  #include <stdio.h>
  6.  #include <ctype.h>
  7. +#include <string.h>
  8.  
  9.  #define    REPS_DEF    100
  10.  #define    BEGIN_DEF    1
  11. @@ -127,13 +128,13 @@
  12.      switch (ac) {    /* examine args right to left, falling thru cases */
  13.      case 4:
  14.          if (!isdefault(av[3])) {
  15. -            if (!sscanf(av[3], "%F", &s))
  16. +            if (!sscanf(av[3], "%lf", &s))
  17.                  error("Bad s value:  %s", av[3]);
  18.              mask |= 01;
  19.          }
  20.      case 3:
  21.          if (!isdefault(av[2])) {
  22. -            if (!sscanf(av[2], "%F", &ender))
  23. +            if (!sscanf(av[2], "%lf", &ender))
  24.                  ender = av[2][strlen(av[2])-1];
  25.              mask |= 02;
  26.              if (!prec)
  27. @@ -141,7 +142,7 @@
  28.          }
  29.      case 2:
  30.          if (!isdefault(av[1])) {
  31. -            if (!sscanf(av[1], "%F", &begin))
  32. +            if (!sscanf(av[1], "%lf", &begin))
  33.                  begin = av[1][strlen(av[1])-1];
  34.              mask |= 04;
  35.              if (!prec)
  36. @@ -151,7 +152,7 @@
  37.          }
  38.      case 1:
  39.          if (!isdefault(av[0])) {
  40. -            if (!sscanf(av[0], "%D", &reps))
  41. +            if (!sscanf(av[0], "%ld", &reps))
  42.                  error("Bad reps value:  %s", av[0]);
  43.              mask |= 010;
  44.          }
  45.