49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
$OpenBSD: patch-armor_c,v 1.1 2012/03/17 22:42:26 naddy Exp $
|
|
--- armor.c.orig Sat Mar 17 16:39:54 2012
|
|
+++ armor.c Sat Mar 17 16:40:45 2012
|
|
@@ -343,7 +343,7 @@ copyline(FILE * in, FILE * out)
|
|
* idea.
|
|
*/
|
|
static int
|
|
-getline(char *buf, int n, FILE * f)
|
|
+get_line(char *buf, int n, FILE * f)
|
|
{
|
|
int state;
|
|
char *p;
|
|
@@ -376,7 +376,7 @@ getline(char *buf, int n, FILE * f)
|
|
return 0; /* Out of buffer space */
|
|
}
|
|
} /* for (;;) */
|
|
-} /* getline */
|
|
+} /* get_line */
|
|
|
|
#if 1
|
|
/* This limit is advisory only; longer lines are handled properly.
|
|
@@ -547,7 +547,7 @@ armor_file(char *infilename, char *outfilename, char *
|
|
return 1;
|
|
}
|
|
fprintf(outFile, "-----BEGIN PGP SIGNED MESSAGE-----\n\n");
|
|
- while ((i = getline(buffer, sizeof buffer, clearFile)) >= 0) {
|
|
+ while ((i = get_line(buffer, sizeof buffer, clearFile)) >= 0) {
|
|
/* Quote lines beginning with '-' as per RFC1113;
|
|
* Also quote lines beginning with "From "; this is
|
|
* for Unix mailers which add ">" to such lines.
|
|
@@ -1231,7 +1231,7 @@ LANG("\n\007Unable to write ciphertext output file '%s
|
|
for (;;) {
|
|
++infile_line;
|
|
nline = status;
|
|
- status = getline(buf, sizeof buf, in);
|
|
+ status = get_line(buf, sizeof buf, in);
|
|
if (status < 0) {
|
|
fprintf(pgpout,
|
|
LANG("ERROR: ASCII armor decode input ended unexpectedly!\n"));
|
|
@@ -1249,7 +1249,7 @@ LANG("ERROR: ASCII armor decode input ended unexpected
|
|
/* Copy trailing part of line, if any. */
|
|
if (!status)
|
|
status = copyline(in, litout);
|
|
- /* Ignore error; getline will discover it again */
|
|
+ /* Ignore error; get_line will discover it again */
|
|
}
|
|
fflush(litout);
|
|
if (ferror(litout)) {
|