6
06 #include <sys/types.h>
7
07 #include <sys/stat.h>
16
16 #define EOF_OK TRUE
17
17 #define EOF_NOT_OK FALSE
19
19 /* global limits */
20
20 #define RULE_YEAR 2004 /* NOTE: should match the current year */
21
21 #define START_DATE "07Jan2004 00:00 UTC" /* first confirmation received */
22
22 #define MAX_COL 79 /* max column a line should hit */
23
23 #define MAX_BUILD_SIZE 521 /* max how to build size */
24
24 #define MAX_PROGRAM_SIZE 4096 /* max program source size */
25
25 #define MAX_PROGRAM_SIZE2 2048 /* max program source size not counting
26
26 whitespace and {}; not followed by
27
27 whitespace or EOF */
28
28 #define MAX_TITLE_LEN 31 /* max chars in the title */
29
29 #define MAX_ENTRY_LEN 1 /* max length in the entry input line */
30
30 #define MAX_ENTRY 8 /* max number of entries per person per year */
31
31 #define MAX_FILE_LEN 1024 /* max filename length for a info file */
33
33 /* where to send entries */
34
34 #define ENTRY_USER "e.2004"
35
35 #define ENTRY_HOST "ioccc.org"
37
37 /* uuencode process - assumes ASCII */
38
38 #define UUENCODE(c) ((c) ? encode_str[(int)(c)&0x3f] : '`')
39
39 #define UUENCODE_LEN 45 /* max uuencode chunk size */
40
40 #define UUINFO_MODE 0444 /* mode of an info file's uuencode file */
41
41 #define UUBUILD_MODE 0444 /* mode of the build file's uuencode file */
42
42 #define UUBUILD_NAME "build" /* name for the build file's uuencode file */
43
43 #define UUPROG_MODE 0444 /* mode of the program's uuencode file */
44
44 #define UUPROG_NAME "prog.c" /* name for the program's uuencode file */
46
46 /* encode_str[(char)val] is the uuencoded character of val */
47
47 char encode_str[] = "`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
49
49 /* global declarations */
50
50 char *program; /* our name */
51
51 long start_time; /* the startup time */
53
53 /* forward declarations */
54
54 void parse_args(int argc, char **argv, char **rname,
55
55 char **bname, char **pname, char **oname);
56
56 void usage(int exitval);
57
57 FILE *open_remark(char *filename);
58
58 FILE *open_build(char *filename);
59
59 FILE *open_program(char *filename);
b'\\ No newline at end of file'