aboutsummaryrefslogtreecommitdiff
path: root/japanese/libjcode/files/patch-aa
blob: 3e28f0ffe5e60e4f48d3e1906f2764d940d31ef1 (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
*** jlib.h	1999/07/11 15:47:33	1.1.1.1
--- jlib.h	1999/07/11 16:51:11	1.1.1.1.2.2
***************
*** 14,17 ****
--- 14,19 ----
  extern char *toStringJIS(char *str);
  extern char *toStringEUC(char *str);
  extern char *toStringSJIS(char *str);
+ extern char *toStringEUCfromSJIS(char *str);
+ extern char *toStringSJISfromEUC(char *str);
  
*** libjcode.c	1999/07/11 15:47:33	1.1.1.1
--- libjcode.c	1999/07/11 16:51:11	1.1.1.1.2.3
***************
*** 494,499 ****
--- 494,520 ----
  }
  
  
+ char *toStringEUCfromSJIS(char *str) {
+   unsigned char *buf;
+ 
+   buf = _set_buffer(str);
+ 
+   _shift2euc((unsigned char *)str, buf);
+ 
+   return (char *)_replace_buffer(buf);
+ }
+ 
+ char *toStringSJISfromEUC(char *str) {
+   unsigned char *buf;
+ 
+   buf = _set_buffer(str);
+ 
+   _euc2shift((unsigned char *)str, buf);
+ 
+   return _replace_buffer(buf);
+ }
+ 
+ 
  char *test(char *str) {
    static char buffer[BUFSIZ];