summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-05 18:20:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-08-05 18:20:34 +0000
commiteb53594c2f935a4976ac6c589ee1d838ee0e6757 (patch)
treecbc455028a6b9e2297ff02ef46602bdbb9ee6267
parent829169b273b246e73b00f5574395b8f06efa47a1 (diff)
spacing
-rw-r--r--usr.bin/patch/inp.c16
-rw-r--r--usr.bin/patch/pch.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c
index a2fb5dc0f20..93b6d559366 100644
--- a/usr.bin/patch/inp.c
+++ b/usr.bin/patch/inp.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: inp.c,v 1.23 2003/08/05 18:13:43 otto Exp $ */
+/* $OpenBSD: inp.c,v 1.24 2003/08/05 18:20:33 deraadt Exp $ */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: inp.c,v 1.23 2003/08/05 18:13:43 otto Exp $";
+static const char rcsid[] = "$OpenBSD: inp.c,v 1.24 2003/08/05 18:20:33 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -194,7 +194,7 @@ plan_a(const char *filename)
}
if (i_size > SIZE_MAX) {
say("block too large to mmap\n");
- return false;
+ return false;
}
if ((ifd = open(filename, O_RDONLY)) < 0)
pfatal("can't open file %s", filename);
@@ -214,7 +214,7 @@ plan_a(const char *filename)
/* test for NUL too, to maintain the behavior of the original code */
for (i = 0; i < i_size && i_womp[i] != '\0'; i++) {
if (i_womp[i] == '\n')
- iline++;
+ iline++;
}
if (i_size > 0 && i_womp[i_size - 1] != '\n')
iline++;
@@ -222,11 +222,11 @@ plan_a(const char *filename)
i_ptr = (char **) malloc((iline + 2) * sizeof(char *));
- if (i_ptr == NULL) { /* shucks, it was a near thing */
+ if (i_ptr == NULL) { /* shucks, it was a near thing */
munmap(i_womp, i_size);
i_womp = NULL;
- return false;
- }
+ return false;
+ }
/* now scan the buffer and build pointer array */
iline = 1;
@@ -248,7 +248,7 @@ plan_a(const char *filename)
i_womp = NULL;
return false;
}
-
+
memcpy(p, i_ptr[iline], sz);
p[sz] = '\n';
i_ptr[iline] = p;
diff --git a/usr.bin/patch/pch.c b/usr.bin/patch/pch.c
index 5f5f976b3a1..075dbe35976 100644
--- a/usr.bin/patch/pch.c
+++ b/usr.bin/patch/pch.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: pch.c,v 1.28 2003/08/01 20:30:48 otto Exp $ */
+/* $OpenBSD: pch.c,v 1.29 2003/08/05 18:20:33 deraadt Exp $ */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: pch.c,v 1.28 2003/08/01 20:30:48 otto Exp $";
+static const char rcsid[] = "$OpenBSD: pch.c,v 1.29 2003/08/05 18:20:33 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -499,7 +499,7 @@ another_hunk(void)
p_end++;
if (p_end >= hunkmax)
fatal("Internal error: hunk larger than hunk "
- "buffer size");
+ "buffer size");
p_char[p_end] = *buf;
p_line[p_end] = NULL;
switch (*buf) {
@@ -1181,7 +1181,7 @@ pch_swap(void)
n++;
}
if (p_char[0] != '=')
- fatal("Malformed patch at line %ld: expected '=' found '%c'\n",
+ fatal("Malformed patch at line %ld: expected '=' found '%c'\n",
p_input_line, p_char[0]);
p_char[0] = '*';
for (s = p_line[0]; *s; s++)
@@ -1191,8 +1191,8 @@ pch_swap(void)
/* now turn the old into the new */
if (p_char[0] != '*')
- fatal("Malformed patch at line %ld: expected '*' found '%c'\n",
- p_input_line, p_char[0]);
+ fatal("Malformed patch at line %ld: expected '*' found '%c'\n",
+ p_input_line, p_char[0]);
tp_char[0] = '=';
for (s = tp_line[0]; *s; s++)
if (*s == '*')
@@ -1207,8 +1207,8 @@ pch_swap(void)
if (i != p_ptrn_lines + 1)
fatal("Malformed patch at line %ld: expected %ld lines, "
- "got %ld\n",
- p_input_line, p_ptrn_lines + 1, i);
+ "got %ld\n",
+ p_input_line, p_ptrn_lines + 1, i);
i = p_ptrn_lines;
p_ptrn_lines = p_repl_lines;