Path: blob/main/converters/mmencode/files/patch-codes.c
16171 views
--- codes.c.orig 1993-09-20 15:13:22.000000000 +02001+++ codes.c 2012-12-30 23:36:01.000000000 +01002@@ -15,6 +15,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE3#include <stdio.h>4#include <ctype.h>5#include <config.h>6+#include <string.h>78extern char *index();9static char basis_64[] =10@@ -46,7 +47,9 @@ char c;11/* the following gets a character, but fakes it properly into two chars if there's a newline character */12static int InNewline=0;1314-int nextcharin(infile, PortableNewlines)15+static void output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);16+17+static int nextcharin(infile, PortableNewlines)18FILE *infile;19int PortableNewlines;20{21@@ -69,6 +72,7 @@ int PortableNewlines;22#endif23}2425+void26to64(infile, outfile, PortableNewlines)27FILE *infile, *outfile;28int PortableNewlines;29@@ -97,6 +101,7 @@ int PortableNewlines;30fflush(outfile);31}3233+void34output64chunk(c1, c2, c3, pads, outfile)35FILE *outfile;36{37@@ -114,6 +119,7 @@ FILE *outfile;38}39}4041+static int42PendingBoundary(s, Boundaries, BoundaryCt)43char *s;44char **Boundaries;45@@ -140,6 +146,7 @@ int *BoundaryCt;46static int CRpending = 0;4748#ifdef NEWLINE_CHAR49+static void50almostputc(c, outfile, PortableNewlines)51int c;52FILE *outfile;53@@ -165,6 +172,7 @@ int PortableNewlines;54}55}56#else57+static void58almostputc(c, outfile, PortableNewlines)59int c;60FILE *outfile;61@@ -174,6 +182,7 @@ int PortableNewlines;62}63#endif6465+void66from64(infile, outfile, boundaries, boundaryct, PortableNewlines)67FILE *infile, *outfile;68char **boundaries;69@@ -275,6 +284,7 @@ char c;70}71*/7273+void74toqp(infile, outfile)75FILE *infile, *outfile;76{77@@ -350,6 +360,7 @@ FILE *infile, *outfile;78}79}8081+void82fromqp(infile, outfile, boundaries, boundaryct)83FILE *infile, *outfile;84char **boundaries;858687