shithub: mc

Download patch

ref: f125cfb585a80fb1121da1f2b81cfbc319a1c1ac
parent: 143601ffb36cd85a3469552ba79cfb192ef95958
author: Ori Bernstein <[email protected]>
date: Thu Dec 25 19:00:48 EST 2014

Put newlines at the end of fail messages.

--- a/myrbuild/myrbuild.c
+++ b/myrbuild/myrbuild.c
@@ -132,10 +132,10 @@
     pid = fork();
     status = 0;
     if (pid == -1) {
-        fail(1, "Could not fork");
+        fail(1, "Could not fork\n");
     } else if (pid == 0) {
         if (execvp(cmd[0], cmd) == -1)
-            fail(1, "Failed to exec %s", cmd[0]);
+            fail(1, "Failed to exec %s\n", cmd[0]);
     } else {
         waitpid(pid, &status, 0);
     }
@@ -150,7 +150,7 @@
     struct stat from_sb, to_sb;
 
     if (stat(from, &from_sb))
-        fail(1, "Could not find %s", from);
+        fail(1, "Could not find %s\n", from);
     if (stat(to, &to_sb) == -1)
         return 0;
 
@@ -203,7 +203,7 @@
 
     f = fopen(file, "r");
     if (!f)
-        fail(1, "Could not open file \"%s\"", file);
+        fail(1, "Could not open file \"%s\"\n", file);
 
     i = 0;
     while (fgets(buf, sizeof buf, f)) {
@@ -251,7 +251,7 @@
     ndeps = 0;
     use = openlib(lib);
     if (fgetc(use) != 'U')
-        fail(1, "library \"%s\" is not a usefile.", lib);
+        fail(1, "library \"%s\" is not a usefile.\n", lib);
     /* we don't care about the usefile's name */
     free(rdstr(use));
     while (fgetc(use) == 'L') {