1 diff -u -r chessprn/changes chessprn.new/changes
2 --- chessprn/changes Tue Apr 6 07:48:38 1993
3 +++ chessprn.new/changes Mon Aug 9 10:51:37 1999
5 +** 8/6/99 - Updated for Linux Redhat 6.0
6 + - ChessPrn 1.0.1 by Kayvan A. Sylvan
7 + - Fixed @special output bug.
9 ** 04/01/93 - April Fools!
10 - ChessPrn 1.0 changed from Notation 4.7 by Henry Thomas
11 - Lots of changes (Break out the Raid. Lots of bugs killed.)
12 diff -u -r chessprn/drivers.c chessprn.new/drivers.c
13 --- chessprn/drivers.c Tue Apr 6 07:48:48 1993
14 +++ chessprn.new/drivers.c Mon Aug 9 10:51:37 1999
19 - if((outBuf = (char *)malloc(sizeof(char)*strlen(string)))==NULL)
20 + if((outBuf = (char *)malloc(sizeof(char)*(strlen(string) + 1)))==NULL)
21 { outBuf=string; mallocErr=1; }
23 { strcpy(outBuf,string);
25 if (type != T_COMMENT)
26 (void) fprintf(dr->outfile, " \\nochess");
28 - if((outBuf = (char *)malloc(sizeof(char)*strlen(string)))==NULL)
29 + if((outBuf = (char *)malloc(sizeof(char)*(strlen(string) + 1)))==NULL)
30 { outBuf=string; mallocErr=1; }
32 { strcpy(outBuf,string);
35 tmp = (format *) malloc (sizeof(format));
37 - for (i=0; i < ((sizeof (format))/ sizeof (int)) ; i++)
38 - ((int *) tmp)[i] = 0;
39 + memset(tmp, '\0', sizeof(format));
40 tmp->output_move_format = SHORTENED;
41 tmp->print_headers = TRUE;
42 tmp->outfile = stdout;
48 \ No newline at end of file
49 Only in chessprn: lexer.c
50 diff -u -r chessprn/lexer.l chessprn.new/lexer.l
51 --- chessprn/lexer.l Tue Apr 6 07:49:13 1993
52 +++ chessprn.new/lexer.l Mon Aug 9 10:51:37 1999
58 +#include "chesstyp.h"
59 +#include "notation.h"
67 #define fileno(f) ((f)->fd)
69 "ep"|"e\.p\." { /* comment */ ; parse_comment("ep"); }
71 \$[a-z][a-z][a-z] { /* game comment */ ; parse_comment(yytext); }
75 + while (((c = input()) != 0) && (c != '\n'))
76 + (void) putc(c, dr->outfile);
77 + (void) putc('\n', dr->outfile);
80 @[a-z]+\{ { /* keyword with arg */
81 yytext[yyleng -1] = '\0' ;
82 parse_keyword(yytext, comment('}','{'));
83 diff -u -r chessprn/makefile chessprn.new/makefile
84 --- chessprn/makefile Tue Apr 6 07:51:49 1993
85 +++ chessprn.new/makefile Mon Aug 9 10:51:37 1999
88 config.h chesstyp.h chesssym.def
93 +LIBDIR = /usr/lib/games/chessprn
94 +LIBTEX = $(LIBDIR)/tex
98 #LIBTEX = $(HOME)/lib/tex
100 # to compile with TURBO C or ANSI C, define TURBOC
105 -DLIB_DIR=\"$(LIBDIR)/\" \
112 -CC= gcc -ansi -pedantic
114 #CC = tcc +chessprn.cfg
116 ############################################################
118 $(LEX) -t lexer.l > lexer.c
121 - $(CC) $(CFLAGS) $(OUTNAME) $(OBJECTS)
122 + $(CC) $(CFLAGS) $(OUTNAME) $(OBJECTS) -lfl
130 - $(COPY) notation $(BINDIR)
131 - $(COPY) chesssymb.tex $(LIBTEX)
132 + -mkdir $(BINDIR) $(LIBDIR) $(LIBTEX)
133 + $(COPY) chessprn $(BINDIR)
134 + $(COPY) chesssym.tex $(LIBTEX)
135 $(COPY) notation.tex $(LIBTEX)
136 $(COPY) notation.hlp $(LIBDIR)
137 $(COPY) notation.doc $(LIBDIR)
138 diff -u -r chessprn/movedo.c chessprn.new/movedo.c
139 --- chessprn/movedo.c Tue Apr 6 07:48:53 1993
140 +++ chessprn.new/movedo.c Mon Aug 9 10:51:37 1999
143 tmp = (game *) malloc (sizeof(game));
145 - for (i=0; i < ((sizeof (game))/ sizeof (int)) ; i++)
146 - ((int *) tmp)[i] = 0;
147 + memset(tmp, '\0', sizeof(game));
153 tmp = (depl *) malloc (sizeof(depl));
155 - for (i=0; i < ((sizeof (depl))/ sizeof (int)) ; i++)
156 - ((int *) tmp)[i] = 0;
157 + memset(tmp, '\0', sizeof(depl));
158 tmp->uid = ++counter;
159 tmp->whiteturn = FALSE;
161 @@ -203,11 +201,15 @@
166 - for(;d!=NULL;temp=d,d=d->next,free(temp))
168 - free_move_list(d->sub);
172 + if (d->sub != MULL)
173 + free_move_list(d->sub);
175 + if (d->next != MULL)
176 + free_move_list(d->next);
181 /* procedure update board g with move m */
182 diff -u -r chessprn/notation.c chessprn.new/notation.c
183 --- chessprn/notation.c Tue Apr 6 07:48:59 1993
184 +++ chessprn.new/notation.c Mon Aug 9 10:51:37 1999
188 - @(#)notation.c 1.0 Dated 3/93
189 + @(#)notation.c 1.0.1 Dated 8/99
190 Copyright (C) 1993 Ed Maillet
191 Modified and based on Notation 4.7 by Henry Thomas
194 extern void close_files();
196 char * version_string =
197 - "@(#)ChessPrn 1.0 Dated 3/93\n";
198 + "@(#)ChessPrn 1.0.1 Dated 8/99\n";
201 static char * keywords[]= {
203 in_language = find_keyword (t_language, NBLANGUAGES, in_language,
205 associe_traduction( &in_table, in_language);
207 - case SPECIAL: /* all input, up to \n is copied to output */
208 - while ((( c = getc(infile)) != EOF) && (c != '\n'))
209 - (void) putc (c,dr->outfile);
210 - putc ('\n', dr->outfile);
214 diff -u -r chessprn/notation.hlp chessprn.new/notation.hlp
215 --- chessprn/notation.hlp Tue Apr 6 07:49:12 1993
216 +++ chessprn.new/notation.hlp Mon Aug 9 10:51:37 1999
218 -v : shows version number
219 -n : suppress final board display
220 -column : output moves in column form. (default is linear)
222 \ No newline at end of file
223 diff -u -r chessprn/notation.tex chessprn.new/notation.tex
224 --- chessprn/notation.tex Tue Apr 6 07:49:23 1993
225 +++ chessprn.new/notation.tex Mon Aug 9 10:51:40 1999
227 % Redefine chess.sty to get similar layout as in Informator
233 % These macros allows a move number to be bolfaced in the main line,
234 % and typset in roman in the variations (like in Informant)