Add missing newlines to error messages.
authorMatt Kraai <kraai@debian.org>
Mon, 18 Dec 2000 03:08:29 +0000 (03:08 -0000)
committerMatt Kraai <kraai@debian.org>
Mon, 18 Dec 2000 03:08:29 +0000 (03:08 -0000)
coreutils/cut.c
coreutils/touch.c
cut.c
lsmod.c
modutils/lsmod.c
networking/wget.c
touch.c
utility.c
wget.c

index 6e0fe83..8b31996 100644 (file)
@@ -188,7 +188,7 @@ extern int cut_main(int argc, char **argv)
                        case 'f':
                                /* make sure they didn't ask for two types of lists */
                                if (part != 0) {
-                                       error_msg_and_die("only one type of list may be specified");
+                                       error_msg_and_die("only one type of list may be specified\n");
                                }
                                part = (char)opt;
                                decompose_list(optarg);
@@ -213,8 +213,9 @@ extern int cut_main(int argc, char **argv)
        }
 
        if (supress_non_delimited_lines && part != 'f') {
-               error_msg_and_die("suppressing non-delimited lines makes sense
-       only when operating on fields\n");
+               error_msg_and_die("suppressing non-delimited lines makes sense"
+                               " only when operating on fields\n");
+
        }
 
        if (delim != '\t' && part != 'f') {
index 59800b2..1b03075 100644 (file)
@@ -58,12 +58,12 @@ extern int touch_main(int argc, char **argv)
                        if (create == FALSE && errno == ENOENT)
                                return EXIT_SUCCESS;
                        else {
-                               error_msg_and_die("%s", strerror(errno));
+                               perror_msg_and_die("%s", *argv);
                        }
                }
                close(fd);
                if (utime(*argv, NULL)) {
-                       error_msg_and_die("%s", strerror(errno));
+                       perror_msg_and_die("%s", *argv);
                }
                argc--;
                argv++;
diff --git a/cut.c b/cut.c
index 6e0fe83..8b31996 100644 (file)
--- a/cut.c
+++ b/cut.c
@@ -188,7 +188,7 @@ extern int cut_main(int argc, char **argv)
                        case 'f':
                                /* make sure they didn't ask for two types of lists */
                                if (part != 0) {
-                                       error_msg_and_die("only one type of list may be specified");
+                                       error_msg_and_die("only one type of list may be specified\n");
                                }
                                part = (char)opt;
                                decompose_list(optarg);
@@ -213,8 +213,9 @@ extern int cut_main(int argc, char **argv)
        }
 
        if (supress_non_delimited_lines && part != 'f') {
-               error_msg_and_die("suppressing non-delimited lines makes sense
-       only when operating on fields\n");
+               error_msg_and_die("suppressing non-delimited lines makes sense"
+                               " only when operating on fields\n");
+
        }
 
        if (delim != '\t' && part != 'f') {
diff --git a/lsmod.c b/lsmod.c
index f957d2d..4c50bf4 100644 (file)
--- a/lsmod.c
+++ b/lsmod.c
@@ -83,7 +83,7 @@ extern int lsmod_main(int argc, char **argv)
        module_names = xmalloc(bufsize = 256);
        deps = xmalloc(bufsize);
        if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) {
-               error_msg_and_die("QM_MODULES: %s\n", strerror(errno));
+               perror_msg_and_die("QM_MODULES");
        }
 
        printf("Module                  Size  Used by\n");
@@ -94,7 +94,7 @@ extern int lsmod_main(int argc, char **argv)
                                continue;
                        }
                        /* else choke */
-                       error_msg_and_die("module %s: QM_INFO: %s\n", mn, strerror(errno));
+                       perror_msg_and_die("module %s: QM_INFO", mn);
                }
                while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
                        if (errno == ENOENT) {
@@ -102,7 +102,7 @@ extern int lsmod_main(int argc, char **argv)
                                continue;
                        }
                        if (errno != ENOSPC) {
-                               error_msg_and_die("module %s: QM_REFS: %s", mn, strerror(errno));
+                               error_msg_and_die("module %s: QM_REFS", mn);
                        }
                        deps = xrealloc(deps, bufsize = count);
                }
@@ -153,7 +153,7 @@ extern int lsmod_main(int argc, char **argv)
                close(fd);
                return 0;
        }
