head	1.3;
access;
symbols
	RELEASE_8_3_0:1.3
	RELEASE_9_0_0:1.3
	RELEASE_7_4_0:1.2
	RELEASE_8_2_0:1.2
	RELEASE_6_EOL:1.2
	RELEASE_8_1_0:1.2
	RELEASE_7_3_0:1.2
	RELEASE_8_0_0:1.2
	RELEASE_7_2_0:1.2
	RELEASE_7_1_0:1.2
	RELEASE_6_4_0:1.2
	RELEASE_5_EOL:1.2
	RELEASE_7_0_0:1.2
	RELEASE_6_3_0:1.2
	PRE_XORG_7:1.2
	RELEASE_4_EOL:1.2
	RELEASE_6_2_0:1.1.1.1
	RELEASE_6_1_0:1.1.1.1
	RELEASE_5_5_0:1.1.1.1
	RELEASE_6_0_0:1.1.1.1
	RELEASE_5_4_0:1.1.1.1
	RELEASE_4_11_0:1.1.1.1
	RELEASE_5_3_0:1.1.1.1
	RELEASE_4_10_0:1.1.1.1
	RELEASE_5_2_1:1.1.1.1
	RELEASE_5_2_0:1.1.1.1
	RELEASE_4_9_0:1.1.1.1
	RELEASE_5_1_0:1.1.1.1
	RELEASE_4_8_0:1.1.1.1
	RELEASE_5_0_0:1.1.1.1
	RELEASE_4_7_0:1.1.1.1
	RELEASE_4_6_2:1.1.1.1
	RELEASE_4_6_1:1.1.1.1
	RELEASE_4_6_0:1.1.1.1
	RELEASE_5_0_DP1:1.1.1.1
	RELEASE_4_5_0:1.1.1.1
	RELEASE_4_4_0:1.1.1.1
	RELEASE_4_3_0:1.1.1.1
	RELEASE_4_2_0:1.1.1.1
	RELEASE_4_1_1:1.1.1.1
	RELEASE_4_1_0:1.1.1.1
	RELEASE_3_5_0:1.1.1.1
	RELEASE_4_0_0:1.1.1.1
	RELEASE_3_4_0:1.1.1.1
	RELEASE_3_3_0:1.1.1.1
	RELEASE_3_2_0:1.1.1.1
	RELEASE_3_1_0:1.1.1.1
	RELEASE_2_2_8:1.1.1.1
	RELEASE_3_0_0:1.1.1.1
	RELEASE_2_2_7:1.1.1.1
	RELEASE_2_2_6:1.1.1.1
	RELEASE_2_2_5:1.1.1.1
	RELEASE_2_2_1:1.1.1.1
	RELEASE_2_2_2:1.1.1.1
	c2t_1_0:1.1.1.1
	OBRIEN:1.1.1;
locks; strict;
comment	@# @;


1.3
date	2011.09.05.06.27.14;	author vanilla;	state Exp;
branches;
next	1.2;

1.2
date	2006.12.19.18.52.54;	author arved;	state Exp;
branches;
next	1.1;

1.1
date	97.02.08.00.02.30;	author obrien;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	97.02.08.00.02.30;	author obrien;	state Exp;
branches;
next	;


desc
@@


1.3
log
@Fix build error with clang.
@
text
@--- c2t.c.orig	1993-02-24 14:29:23.000000000 +0800
+++ c2t.c	2011-09-05 14:25:34.000000000 +0800
@@@@ -18,14 +18,18 @@@@
 
 #define MEMAREA 4096 /* max number of lines in DICT file, wc -l DICT */
 
-main(argc, argv)
+int main(argc, argv)
 int argc;
 char **argv;
 {
+#ifndef CHINDICT
   char *DICT="/home/ftp/software/unix/X-Window/cxterm-dictionary/TONEPY.tit";
+#else
+  char *DICT=CHINDICT;
+#endif
   register int eka=0, toka=0, i=0;
   register char hz[4], **pipo=0;
-  register char **taulu=0, rivi[82];
+  char **taulu=0, rivi[82];
   register int rpit=0, tila=0, rraja=0, mulpin=0;
   int monitila=0;
   FILE *piffi=0;
@@@@ -57,12 +61,12 @@@@ char **argv;
 	   i =0;
 	} /*if argc > 1 */	
   if ((piffi = fopen (DICT, "r")) == 0) {
-    printf (stderr, "Error: unable to open pinyin dictionnary %s\n",
+    fprintf (stderr, "Error: unable to open pinyin dictionnary %s\n",
 	    DICT);
     exit (-1);
   }
   if ((taulu = (char **)malloc (MEMAREA*sizeof(char *))) == 0) {
-    printf (stderr, "Error: out of memory when allocating taulu(MEMAREA too large)\n");
+    fprintf (stderr, "Error: out of memory when allocating taulu(MEMAREA too large)\n");
     exit (-2);
   }
   pipo = taulu;
@@@@ -81,13 +85,13 @@@@ char **argv;
     } else {
       if (rivi[0] == '#') continue;
       if ((*pipo = (char *)malloc (rpit+8)) == 0) {
-	printf (stderr, "Error: out of memory when allocating *pipo\n");
+	fprintf (stderr, "Error: out of memory when allocating *pipo\n");
 	exit (-3);
       }
       strcpy (*pipo, rivi);
       pipo++;
       if (++rraja >= MEMAREA) {
-	printf (stderr, "Error: out of memory when allocating *pipo(MEMAREA too small)...\n");
+	fprintf (stderr, "Error: out of memory when allocating *pipo(MEMAREA too small)...\n");
 	exit (-4);
       }
     }
@


1.2
log
@Fix build with gcc41
@
text
@d1 8
a8 3
--- c2t.c.orig	Wed Feb 24 07:29:23 1993
+++ c2t.c	Tue Dec 19 19:51:28 2006
@@@@ -22,10 +22,14 @@@@
d24 31
@


1.1
log
@Initial revision
@
text
@d1 3
a3 3
--- c2t.c.orig	Tue Feb  4 02:10:45 1997
+++ c2t.c	Tue Feb  4 02:08:55 1997
@@@@ -22,7 +22,11 @@@@
d14 5
a18 1
   register char **taulu=0, rivi[82];
@


1.1.1.1
log
@c2t (chinese2text) translates GB/Big5 encoding to tone pinyin.
@
text
@@
