Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/converters/mmencode/files/patch-codes.c
16171 views
1
--- codes.c.orig 1993-09-20 15:13:22.000000000 +0200
2
+++ codes.c 2012-12-30 23:36:01.000000000 +0100
3
@@ -15,6 +15,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
4
#include <stdio.h>
5
#include <ctype.h>
6
#include <config.h>
7
+#include <string.h>
8
9
extern char *index();
10
static char basis_64[] =
11
@@ -46,7 +47,9 @@ char c;
12
/* the following gets a character, but fakes it properly into two chars if there's a newline character */
13
static int InNewline=0;
14
15
-int nextcharin(infile, PortableNewlines)
16
+static void output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
17
+
18
+static int nextcharin(infile, PortableNewlines)
19
FILE *infile;
20
int PortableNewlines;
21
{
22
@@ -69,6 +72,7 @@ int PortableNewlines;
23
#endif
24
}
25
26
+void
27
to64(infile, outfile, PortableNewlines)
28
FILE *infile, *outfile;
29
int PortableNewlines;
30
@@ -97,6 +101,7 @@ int PortableNewlines;
31
fflush(outfile);
32
}
33
34
+void
35
output64chunk(c1, c2, c3, pads, outfile)
36
FILE *outfile;
37
{
38
@@ -114,6 +119,7 @@ FILE *outfile;
39
}
40
}
41
42
+static int
43
PendingBoundary(s, Boundaries, BoundaryCt)
44
char *s;
45
char **Boundaries;
46
@@ -140,6 +146,7 @@ int *BoundaryCt;
47
static int CRpending = 0;
48
49
#ifdef NEWLINE_CHAR
50
+static void
51
almostputc(c, outfile, PortableNewlines)
52
int c;
53
FILE *outfile;
54
@@ -165,6 +172,7 @@ int PortableNewlines;
55
}
56
}
57
#else
58
+static void
59
almostputc(c, outfile, PortableNewlines)
60
int c;
61
FILE *outfile;
62
@@ -174,6 +182,7 @@ int PortableNewlines;
63
}
64
#endif
65
66
+void
67
from64(infile, outfile, boundaries, boundaryct, PortableNewlines)
68
FILE *infile, *outfile;
69
char **boundaries;
70
@@ -275,6 +284,7 @@ char c;
71
}
72
*/
73
74
+void
75
toqp(infile, outfile)
76
FILE *infile, *outfile;
77
{
78
@@ -350,6 +360,7 @@ FILE *infile, *outfile;
79
}
80
}
81
82
+void
83
fromqp(infile, outfile, boundaries, boundaryct)
84
FILE *infile, *outfile;
85
char **boundaries;
86
87