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

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

Diff for /src/games/number/number.c between version 1.15 and 1.16

version 1.15, 2012/06/19 05:46:09 version 1.16, 2014/03/23 00:03:04
Line 78  static const char *const name1[] = {
Line 78  static const char *const name1[] = {
   
 int     main(int, char *[]);  int     main(int, char *[]);
 static void convert(char *);  static void convert(char *);
 static int number(const char *, int);  static int number(const char *, size_t);
 static void pfract(int);  static void pfract(size_t);
 static int unit(int, const char *);  static int unit(size_t, const char *);
 static void usage(void) __dead;  static void usage(void) __dead;
   
 static int lflag;  static int lflag;
Line 125  main(int argc, char *argv[])
Line 125  main(int argc, char *argv[])
 void  void
 convert(char *line)  convert(char *line)
 {  {
         int flen, len, rval;          size_t flen, len;
           int rval;
         char *p, *fraction;          char *p, *fraction;
   
         flen = 0;          flen = 0;
Line 191  badnum:   errx(1, "illegal number: %s", 
Line 192  badnum:   errx(1, "illegal number: %s", 
 }  }
   
 int  int
 unit(int len, const char *p)  unit(size_t len, const char *p)
 {  {
         int off, rval;          size_t off;
           int rval;
   
         rval = 0;          rval = 0;
         if (len > 3) {          if (len > 3) {
Line 225  unit(int len, const char *p)
Line 227  unit(int len, const char *p)
 }  }
   
 int  int
 number(const char *p, int len)  number(const char *p, size_t len)
 {  {
         int val, rval;          int val, rval;
   
Line 263  number(const char *p, int len)
Line 265  number(const char *p, int len)
 }  }
   
 void  void
 pfract(int len)  pfract(size_t len)
 {  {
         static const char *const pref[] = { "", "ten-", "hundred-" };          static const char *const pref[] = { "", "ten-", "hundred-" };
   

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

CVSweb <webmaster@jp.NetBSD.org>