From c2b84904ae6b1140adc53b98e71100b2e139847e Mon Sep 17 00:00:00 2001 From: lukem Date: Thu, 4 Jan 2001 23:05:54 +0000 Subject: [PATCH] use %ll_ instead of the less standard %q_ --- usr.bin/cmp/misc.c | 6 +++--- usr.bin/cmp/regular.c | 6 +++--- usr.bin/cmp/special.c | 6 +++--- usr.bin/du/du.c | 6 +++--- usr.bin/find/ls.c | 8 ++++---- usr.bin/fstat/fstat.c | 6 +++--- usr.bin/less/less/less.h | 4 ++-- usr.bin/rdist/server.c | 10 +++++----- usr.bin/tail/reverse.c | 6 +++--- usr.bin/tcopy/tcopy.c | 10 +++++----- usr.bin/vi/common/search.c | 13 +++++++------ usr.bin/yacc/test/ftp.tab.c | 4 ++-- usr.bin/yacc/test/ftp.y | 8 ++++---- 13 files changed, 47 insertions(+), 46 deletions(-) diff --git a/usr.bin/cmp/misc.c b/usr.bin/cmp/misc.c index e7b56770c075..1cef6438dcff 100644 --- a/usr.bin/cmp/misc.c +++ b/usr.bin/cmp/misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.5 1997/10/19 14:06:01 mrg Exp $ */ +/* $NetBSD: misc.c,v 1.6 2001/01/04 23:05:54 lukem Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: misc.c,v 1.5 1997/10/19 14:06:01 mrg Exp $"); +__RCSID("$NetBSD: misc.c,v 1.6 2001/01/04 23:05:54 lukem Exp $"); #endif #endif /* not lint */ @@ -65,7 +65,7 @@ diffmsg(file1, file2, byte, line) off_t byte, line; { if (!sflag) - (void)printf("%s %s differ: char %qd, line %qd\n", + (void)printf("%s %s differ: char %lld, line %lld\n", file1, file2, (long long)byte, (long long)line); exit(DIFF_EXIT); } diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index 3f0ea7ce45c0..e89a54069f84 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -1,4 +1,4 @@ -/* $NetBSD: regular.c,v 1.10 2000/07/27 02:58:57 mycroft Exp $ */ +/* $NetBSD: regular.c,v 1.11 2001/01/04 23:05:54 lukem Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)regular.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: regular.c,v 1.10 2000/07/27 02:58:57 mycroft Exp $"); +__RCSID("$NetBSD: regular.c,v 1.11 2001/01/04 23:05:54 lukem Exp $"); #endif #endif /* not lint */ @@ -98,7 +98,7 @@ mmap_failed: if ((ch = *p1) != *p2) { if (lflag) { dfound = 1; - (void)printf("%6qd %3o %3o\n", (long long)byte, + (void)printf("%6lld %3o %3o\n", (long long)byte, ch, *p2); } else diffmsg(file1, file2, byte, line); diff --git a/usr.bin/cmp/special.c b/usr.bin/cmp/special.c index c9d73508606f..b25d55a6a197 100644 --- a/usr.bin/cmp/special.c +++ b/usr.bin/cmp/special.c @@ -1,4 +1,4 @@ -/* $NetBSD: special.c,v 1.6 1998/08/25 20:59:36 ross Exp $ */ +/* $NetBSD: special.c,v 1.7 2001/01/04 23:05:54 lukem Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)special.c 8.3 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: special.c,v 1.6 1998/08/25 20:59:36 ross Exp $"); +__RCSID("$NetBSD: special.c,v 1.7 2001/01/04 23:05:54 lukem Exp $"); #endif #endif /* not lint */ @@ -84,7 +84,7 @@ c_special(fd1, file1, skip1, fd2, file2, skip2) if (ch1 != ch2) { if (lflag) { dfound = 1; - (void)printf("%6qd %3o %3o\n", (long long)byte, + (void)printf("%6lld %3o %3o\n", (long long)byte, ch1, ch2); } else diffmsg(file1, file2, byte, line); diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c index 367fceed9679..eb3a57f818d4 100644 --- a/usr.bin/du/du.c +++ b/usr.bin/du/du.c @@ -1,4 +1,4 @@ -/* $NetBSD: du.c,v 1.16 2000/12/30 16:00:33 hubertf Exp $ */ +/* $NetBSD: du.c,v 1.17 2001/01/04 23:05:54 lukem Exp $ */ /* * Copyright (c) 1989, 1993, 1994 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)du.c 8.5 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: du.c,v 1.16 2000/12/30 16:00:33 hubertf Exp $"); +__RCSID("$NetBSD: du.c,v 1.17 2001/01/04 23:05:54 lukem Exp $"); #endif #endif /* not lint */ @@ -203,7 +203,7 @@ main(argc, argv) * the root of a traversal, display the total. */ if (listfiles || !p->fts_level) - (void)printf("%qd\t%s\n", (long long) + (void)printf("%lld\t%s\n", (long long) howmany(p->fts_statp->st_blocks, blocksize), p->fts_path); p->fts_parent->fts_number += p->fts_statp->st_blocks; diff --git a/usr.bin/find/ls.c b/usr.bin/find/ls.c index d5f2d332e37c..ed2f5e2e04a1 100644 --- a/usr.bin/find/ls.c +++ b/usr.bin/find/ls.c @@ -1,4 +1,4 @@ -/* $NetBSD: ls.c,v 1.13 1998/11/06 23:21:38 christos Exp $ */ +/* $NetBSD: ls.c,v 1.14 2001/01/04 23:05:55 lukem Exp $ */ /* * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)ls.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: ls.c,v 1.13 1998/11/06 23:21:38 christos Exp $"); +__RCSID("$NetBSD: ls.c,v 1.14 2001/01/04 23:05:55 lukem Exp $"); #endif #endif /* not lint */ @@ -73,7 +73,7 @@ printlong(name, accpath, sb) { char modep[15]; - (void)printf("%7lu %6qd ", (u_long)sb->st_ino, + (void)printf("%7lu %6lld ", (u_long)sb->st_ino, (long long)sb->st_blocks); (void)strmode(sb->st_mode, modep); (void)printf("%s %3lu %-*s %-*s ", modep, (unsigned long)sb->st_nlink, @@ -84,7 +84,7 @@ printlong(name, accpath, sb) (void)printf("%3d,%5d ", major(sb->st_rdev), minor(sb->st_rdev)); else - (void)printf("%9qd ", (long long)sb->st_size); + (void)printf("%9lld ", (long long)sb->st_size); printtime(sb->st_mtime); (void)printf("%s", name); if (S_ISLNK(sb->st_mode)) diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index f0a18af94577..8e9f5bfe1762 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: fstat.c,v 1.44 2000/08/14 09:17:11 enami Exp $ */ +/* $NetBSD: fstat.c,v 1.45 2001/01/04 23:05:55 lukem Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\ #if 0 static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95"; #else -__RCSID("$NetBSD: fstat.c,v 1.44 2000/08/14 09:17:11 enami Exp $"); +__RCSID("$NetBSD: fstat.c,v 1.45 2001/01/04 23:05:55 lukem Exp $"); #endif #endif /* not lint */ @@ -516,7 +516,7 @@ vtrans(vp, i, flag) break; } default: - printf(" %6qd", (long long)fst.size); + printf(" %6lld", (long long)fst.size); } rw[0] = '\0'; if (flag & FREAD) diff --git a/usr.bin/less/less/less.h b/usr.bin/less/less/less.h index 86c40aca517c..b6cfeebe0112 100644 --- a/usr.bin/less/less/less.h +++ b/usr.bin/less/less/less.h @@ -1,4 +1,4 @@ -/* $NetBSD: less.h,v 1.3 1999/04/06 05:57:35 mrg Exp $ */ +/* $NetBSD: less.h,v 1.4 2001/01/04 23:05:55 lukem Exp $ */ /* * Copyright (c) 1984,1985,1989,1994,1995,1996,1999 Mark Nudelman @@ -141,7 +141,7 @@ void free(); * Special types and constants. */ typedef off_t POSITION; -#define PR_POSITION "%qd" +#define PR_POSITION "%lld" #define PR_CAST long long #define MAX_PRINT_POSITION 20 #define MAX_PRINT_INT 10 diff --git a/usr.bin/rdist/server.c b/usr.bin/rdist/server.c index 20652b4e2e01..9cfc83d3a242 100644 --- a/usr.bin/rdist/server.c +++ b/usr.bin/rdist/server.c @@ -1,4 +1,4 @@ -/* $NetBSD: server.c,v 1.19 2000/10/11 14:46:16 is Exp $ */ +/* $NetBSD: server.c,v 1.20 2001/01/04 23:05:55 lukem Exp $ */ /* * Copyright (c) 1983, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)server.c 8.1 (Berkeley) 6/9/93"; #else -__RCSID("$NetBSD: server.c,v 1.19 2000/10/11 14:46:16 is Exp $"); +__RCSID("$NetBSD: server.c,v 1.20 2001/01/04 23:05:55 lukem Exp $"); #endif #endif /* not lint */ @@ -445,7 +445,7 @@ sendf(rname, opts) return; } } - (void) snprintf(buf, sizeof(buf), "K%o %o %qd %ld %s %s %s\n", + (void) snprintf(buf, sizeof(buf), "K%o %o %lld %ld %s %s %s\n", opts, stb.st_mode & 07777, (unsigned long long)stb.st_size, (u_long)stb.st_mtime, protoname(), protogroup(), rname); if (debug) @@ -504,7 +504,7 @@ sendf(rname, opts) error("%s: %s\n", target, strerror(errno)); return; } - (void)snprintf(buf, sizeof(buf), "R%o %o %qd %lu %s %s %s\n", opts, + (void)snprintf(buf, sizeof(buf), "R%o %o %lld %lu %s %s %s\n", opts, stb.st_mode & 07777, (unsigned long long)stb.st_size, (u_long)stb.st_mtime, protoname(), protogroup(), rname); if (debug) @@ -713,7 +713,7 @@ query(name) switch (stb.st_mode & S_IFMT) { case S_IFREG: - (void)snprintf(buf, sizeof(buf), "Y%qd %ld\n", + (void)snprintf(buf, sizeof(buf), "Y%lld %ld\n", (unsigned long long)stb.st_size, (u_long)stb.st_mtime); if (write(rem, buf, strlen(buf)) < 0) error("write to remote failed: %s\n", strerror(errno)); diff --git a/usr.bin/tail/reverse.c b/usr.bin/tail/reverse.c index 54d8584d1071..681c917f6dd0 100644 --- a/usr.bin/tail/reverse.c +++ b/usr.bin/tail/reverse.c @@ -1,4 +1,4 @@ -/* $NetBSD: reverse.c,v 1.11 1999/07/21 06:38:50 cgd Exp $ */ +/* $NetBSD: reverse.c,v 1.12 2001/01/04 23:05:56 lukem Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: reverse.c,v 1.11 1999/07/21 06:38:50 cgd Exp $"); +__RCSID("$NetBSD: reverse.c,v 1.12 2001/01/04 23:05:56 lukem Exp $"); #endif /* not lint */ #include @@ -227,7 +227,7 @@ r_buf(fp) if (enomem) { (void)fprintf(stderr, - "tail: warning: %qd bytes discarded\n", (long long)enomem); + "tail: warning: %lld bytes discarded\n", (long long)enomem); rval = 1; } diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c index 0f063350f795..219a1355584f 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcopy.c,v 1.10 2000/07/07 15:13:25 itojun Exp $ */ +/* $NetBSD: tcopy.c,v 1.11 2001/01/04 23:05:56 lukem Exp $ */ /* * Copyright (c) 1985, 1987, 1993, 1995 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 1987, 1993\n\ #if 0 static char sccsid[] = "@(#)tcopy.c 8.3 (Berkeley) 1/23/95"; #endif -__RCSID("$NetBSD: tcopy.c,v 1.10 2000/07/07 15:13:25 itojun Exp $"); +__RCSID("$NetBSD: tcopy.c,v 1.11 2001/01/04 23:05:56 lukem Exp $"); #endif /* not lint */ #include @@ -211,7 +211,7 @@ r1: guesslen = 0; break; } fprintf(msg, - "file %d: eof after %ld records: %qd bytes\n", + "file %d: eof after %ld records: %lld bytes\n", filen, record, (long long)size); needeof = 1; filen++; @@ -221,7 +221,7 @@ r1: guesslen = 0; } lastnread = nread; } - fprintf(msg, "total length: %qd bytes\n", (long long)tsize); + fprintf(msg, "total length: %lld bytes\n", (long long)tsize); (void)signal(SIGINT, oldsig); if (op == COPY || op == COPYVERIFY) { writeop(outp, MTWEOF); @@ -302,7 +302,7 @@ intr(signo) fprintf(msg, "record %ld\n", lastrec); } fprintf(msg, "interrupt at file %d: record %ld\n", filen, record); - fprintf(msg, "total length: %qd bytes\n", (long long)(tsize + size)); + fprintf(msg, "total length: %lld bytes\n", (long long)(tsize + size)); exit(1); } diff --git a/usr.bin/vi/common/search.c b/usr.bin/vi/common/search.c index 46b47e7f6ca7..7e2ffb53fc2b 100644 --- a/usr.bin/vi/common/search.c +++ b/usr.bin/vi/common/search.c @@ -1,4 +1,4 @@ -/* $NetBSD: search.c,v 1.4 2000/03/17 02:23:17 christos Exp $ */ +/* $NetBSD: search.c,v 1.5 2001/01/04 23:05:56 lukem Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -290,8 +290,8 @@ f_search(sp, fm, rm, ptrn, eptrn, flags) search_msg(sp, S_WRAP); #if defined(DEBUG) && 0 - TRACE(sp, "F search: %qu to %qu\n", - match[0].rm_so, match[0].rm_eo); + TRACE(sp, "F search: %llu to %llu\n", + (long long)match[0].rm_so, (long long)match[0].rm_eo); #endif rm->lno = lno; rm->cno = match[0].rm_so; @@ -413,7 +413,8 @@ b_search(sp, fm, rm, ptrn, eptrn, flags) #endif #if defined(DEBUG) && 0 - TRACE(sp, "B search: %lu from 0 to %qu\n", lno, match[0].rm_eo); + TRACE(sp, "B search: %lu from 0 to %llu\n", lno, + (long long)match[0].rm_eo); #endif /* Search the line. */ #ifdef REG_STARTEND @@ -447,8 +448,8 @@ b_search(sp, fm, rm, ptrn, eptrn, flags) search_msg(sp, S_WRAP); #if defined(DEBUG) && 0 - TRACE(sp, "B found: %qu to %qu\n", - match[0].rm_so, match[0].rm_eo); + TRACE(sp, "B found: %llu to %llu\n", + (long long)match[0].rm_so, (long long)match[0].rm_eo); #endif /* * We now have the first match on the line. Step through the diff --git a/usr.bin/yacc/test/ftp.tab.c b/usr.bin/yacc/test/ftp.tab.c index 1ac0909b66bd..9d9317f4cbe7 100644 --- a/usr.bin/yacc/test/ftp.tab.c +++ b/usr.bin/yacc/test/ftp.tab.c @@ -1,6 +1,6 @@ #ifndef lint /*static char yysccsid[] = "from: @(#)yaccpar 1.9 (Berkeley) 02/21/93";*/ -static char rcsid[] = "$NetBSD: ftp.tab.c,v 1.6 1997/01/09 20:23:31 tls Exp $"; +static char rcsid[] = "$NetBSD: ftp.tab.c,v 1.7 2001/01/04 23:05:57 lukem Exp $"; #endif #define YYBYACC 1 #define YYMAJOR 1 @@ -873,7 +873,7 @@ char *filename; (stbuf.st_mode&S_IFMT) != S_IFREG) reply(550, "%s: not a plain file.", filename); else - reply(213, "%qu", stbuf.st_size); + reply(213, "%llu", (long long)stbuf.st_size); break;} case TYPE_A: { FILE *fin; diff --git a/usr.bin/yacc/test/ftp.y b/usr.bin/yacc/test/ftp.y index 8a030a9ebe69..a723f91b4741 100644 --- a/usr.bin/yacc/test/ftp.y +++ b/usr.bin/yacc/test/ftp.y @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.y,v 1.5 1997/01/09 20:23:33 tls Exp $ */ +/* $NetBSD: ftp.y,v 1.6 2001/01/04 23:05:57 lukem Exp $ */ /* * Copyright (c) 1985, 1988 Regents of the University of California. @@ -17,7 +17,7 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * * from: @(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89 - * $NetBSD: ftp.y,v 1.5 1997/01/09 20:23:33 tls Exp $ + * $NetBSD: ftp.y,v 1.6 2001/01/04 23:05:57 lukem Exp $ */ /* @@ -29,7 +29,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)ftpcmd.y 5.20.1.1 (Berkeley) 3/2/89";*/ -static char rcsid[] = "$NetBSD: ftp.y,v 1.5 1997/01/09 20:23:33 tls Exp $"; +static char rcsid[] = "$NetBSD: ftp.y,v 1.6 2001/01/04 23:05:57 lukem Exp $"; #endif /* not lint */ #include @@ -1151,7 +1151,7 @@ char *filename; (stbuf.st_mode&S_IFMT) != S_IFREG) reply(550, "%s: not a plain file.", filename); else - reply(213, "%qu", stbuf.st_size); + reply(213, "%llu", (long long)stbuf.st_size); break;} case TYPE_A: { FILE *fin;