summaryrefslogtreecommitdiff
path: root/japanese/sjxa/files/patch-aa
blob: c66a314650b7dc98176560d5b4dcb20c158aba72 (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
diff -arcN ../sjxa-1.5.11.org/CONFIG ./CONFIG
*** ../sjxa-1.5.11.org/CONFIG	Wed Jun 21 14:20:18 1995
--- ./CONFIG	Mon Aug 12 17:23:42 1996
***************
*** 94,105 ****
  
  #elif defined(FreeBSDArchitecture)		/**/
  
  #define HasSjisLocale		NO
  #define HasJlsFunction		NO
  #define UseXIMCP		YES
  #define UseXIMP			YES
  #define UseXLC			YES
! #define ManDir			/usr/share/man/man1
  
  #elif defined(SGIArchitecture)			/**/
  
--- 94,117 ----
  
  #elif defined(FreeBSDArchitecture)		/**/
  
+ /*
+  * Change some default value and add some variables.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
+ /* #define UseInstalledSj3Lib	YES */
+ /* #define Sj3LibDir		/usr/local/lib */
  #define HasSjisLocale		NO
  #define HasJlsFunction		NO
  #define UseXIMCP		YES
  #define UseXIMP			YES
  #define UseXLC			YES
! #define UseSJX			NO
! #define JapaneseManLocale	eucJP
! #define JapaneseManDir		/usr/X11R6/man/ja/man1
! #define ManDir			/usr/X11R6/man/man1
! #define SjxaBinDir		/usr/X11R6/bin
! #define SjxaAppDir		/usr/X11R6/lib/X11
! #define SjxarkDir		/usr/X11R6/lib/X11/sjxa
  
  #elif defined(SGIArchitecture)			/**/
  
diff -arcN ../sjxa-1.5.11.org/Imakefile ./Imakefile
*** ../sjxa-1.5.11.org/Imakefile	Tue Apr 11 21:11:07 1995
--- ./Imakefile	Mon Aug 12 18:28:43 1996
***************
*** 27,32 ****
--- 27,37 ----
  Sony Corporation.
  */
  
+ /*
+  * Change some make rules.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
+ 
  #ifdef ManDir
  #undef ManDir
  #endif
***************
*** 70,76 ****
         SJ3LIBOBJ = Sj3lib.o
  #endif
  #ifdef Sj3LibDir
!       SJ3LIB_DIR = Concat(-L,Sj3LibDir)
  #endif
  #if UseXIMCP
         USE_XIMCP = -DUSE_XIMCP
--- 75,83 ----
         SJ3LIBOBJ = Sj3lib.o
  #endif
  #ifdef Sj3LibDir
! /*    SJ3LIB_DIR = Concat(-L,Sj3LibDir) */
!       SJ3LIB_DIR = Sj3LibDir
!    SJ3LIB_LDFLAG = -L$(SJ3LIB_DIR)
  #endif
  #if UseXIMCP
         USE_XIMCP = -DUSE_XIMCP
***************
*** 108,119 ****
  
          DEFINES = $(PROTOCOL_DEFINES) $(HEADER_DEFINES)
         INCLUDES = -I. -I$(LIBSRC) -I$(TOOLKITSRC) -I$(AWIDGETSRC)
!   LOCAL_LDFLAGS = $(SJ3LIB_DIR) -LXmw
          DEPLIBS = Xmw/libXmw.a XawClientDepLibs
  #if UseInstalledSj3Lib  ||  defined(Sj3LibDir)
  LOCAL_LIBRARIES = -lsj3lib -lXmw XawClientLibs
  #else
  LOCAL_LIBRARIES = -lXmw XawClientLibs
  #endif
        MANSUFFIX = 1
  
--- 115,140 ----
  
          DEFINES = $(PROTOCOL_DEFINES) $(HEADER_DEFINES)
         INCLUDES = -I. -I$(LIBSRC) -I$(TOOLKITSRC) -I$(AWIDGETSRC)
!   LOCAL_LDFLAGS = $(SJ3LIB_LDFLAG) -LXmw
          DEPLIBS = Xmw/libXmw.a XawClientDepLibs
  #if UseInstalledSj3Lib  ||  defined(Sj3LibDir)
+ /*
+  * Change for FreeBSD.
+  * Because When the LANG variable is EUC, setlocale function in library libc 
+  * return NULL, use it in library libxpg4 
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
+ #if defined(FreeBSDArchitecture)
+ LOCAL_LIBRARIES = -lxpg4 -lsj3lib -lXmw XawClientLibs
+ #else
  LOCAL_LIBRARIES = -lsj3lib -lXmw XawClientLibs
+ #endif
+ #else
+ #if defined(FreeBSDArchitecture)
+ LOCAL_LIBRARIES = -lxpg4 -lXmw XawClientLibs
  #else
  LOCAL_LIBRARIES = -lXmw XawClientLibs
+ #endif
  #endif
        MANSUFFIX = 1
  
diff -arcN ../sjxa-1.5.11.org/SjString.h ./SjString.h
*** ../sjxa-1.5.11.org/SjString.h	Tue Apr 11 21:11:12 1995
--- ./SjString.h	Mon Aug 12 17:21:43 1996
***************
*** 45,50 ****
--- 45,56 ----
  
  #define	iseuc(c)	((unsigned char)(c) >= 0xa1 &&		\
  			 (unsigned char)(c) <= 0xfe)
+ /*
+  * Add isjjis() function.
+  * Because is used in this sources, but it is undefined!!
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
+ #define isjjis(c)	((0x21 <= (c)) && ((c) <= 0x7e))
  #define issjis1(c)	(((unsigned char)(c) >= 0x81 &&		\
  			  (unsigned char)(c) <= 0x9f) ||	\
  			 ((unsigned char)(c) >= 0xe0 &&		\
diff -arcN ../sjxa-1.5.11.org/man/Imakefile ./man/Imakefile
*** ../sjxa-1.5.11.org/man/Imakefile	Mon May 30 22:07:32 1994
--- ./man/Imakefile	Mon Aug 12 17:58:35 1996
***************
*** 27,32 ****
--- 27,37 ----
  Sony Corporation.
  */
  
+ /*
+  * Change some make rules.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
+ 
  #ifdef ManDir
  #undef ManDir
  #endif
***************
*** 40,49 ****
  #define JapaneseManLocale	eucJP
  #endif
  #ifndef JapaneseManDir
! #define JapaneseManDir	/usr/local/man/man1
  #endif
  #ifndef ManDir
! #define ManDir		/usr/local/man/man1
  #endif
  
        JMANLOCALE = JapaneseManLocale
--- 45,54 ----
  #define JapaneseManLocale	eucJP
  #endif
  #ifndef JapaneseManDir
! #define JapaneseManDir	/usr/X11R6/man/ja/man1
  #endif
  #ifndef ManDir
! #define ManDir		/usr/X11R6/man/man1
  #endif
  
        JMANLOCALE = JapaneseManLocale
diff -arcN ../sjxa-1.5.11.org/resource/Imakefile ./resource/Imakefile
*** ../sjxa-1.5.11.org/resource/Imakefile	Wed Mar 29 15:33:35 1995
--- ./resource/Imakefile	Mon Aug 12 17:58:49 1996
***************
*** 27,32 ****
--- 27,37 ----
  Sony Corporation.
  */
  
+ /*
+  * Change some make rules.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
+ 
  #ifdef ManDir
  #undef ManDir
  #endif
***************
*** 39,45 ****
  #ifdef SjxaAppDir
  #define SJXAAPPDIR	SjxaAppDir
  #else
! #define SJXAAPPDIR	$(LIBDIR)
  #endif
  
  #ifdef SjxarkDir
--- 44,50 ----
  #ifdef SjxaAppDir
  #define SJXAAPPDIR	SjxaAppDir
  #else
! #define SJXAAPPDIR	$(LIBDIR)/X11
  #endif
  
  #ifdef SjxarkDir
diff -arcN ../sjxa-1.5.11.org/resource/eucJP.ad ./resource/eucJP.ad
*** ../sjxa-1.5.11.org/resource/eucJP.ad	Mon May 30 22:07:55 1994
--- ./resource/eucJP.ad	Mon Aug 12 17:17:35 1996
***************
*** 44,50 ****
  !*kanaMode:				True
  *wrapToSelect:				3
  *initialMode:				ZenkakuHiragana
! *defaultCode:				sjis
  
  Sjxa.XmwPreedit.borderWidth:		0
  
--- 44,54 ----
  !*kanaMode:				True
  *wrapToSelect:				3
  *initialMode:				ZenkakuHiragana
! !
! ! Change default code sjjis -> euc.
! ! Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
! !
! *defaultCode:				euc
  
  Sjxa.XmwPreedit.borderWidth:		0
  
diff -arcN ../sjxa-1.5.11.org/sjxa.c ./sjxa.c
*** ../sjxa-1.5.11.org/sjxa.c	Mon Jun 19 19:55:19 1995
--- ./sjxa.c	Mon Aug 12 17:26:55 1996
***************
*** 145,153 ****
  	program_name = ss + 1;
  
     /* get user locale */
      if( (locale_name = setlocale( LC_CTYPE, "" )) == NULL ) {
! 	fprintf( stderr, "%s error: locale could not be set.\n", program_name );
! 	exit( 1 );
      }
      if( strcmp( locale_name, "ja_JP.SJIS" ) == 0 )
  	user_locale = LC_CTYPE_SHIFTJIS;
--- 145,160 ----
  	program_name = ss + 1;
  
     /* get user locale */
+ /*
+  * If the setlocale functione return NULL,
+  * try to get user locale by LANG variables again.
+  * Patched by Hidekazu Kuroki(hidekazu@cs.titech.ac.jp)		1996/8/10
+  */
      if( (locale_name = setlocale( LC_CTYPE, "" )) == NULL ) {
! 	if( (locale_name = getenv("LANG")) == NULL ) {
! 	    fprintf( stderr, "%s error: locale could not be set.\n", program_name );
! 	    exit( 1 );
! 	}
      }
      if( strcmp( locale_name, "ja_JP.SJIS" ) == 0 )
  	user_locale = LC_CTYPE_SHIFTJIS;