|
rt,我的修改是:
1、不用每个程序都说明c文件
2、*2fcitx程序都编译
3、加#include <ctype.h>,免去一个关于找不到isalpha()的warning
4、不要include "../... .c",这样不好
- --- fcitx-3.2.1/tools/Makefile.am 2006-06-22 22:49:18.000000000 +0800
- +++ fcitx-3.2.1/tools/Makefile.am 2006-07-15 15:51:32.000000000 +0800
- @@ -1,10 +1,10 @@
- toolsdir = $(pkgdatadir)/tools
- INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/lib
-
- -bin_PROGRAMS = mb2txt txt2mb createPYMB
- -mb2txt_SOURCES = mb2txt.c
- -txt2mb_SOURCES = txt2mb.c
- -createPYMB_SOURCES = createPYMB.c
- +bin_PROGRAMS = mb2txt txt2mb createPYMB jd2fcitx pyjj2fcitx win2fcitx
- +
- +createPYMB_LDADD = ../src/pyParser.o ../src/pyMapTable.o ../src/PYFA.o ../src/sp.o
- +pyjj2fcitx_LDADD = ../src/pyParser.o ../src/pyMapTable.o ../src/PYFA.o ../src/sp.o
-
- all:
- ./txt2mb $(srcdir)/../data/cj.txt ../data/cj.mb
- --- fcitx-3.2.1/tools/createPYMB.c 2006-06-06 22:16:37.000000000 +0800
- +++ fcitx-3.2.1/tools/createPYMB.c 2006-07-15 15:49:35.000000000 +0800
- @@ -20,11 +20,12 @@
- #include <stdio.h>
- #include <string.h>
-
- -#define PARSE_INPUT_SYSTEM ' '
- -#include "../src/pyParser.c"
- -#include "../src/pyMapTable.c"
- -#include "../src/PYFA.c"
- -#include "../src/sp.c"
- +#include "pyParser.h"
- +#include "pyMapTable.h"
- +#include "PYFA.h"
- +#include "sp.h"
- +
- +extern PYTABLE PYTable[];
-
- FILE *fps, *fpt, *fp1, *fp2;
- Bool bSingleHZMode = False;
- @@ -143,7 +144,7 @@
- if (strlen (strPhrase) < 3)
- continue;
-
- - ParsePY (strPY, &strTemp, (PYPARSEINPUTMODE)PARSE_INPUT_SYSTEM);
- + ParsePY (strPY, &strTemp, PY_PARSE_INPUT_SYSTEM);
- s2++;
- kkk = 0;
- //printf("%s %s %s %d\n",strPY,strPhrase,strTemp.strMap,strTemp.iHZCount);
- @@ -249,7 +250,7 @@
- fscanf (fps, "%s", strPY);
- fscanf (fps, "%s\n", strHZ);
-
- - if (MapPY (strPY, strMap, (PYPARSEINPUTMODE)PARSE_INPUT_SYSTEM)) {
- + if (MapPY (strPY, strMap, PY_PARSE_INPUT_SYSTEM)) {
- for (i = 0; i < iBaseCount; i++)
- if ((!strcmp (PYTable[i].strPY, strPY)) && PYTable[i].pMH == NULL)
- YY[i] += 1;
- --- fcitx-3.2.1/tools/jd2fcitx.c 2006-06-20 20:48:55.000000000 +0800
- +++ fcitx-3.2.1/tools/jd2fcitx.c 2006-07-15 15:50:57.000000000 +0800
- @@ -1,5 +1,6 @@
- #include <stdio.h>
- #include <string.h>
- +#include <ctype.h>
-
- int main(int argc, char *argv[])
- {
- @@ -31,7 +32,6 @@
- }
-
- fprintf(stderr,"Total: %d\n",s);
- - fcloseall();
-
- return 0;
- }
- --- fcitx-3.2.1/tools/pyjj2fcitx.c 2006-06-06 22:16:37.000000000 +0800
- +++ fcitx-3.2.1/tools/pyjj2fcitx.c 2006-07-15 15:51:06.000000000 +0800
- @@ -21,10 +21,11 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- -#include "../src/pyParser.c"
- -#include "../src/pyMapTable.c"
- -#include "../src/PYFA.c"
- -#include "../src/sp.c"
- +#include <ctype.h>
- +#include "pyParser.h"
- +#include "pyMapTable.h"
- +#include "PYFA.h"
- +#include "sp.h"
-
- Bool bSingleHZMode = False;
- Bool bFullPY = False;
- --- fcitx-3.2.1/tools/win2fcitx.c 2006-06-06 22:16:37.000000000 +0800
- +++ fcitx-3.2.1/tools/win2fcitx.c 2006-07-15 15:51:14.000000000 +0800
- @@ -24,6 +24,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- +#include <ctype.h>
-
- int main (int argc, char *argv[])
- {
复制代码 |
|