summaryrefslogtreecommitdiff
path: root/japanese/today/files/patch-aa
blob: 88c0ae5a0f03fe01c0a898ec627e3b6e87ef50ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
#
# FreeBSD �Τ���Υѥå�
#
#
diff -c old/calendar.c new/calendar.c
*** old/calendar.c	Sun Jun 23 06:16:58 1996
--- new/calendar.c	Sun Jun 23 07:39:54 1996
***************
*** 37,43 ****
  #include "common.h"
  #include "config.h"
  #include "getfile.h"
! #include "getopt.h"
  #include "getsb.h"
  #include "kyureki.h"
  #include "main.h"
--- 37,45 ----
  #include "common.h"
  #include "config.h"
  #include "getfile.h"
! #ifndef __FreeBSD__
!   #include "getopt.h"
! #endif
  #include "getsb.h"
  #include "kyureki.h"
  #include "main.h"
***************
*** 960,966 ****
--- 962,972 ----
  /*
   * ���顼�ˤ��ץ���������ǽ���
   */
+ #ifndef __FreeBSD__
  void	terminate_program(int sig, int subcode)
+ #else
+ void	terminate_program(int sig)
+ #endif
  {
  	switch (sig) {
  	case TERM_MEMERROR:
diff -c old/common.h new/common.h
*** old/common.h	Sun Jun 23 06:17:24 1996
--- new/common.h	Sun Jun 23 06:07:18 1996
***************
*** 32,38 ****
  #define	MAXWIDTH	96			/* main.c */
  #define	MAXFNAMEBUF	23			/* misc.c ����ե�����̾ + '\0' */
  #define	MAXPATHNAME	100			/* main.c, pager.c */
! #define	BIG_ENDIAN				/* kyureki.c */
  #define	BITFIELD_USE_UNSIGNED_INT		/* kyureki.c */
  #define	OPEN_OPT	(O_RDONLY | O_BINARY)	/* kyureki.c */
  #define	UNDERLINE	((int)'_')		/* misc.c */
--- 32,38 ----
  #define	MAXWIDTH	96			/* main.c */
  #define	MAXFNAMEBUF	23			/* misc.c ����ե�����̾ + '\0' */
  #define	MAXPATHNAME	100			/* main.c, pager.c */
! #define	_BIG_ENDIAN				/* kyureki.c */
  #define	BITFIELD_USE_UNSIGNED_INT		/* kyureki.c */
  #define	OPEN_OPT	(O_RDONLY | O_BINARY)	/* kyureki.c */
  #define	UNDERLINE	((int)'_')		/* misc.c */
***************
*** 69,75 ****
  #define	MAXWIDTH	80			/* main.c */
  #define	MAXFNAMEBUF	13			/* misc.c ����ե�����̾ + '\0' */
  #define	MAXPATHNAME	90			/* main.c, pager.c */
! #define	LITTLE_ENDIAN				/* kyureki.c */
  #if defined(LSI_C)
  #define	BITFIELD_USE_UNSIGNED_INT		/* kyureki.c */
  #endif
--- 69,75 ----
  #define	MAXWIDTH	80			/* main.c */
  #define	MAXFNAMEBUF	13			/* misc.c ����ե�����̾ + '\0' */
  #define	MAXPATHNAME	90			/* main.c, pager.c */
! #define	_LITTLE_ENDIAN				/* kyureki.c */
  #if defined(LSI_C)
  #define	BITFIELD_USE_UNSIGNED_INT		/* kyureki.c */
  #endif
***************
*** 117,123 ****
  #define	MAXWIDTH	80			/* main.c */
  #define	MAXFNAMEBUF	256			/* misc.c 4.3BSD ����ե�����̾ + '\0' */
  #define	MAXPATHNAME	1024			/* main.c, pager.c */
! #define	BIG_ENDIAN				/* kyureki.c */
  #define	OPEN_OPT	(O_RDONLY)		/* kyureki.c */
  #define	UNDERLINE	((int)'_')		/* misc.c */
  #define	OUTFILE_DEFAULT	"%y%m%d.today"		/* pager.c */
--- 117,123 ----
  #define	MAXWIDTH	80			/* main.c */
  #define	MAXFNAMEBUF	256			/* misc.c 4.3BSD ����ե�����̾ + '\0' */
  #define	MAXPATHNAME	1024			/* main.c, pager.c */
! #define	_LITTLE_ENDIAN				/* kyureki.c */
  #define	OPEN_OPT	(O_RDONLY)		/* kyureki.c */
  #define	UNDERLINE	((int)'_')		/* misc.c */
  #define	OUTFILE_DEFAULT	"%y%m%d.today"		/* pager.c */
diff -c old/getfile.c new/getfile.c
*** old/getfile.c	Sun Jun 23 06:17:04 1996
--- new/getfile.c	Sun Jun 23 05:57:36 1996
***************
*** 11,16 ****
--- 11,19 ----
   *
   */
  
+ #ifdef __FreeBSD__
+   #include <unistd.h>
+ #endif
  #include "common.h"
  #include "getfile.h"
  
diff -c old/kyureki.c new/kyureki.c
*** old/kyureki.c	Sun Jun 23 06:17:09 1996
--- new/kyureki.c	Sun Jun 23 05:57:09 1996
***************
*** 11,16 ****
--- 11,19 ----
   *
   */
  
+ #ifdef __FreeBSD__
+   #include <unistd.h>
+ #endif
  #include "common.h"
  #include "main.h"
  #include "getfile.h"
***************
*** 32,38 ****
   * �����Ϥˤ�äƤ� 4bytes �ˤʤ�ʤ���礬���롣
   * �����ͤʻ��ϡ���¢����ơ��֥����Ѥ��롣
   */
! #ifdef BIG_ENDIAN
  #ifdef BITFIELD_USE_UNSIGNED_INT
  struct KYUREKI_T {
  	unsigned char	year;
--- 35,41 ----
   * �����Ϥˤ�äƤ� 4bytes �ˤʤ�ʤ���礬���롣
   * �����ͤʻ��ϡ���¢����ơ��֥����Ѥ��롣
   */
! #ifdef _BIG_ENDIAN
  #ifdef BITFIELD_USE_UNSIGNED_INT
  struct KYUREKI_T {
  	unsigned char	year;
***************
*** 55,61 ****
  };
  #endif
  #endif
! #ifdef LITTLE_ENDIAN
  #ifdef BITFIELD_USE_UNSIGNED_INT
  struct KYUREKI_T {
  	unsigned char	year;
--- 58,64 ----
  };
  #endif
  #endif
! #ifdef _LITTLE_ENDIAN
  #ifdef BITFIELD_USE_UNSIGNED_INT
  struct KYUREKI_T {
  	unsigned char	year;
diff -c old/main.c new/main.c
*** old/main.c	Sun Jun 23 06:17:16 1996
--- new/main.c	Sun Jun 23 06:28:20 1996
***************
*** 18,24 ****
  #include "date.h"
  #include "event.h"
  #include "getfile.h"
! #include "getopt.h"
  #include "history.h"
  #include "kyureki.h"
  #include "machine.h"
--- 18,26 ----
  #include "date.h"
  #include "event.h"
  #include "getfile.h"
! #ifndef __FreeBSD__
!   #include "getopt.h"
! #endif
  #include "history.h"
  #include "kyureki.h"
  #include "machine.h"
***************
*** 726,732 ****
--- 728,738 ----
  /*
   * ���󥿥�ץȤ䥨�顼�ˤ��ץ���������ǽ���
   */
+ #ifndef __FreeBSD__
  void	terminate_program(int sig, int subcode)
+ #else
+ void	terminate_program(int sig)
+ #endif
  {
  	switch (sig) {
  	case SIGINT:
diff -c old/main.h new/main.h
*** old/main.h	Sun Jun 23 06:17:29 1996
--- new/main.h	Sun Jun 23 06:24:07 1996
***************
*** 119,122 ****
--- 119,126 ----
  #endif /* #ifndef INCLUDE_CALENDAR */
  
  extern	void	errprint(const char *func, int level, const char *fmt, ...);
+ #ifndef __FreeBSD__
  extern	void	terminate_program(int sig, int subcode);
+ #else
+ extern	void	terminate_program(int sig);
+ #endif
diff -c old/misc.c new/misc.c
*** old/misc.c	Sun Jun 23 06:17:18 1996
--- new/misc.c	Sun Jun 23 06:33:03 1996
***************
*** 11,22 ****
   *
   */
  
  #include "common.h"
  #include "main.h"
  #include "getfile.h"
  #include "kyureki.h"
  #include "misc.h"
! 
  #ifndef INCLUDE_CALENDAR
  #define	JULIAN	1720994
  #define	MONTH	30.6001
--- 11,27 ----
   *
   */
  
+ #ifdef __FreeBSD__
+   #include <unistd.h>
+ #endif
  #include "common.h"
  #include "main.h"
  #include "getfile.h"
  #include "kyureki.h"
  #include "misc.h"
! #ifdef __FreeBSD__
!   #define strnicmp strncasecmp
! #endif
  #ifndef INCLUDE_CALENDAR
  #define	JULIAN	1720994
  #define	MONTH	30.6001
***************
*** 1105,1111 ****
--- 1110,1120 ----
  				sprintf(pbuf, "%06d", getpid() >> 4);
  				pb = pbuf + strlen(pbuf) - 5;
  #else /* #if defined(MSDOS) || defined(LSI_C) || defined(unix) */
+ #ifndef __FreeBSD__
  				sprintf(pbuf, "%05d", getpid());
+ #else
+ 				sprintf(pbuf, "%05ld", getpid());
+ #endif
  				pb = pbuf;
  #endif
  				for (i = 0; i < 5; i++) {
***************
*** 1280,1286 ****
--- 1289,1299 ----
  	buf = malloc(size);
  	if (buf == NULL) {
  		errprint("xmalloc", ERR_PANIC, "virtual memory exhausted, program stop.");
+ #ifndef __FreeBSD__
  		terminate_program(TERM_MEMERROR, 0);
+ #else
+ 		terminate_program(TERM_MEMERROR);
+ #endif
  	}
  	return (buf);
  }
diff -c old/pager.c new/pager.c
*** old/pager.c	Sun Jun 23 06:17:19 1996
--- new/pager.c	Sun Jun 23 05:56:31 1996
***************
*** 11,16 ****
--- 11,19 ----
   *
   */
  
+ #ifdef __FreeBSD__
+   #include <unistd.h>
+ #endif
  #include "common.h"
  #include "main.h"
  #include "getfile.h"	/* make_accesspath() */
***************
*** 34,40 ****
  static	int	line_count;
  static	FILE	*pager_fp = NULL;
  
! static	void	pause(void);
  
  /*
   * TODAY ���ϥե�����κ���
--- 37,43 ----
  static	int	line_count;
  static	FILE	*pager_fp = NULL;
  
! static	void	_pause(void);
  
  /*
   * TODAY ���ϥե�����κ���
***************
*** 109,115 ****
  	}
  	if (pager_cmd == NULL) {
  		if (pager_lastpause == YES) {
! 			pause();
  		}
  	} else {
  		sprintf(cmdbuf, "%s %s", pager_cmd, pager_file);
--- 112,118 ----
  	}
  	if (pager_cmd == NULL) {
  		if (pager_lastpause == YES) {
! 			_pause();
  		}
  	} else {
  		sprintf(cmdbuf, "%s %s", pager_cmd, pager_file);
***************
*** 168,174 ****
--- 171,181 ----
  		fputs(linebuffer, pager_fp);
  		if (fputc('\n', pager_fp) == EOF) {
  			errprint("pager_output", ERR_ERROR, "�ե�����(%s)�˽��ϤǤ��ޤ��� errno = %d", pager_file, errno);
+ #ifndef __FreeBSD__
  			terminate_program(TERM_FILEERROR, 0);
+ #else
+ 			terminate_program(TERM_FILEERROR);
+ #endif
  		}
  	}
  	if (pager_cmd != NULL) {
***************
*** 181,187 ****
  		line_count -= maxline;
  		if (line_count <= 0) {
  			line_count = screen_max_rows;
! 			pause();
  			line_count -= maxline;
  		}
  	}
--- 188,194 ----
  		line_count -= maxline;
  		if (line_count <= 0) {
  			line_count = screen_max_rows;
! 			_pause();
  			line_count -= maxline;
  		}
  	}
***************
*** 196,202 ****
   *      ����ˡ�unix �δĶ��ʤ鳰���ڡ�����������ɤ��Ȼפ�
   */
  static
! void	pause(void)
  {
  #if defined(human68k) || defined(MSDOS) || defined(LSI_C)
  	cprintf("\033[7m--- more ---\033[0m");
--- 203,209 ----
   *      ����ˡ�unix �δĶ��ʤ鳰���ڡ�����������ɤ��Ȼפ�
   */
  static
! void	_pause(void)
  {
  #if defined(human68k) || defined(MSDOS) || defined(LSI_C)
  	cprintf("\033[7m--- more ---\033[0m");
diff -c old/today.cnf new/today.cnf
*** old/today.cnf	Sun Jun 23 09:50:19 1996
--- new/today.cnf	Sun Jun 23 10:27:08 1996
***************
*** 214,220 ****
  #
  $common				# �ʹ� ���̴Ķ������
  
! #table_path = c:/tbl		# �ƥơ��֥�θ����ѥ�̾
  				# ';' �Ƕ��ڤ�ʣ�������ǽ
  				# ̤����ξ�硢�Ķ��ѿ� TODAYTBL �ξ��
  
--- 214,220 ----
  #
  $common				# �ʹ� ���̴Ķ������
  
! table_path = /usr/local/share/today	# �ƥơ��֥�θ����ѥ�̾
  				# ';' �Ƕ��ڤ�ʣ�������ǽ
  				# ̤����ξ�硢�Ķ��ѿ� TODAYTBL �ξ��
  
diff -c old/version.c new/version.c
*** old/version.c	Sun Jun 23 06:17:23 1996
--- new/version.c	Sun Jun 23 10:37:15 1996
***************
*** 28,33 ****
--- 28,34 ----
  const char	Version[] = "today " __DATE__ " version 2.10B (������)";
  const char	RCSid[] ="$Id: patch-aa,v 1.1.1.1 1996/10/18 15:04:50 asami Exp $";
  const char	UseLanguage[] =
+ #if !defined(TRANS)
  #if defined(human68k)
  #if defined(__GNUC__)
  	"gcc version 1.00 Tool#1(68020) Based on 1.42";
***************
*** 47,53 ****
  					/* by Sun-4/470 SunOS4.1.1+JLE1.1.1 */
  #endif
  #endif
  
  #ifdef TRANS
! const char	Modify[] = "Modified for ����̾/OS̾ by �ܿ���̾";
  #endif
--- 48,57 ----
  					/* by Sun-4/470 SunOS4.1.1+JLE1.1.1 */
  #endif
  #endif
+ #else
+         "gcc version 2.6.3";
+ #endif
  
  #ifdef TRANS
! const char	Modify[] = "Modified for FreeBSD2.0.5R by pcs51674@asciinet.or.jp";
  #endif
diff -c old/version.h new/version.h
*** old/version.h	Sun Jun 23 06:17:33 1996
--- new/version.h	Sun Jun 23 10:08:17 1996
***************
*** 11,17 ****
   *
   */
  
! /*#define	TRANS*/		/* ¾����ذܿ�������� define ���� */
  
  extern	const char	Copyright[];
  extern	const char	Version[];
--- 11,17 ----
   *
   */
  
! #define	TRANS		/* ¾����ذܿ�������� define ���� */
  
  extern	const char	Copyright[];
  extern	const char	Version[];