This is the mail archive of the patchutils-list@sourceware.org mailing list for the patchutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Minor error output cleanup


Tim,

In looking through interdiff.c I noticed that the errors for "Bad patch"
had two forms: "Bad patch #N" and "Bad patchN".  It's a minor thing.  The
attached (untested) patch changes "Bad patchN" to "Bad patch #N".

Comments?

Eli
eli.carter@commprove.com
diff -urN --exclude=CVS patchutils-cvs/src/interdiff.c patchutils/src/interdiff.c
--- patchutils-cvs/src/interdiff.c	2005-05-11 10:21:47.000000000 -0500
+++ patchutils/src/interdiff.c	2006-10-24 10:19:25.000000000 -0500
@@ -714,15 +714,15 @@
 			oldnamelen = 0;
 		}
 		if (getline (&oldname, &oldnamelen, p1) < 0)
-			error (EXIT_FAILURE, errno, "Bad patch1");
+			error (EXIT_FAILURE, errno, "Bad patch #1");
 
 	} while (strncmp (oldname, "--- ", 4));
 	oldname[strlen (oldname) - 1] = '\0';
 
 	if (getline (&newname, &newnamelen, p1) < 0)
-		error (EXIT_FAILURE, errno, "Bad patch1");
+		error (EXIT_FAILURE, errno, "Bad patch #1");
 	if (strncmp (newname, "+++ ", 4))
-		error (EXIT_FAILURE, errno, "Bad patch1");
+		error (EXIT_FAILURE, errno, "Bad patch #1");
 	newname[strlen (newname) - 1] = '\0';
 	start = ftell (p1);
 
@@ -1019,7 +1019,7 @@
 			oldname = NULL;
 		}
 		if (getline (&oldname, &namelen, p1) < 0)
-			error (EXIT_FAILURE, errno, "Bad patch1");
+			error (EXIT_FAILURE, errno, "Bad patch #1");
 
 	} while (strncmp (oldname, "+++ ", 4));
 	oldname[strlen (oldname) - 1] = '\0';

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]