Module Name: src
Committed By: lukem
Date: Fri Jul 19 03:53:13 UTC 2024
Modified Files:
src/usr.bin/ftp: cmds.c progressbar.c ruserpass.c
Log Message:
ftp: improve units used in comments and errors
Use "KiB" instead of "K" in errors.
Clarify related comments.
To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/usr.bin/ftp/cmds.c
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/ftp/progressbar.c
cvs rdiff -u -r1.33 -r1.34 src/usr.bin/ftp/ruserpass.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/ftp/cmds.c
diff -u src/usr.bin/ftp/cmds.c:1.141 src/usr.bin/ftp/cmds.c:1.142
--- src/usr.bin/ftp/cmds.c:1.141 Wed Jan 6 09:15:59 2021
+++ src/usr.bin/ftp/cmds.c Fri Jul 19 03:53:13 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp $ */
+/* $NetBSD: cmds.c,v 1.142 2024/07/19 03:53:13 lukem Exp $ */
/*-
* Copyright (c) 1996-2021 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: cmds.c,v 1.141 2021/01/06 09:15:59 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.142 2024/07/19 03:53:13 lukem Exp $");
#endif
#endif /* not lint */
@@ -2487,7 +2487,7 @@ macdef(int argc, char *argv[])
while ((c = getchar()) != '\n' && c != EOF)
/* LOOP */;
if (c == EOF || getchar() == '\n') {
- fputs("Macro not defined - 4K buffer exceeded.\n",
+ fputs("Macro not defined - 4 KiB buffer exceeded.\n",
ttyout);
code = -1;
return;
Index: src/usr.bin/ftp/progressbar.c
diff -u src/usr.bin/ftp/progressbar.c:1.24 src/usr.bin/ftp/progressbar.c:1.25
--- src/usr.bin/ftp/progressbar.c:1.24 Wed Jan 6 04:43:14 2021
+++ src/usr.bin/ftp/progressbar.c Fri Jul 19 03:53:13 2024
@@ -1,7 +1,7 @@
-/* $NetBSD: progressbar.c,v 1.24 2021/01/06 04:43:14 lukem Exp $ */
+/* $NetBSD: progressbar.c,v 1.25 2024/07/19 03:53:13 lukem Exp $ */
/*-
- * Copyright (c) 1997-2021 The NetBSD Foundation, Inc.
+ * Copyright (c) 1997-2024 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: progressbar.c,v 1.24 2021/01/06 04:43:14 lukem Exp $");
+__RCSID("$NetBSD: progressbar.c,v 1.25 2024/07/19 03:53:13 lukem Exp $");
#endif /* not lint */
/*
@@ -89,17 +89,17 @@ updateprogressmeter(int dummy)
*/
#if !defined(NO_PROGRESS) || !defined(STANDALONE_PROGRESS)
static const char * const suffixes[] = {
- "", /* 2^0 (byte) */
- "KiB", /* 2^10 Kibibyte */
- "MiB", /* 2^20 Mebibyte */
- "GiB", /* 2^30 Gibibyte */
- "TiB", /* 2^40 Tebibyte */
- "PiB", /* 2^50 Pebibyte */
- "EiB", /* 2^60 Exbibyte */
+ "", /* 2^0, (byte) */
+ "KiB", /* 2^10, Kibibyte */
+ "MiB", /* 2^20, Mebibyte */
+ "GiB", /* 2^30, Gibibyte */
+ "TiB", /* 2^40, Tebibyte */
+ "PiB", /* 2^50, Pebibyte */
+ "EiB", /* 2^60, Exbibyte */
#if 0
/* The following are not necessary for signed 64-bit off_t */
- "ZiB", /* 2^70 Zebibyte */
- "YiB", /* 2^80 Yobibyte */
+ "ZiB", /* 2^70, Zebibyte */
+ "YiB", /* 2^80, Yobibyte */
#endif
};
#define NSUFFIXES (int)(sizeof(suffixes) / sizeof(suffixes[0]))
Index: src/usr.bin/ftp/ruserpass.c
diff -u src/usr.bin/ftp/ruserpass.c:1.33 src/usr.bin/ftp/ruserpass.c:1.34
--- src/usr.bin/ftp/ruserpass.c:1.33 Tue Apr 17 05:52:04 2007
+++ src/usr.bin/ftp/ruserpass.c Fri Jul 19 03:53:13 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ruserpass.c,v 1.33 2007/04/17 05:52:04 lukem Exp $ */
+/* $NetBSD: ruserpass.c,v 1.34 2024/07/19 03:53:13 lukem Exp $ */
/*
* Copyright (c) 1985, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95";
#else
-__RCSID("$NetBSD: ruserpass.c,v 1.33 2007/04/17 05:52:04 lukem Exp $");
+__RCSID("$NetBSD: ruserpass.c,v 1.34 2024/07/19 03:53:13 lukem Exp $");
#endif
#endif /* not lint */
@@ -247,7 +247,7 @@ ruserpass(const char *host, char **aname
tmp++;
}
if (tmp == macbuf + 4096) {
- fputs("4K macro buffer exceeded.\n",
+ fputs("4 KiB macro buffer exceeded.\n",
ttyout);
goto bad;
}