=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/uniq/uniq.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/uniq/uniq.c 2022/01/01 02:20:38 1.31 --- src/usr.bin/uniq/uniq.c 2022/01/01 17:44:18 1.32 *************** *** 1,4 **** ! /* $OpenBSD: uniq.c,v 1.31 2022/01/01 02:20:38 cheloha Exp $ */ /* $NetBSD: uniq.c,v 1.7 1995/08/31 22:03:48 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: uniq.c,v 1.32 2022/01/01 17:44:18 cheloha Exp $ */ /* $NetBSD: uniq.c,v 1.7 1995/08/31 22:03:48 jtc Exp $ */ /* *************** *** 45,52 **** #include #include int cflag, dflag, iflag, uflag; - int numchars, numfields, repeats; void show(const char *); char *skip(char *); --- 45,53 ---- #include #include + long long numchars, numfields; + unsigned long long repeats; int cflag, dflag, iflag, uflag; void show(const char *); char *skip(char *); *************** *** 78,85 **** dflag = 1; break; case 'f': ! numfields = (int)strtonum(optarg, 0, INT_MAX, ! &errstr); if (errstr) errx(1, "field skip value is %s: %s", errstr, optarg); --- 79,85 ---- dflag = 1; break; case 'f': ! numfields = strtonum(optarg, 0, LLONG_MAX, &errstr); if (errstr) errx(1, "field skip value is %s: %s", errstr, optarg); *************** *** 88,95 **** iflag = 1; break; case 's': ! numchars = (int)strtonum(optarg, 0, INT_MAX, ! &errstr); if (errstr) errx(1, "character skip value is %s: %s", --- 88,94 ---- iflag = 1; break; case 's': ! numchars = strtonum(optarg, 0, LLONG_MAX, &errstr); if (errstr) errx(1, "character skip value is %s: %s", *************** *** 187,193 **** { if ((dflag && repeats) || (uflag && !repeats)) { if (cflag) ! printf("%4d %s\n", repeats + 1, str); else printf("%s\n", str); } --- 186,192 ---- { if ((dflag && repeats) || (uflag && !repeats)) { if (cflag) ! printf("%4llu %s\n", repeats + 1, str); else printf("%s\n", str); } *************** *** 196,203 **** char * skip(char *str) { wchar_t wc; - int nchars, nfields; int len; int field_started; --- 195,202 ---- char * skip(char *str) { + long long nchars, nfields; wchar_t wc; int len; int field_started;