]> git.pld-linux.org Git - packages/chessprn.git/blob - chessprn.diff
- tabs in preamble
[packages/chessprn.git] / chessprn.diff
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
4 @@ -1,3 +1,7 @@
5 +** 8/6/99 - Updated for Linux Redhat 6.0
6 +       - ChessPrn 1.0.1 by Kayvan A. Sylvan
7 +       - Fixed @special output bug.
8 +
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
15 @@ -683,7 +683,7 @@
16  {
17    char *outBuf;
18    int mallocErr=0,i;
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; }
22    else
23     { strcpy(outBuf,string);
24 @@ -902,7 +902,7 @@
25    if (type != T_COMMENT)
26      (void) fprintf(dr->outfile, " \\nochess");
27  
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; }
31    else
32     { strcpy(outBuf,string);
33 @@ -1587,8 +1587,7 @@
34  
35    tmp = (format *) malloc (sizeof(format));
36    ALLOCP(tmp);
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;
43 @@ -1791,4 +1790,3 @@
44    dr->intrupt = FALSE;
45    dr->newline=FALSE;
46  }
47 -\1a
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
53 @@ -6,6 +6,14 @@
54  %{
55  #include <stdio.h>
56  #include <string.h>
57 +#include "config.h"
58 +#include "chesstyp.h"
59 +#include "notation.h"
60 +#include "movedo.h"
61 +#include "movegen.h"
62 +#include "drivers.h"
63 +#include "lexer.h"
64 +extern format *dr;
65  /* Damn Borland */
66  #ifdef __TURBOC__
67  #define fileno(f)       ((f)->fd)
68 @@ -65,6 +73,14 @@
69  "ep"|"e\.p\."           { /* comment */ ; parse_comment("ep"); }
70  
71  \$[a-z][a-z][a-z]       { /* game comment */ ; parse_comment(yytext); }
72 +@special               {
73 +                       int c;
74 +
75 +                       while (((c = input()) != 0) && (c != '\n'))
76 +                               (void) putc(c, dr->outfile);
77 +                       (void) putc('\n', dr->outfile);
78 +                       }
79 +
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
86 @@ -8,9 +8,9 @@
87                 movegen.h movedo.h \
88                 config.h chesstyp.h chesssym.def
89  
90 -LIBDIR = .
91 -LIBTEX = .
92 -BINDIR = .
93 +LIBDIR = /usr/lib/games/chessprn
94 +LIBTEX = $(LIBDIR)/tex
95 +BINDIR = /usr/bin
96  
97  #LIBDIR     = $(HOME)/lib
98  #LIBTEX    = $(HOME)/lib/tex
99 @@ -53,7 +53,7 @@
100  # to compile with TURBO C or ANSI C, define TURBOC
101  
102  #For UNIX et al
103 -CFLAGS     = -O2 \
104 +CFLAGS     = -g \
105         -DLIB_DIR=\"$(LIBDIR)/\" \
106         -DIN_LANG=ENGLISH \
107         -DOUT_LANG=ENGLISH
108 @@ -71,7 +71,7 @@
109  DEL = rm -f
110  #DEL = del
111  
112 -CC= gcc -ansi -pedantic
113 +CC= gcc -pedantic
114  #CC = tcc +chessprn.cfg
115  
116  ############################################################
117 @@ -90,7 +90,7 @@
118         $(LEX) -t lexer.l > lexer.c
119  
120  chessprn: $(OBJECTS)
121 -       $(CC) $(CFLAGS) $(OUTNAME) $(OBJECTS)
122 +       $(CC) $(CFLAGS) $(OUTNAME) $(OBJECTS) -lfl
123  
124  ## ALL FILES
125  
126 @@ -102,8 +102,9 @@
127  
128  install:
129         make files
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
141 @@ -46,8 +46,7 @@
142  
143    tmp = (game *) malloc (sizeof(game));
144    ALLOCP(tmp);
145 -  for (i=0; i < ((sizeof (game))/ sizeof (int)) ; i++)
146 -    ((int *) tmp)[i] = 0;
147 +  memset(tmp, '\0', sizeof(game));
148    return(tmp);
149  }
150  
151 @@ -107,8 +106,7 @@
152  
153    tmp = (depl *) malloc (sizeof(depl));
154    ALLOCP(tmp);
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;
160    tmp->move = 0;
161 @@ -203,11 +201,15 @@
162       depl * d;
163  #endif
164  {
165 -  depl *temp;
166 -  for(;d!=NULL;temp=d,d=d->next,free(temp))
167 -       if(d->sub!=NULL)
168 -          free_move_list(d->sub);
169 -
170 +  if (d != MULL)
171 +  {
172 +    if (d->sub != MULL)
173 +      free_move_list(d->sub);
174 +    d->sub = MULL;
175 +    if (d->next != MULL)
176 +      free_move_list(d->next);
177 +    d->next = MULL;
178 +  }
179  }
180  
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
185 @@ -1,6 +1,6 @@
186  /*
187    ChessPrn program
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
192   */
193 @@ -45,7 +45,7 @@
194  extern void close_files();
195  
196  char * version_string =
197 -  "@(#)ChessPrn 1.0 Dated 3/93\n";
198 +  "@(#)ChessPrn 1.0.1 Dated 8/99\n";
199  
200  
201  static char * keywords[]= {
202 @@ -783,11 +783,6 @@
203      in_language = find_keyword (t_language, NBLANGUAGES, in_language,
204                                text,TRUE);
205      associe_traduction( &in_table, in_language);
206 -    break;
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);
211      break;
212    case KNULL:
213      break;
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
217 @@ -20,4 +20,3 @@
218  -v             : shows version number
219  -n             : suppress final board display
220  -column        : output moves in column form. (default is linear)
221 -\1a
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
226 @@ -15,7 +15,7 @@
227  % Redefine chess.sty to get similar layout as in Informator
228  \makeatletter
229  \gdef\@dots{\ldots}
230 -\resetat
231 +\makeatother
232  %
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)
This page took 0.093485 seconds and 3 git commands to generate.