-       error_msg_and_die("/proc/modules: %s\n", strerror(errno));
+       perror_msg_and_die("/proc/modules");
        return 1;
 }
 
index f957d2d..4c50bf4 100644 (file)
@@ -83,7 +83,7 @@ extern int lsmod_main(int argc, char **argv)
        module_names = xmalloc(bufsize = 256);
        deps = xmalloc(bufsize);
        if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) {
-               error_msg_and_die("QM_MODULES: %s\n", strerror(errno));
+               perror_msg_and_die("QM_MODULES");
        }
 
        printf("Module                  Size  Used by\n");
@@ -94,7 +94,7 @@ extern int lsmod_main(int argc, char **argv)
                                continue;
                        }
                        /* else choke */
-                       error_msg_and_die("module %s: QM_INFO: %s\n", mn, strerror(errno));
+                       perror_msg_and_die("module %s: QM_INFO", mn);
                }
                while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
                        if (errno == ENOENT) {
@@ -102,7 +102,7 @@ extern int lsmod_main(int argc, char **argv)
                                continue;
                        }
                        if (errno != ENOSPC) {
-                               error_msg_and_die("module %s: QM_REFS: %s", mn, strerror(errno));
+                               error_msg_and_die("module %s: QM_REFS", mn);
                        }
                        deps = xrealloc(deps, bufsize = count);
                }
@@ -153,7 +153,7 @@ extern int lsmod_main(int argc, char **argv)
                close(fd);
                return 0;
        }
-       error_msg_and_die("/proc/modules: %s\n", strerror(errno));
+       perror_msg_and_die("/proc/modules");
        return 1;
 }
 
index 50b9aee..dbc2836 100644 (file)
@@ -159,7 +159,7 @@ int wget_main(int argc, char **argv)
         */
        if (do_continue) {
                if (fstat(fileno(output), &sbuf) < 0)
-                       error_msg_and_die("fstat()");
+                       perror_msg_and_die("fstat()");
                if (sbuf.st_size > 0)
                        beg_range = sbuf.st_size;
                else
@@ -514,7 +514,7 @@ progressmeter(int flag)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $Id: wget.c,v 1.13 2000/12/09 16:55:35 andersen Exp $
+ *     $Id: wget.c,v 1.14 2000/12/18 03:08:29 kraai Exp $
  */
 
 
diff --git a/touch.c b/touch.c
index 59800b2..1b03075 100644 (file)
--- a/touch.c
+++ b/touch.c
@@ -58,12 +58,12 @@ extern int touch_main(int argc, char **argv)
                        if (create == FALSE && errno == ENOENT)
                                return EXIT_SUCCESS;
                        else {
-                               error_msg_and_die("%s", strerror(errno));
+                               perror_msg_and_die("%s", *argv);
                        }
                }
                close(fd);
                if (utime(*argv, NULL)) {
-                       error_msg_and_die("%s", strerror(errno));
+                       perror_msg_and_die("%s", *argv);
                }
                argc--;
                argv++;
index 4654dae..9b805ae 100644 (file)
--- a/utility.c
+++ b/utility.c
@@ -1470,7 +1470,7 @@ extern char * xstrndup (const char *s, int n) {
        char *t;
 
        if (s == NULL)
-               error_msg_and_die("xstrndup bug");
+               error_msg_and_die("xstrndup bug\n");
 
        t = xmalloc(n+1);
        strncpy(t,s,n);
diff --git a/wget.c b/wget.c
index 50b9aee..dbc2836 100644 (file)
--- a/wget.c
+++ b/wget.c
@@ -159,7 +159,7 @@ int wget_main(int argc, char **argv)
         */
        if (do_continue) {
                if (fstat(fileno(output), &sbuf) < 0)
-                       error_msg_and_die("fstat()");
+                       perror_msg_and_die("fstat()");
                if (sbuf.st_size > 0)
                        beg_range = sbuf.st_size;
                else
@@ -514,7 +514,7 @@ progressmeter(int flag)
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $Id: wget.c,v 1.13 2000/12/09 16:55:35 andersen Exp $
+ *     $Id: wget.c,v 1.14 2000/12/18 03:08:29 kraai Exp $
  */