pilot-link0.8.9 の read-ical.c で日本語を通すためのいいかげんなパッチ 以下の内容を 'diffs' というファイルにセーブして、pilot-link0.8.9 の ディレクトリで (csh または tcsh から)
patch <diffs |& tee patch.log
と実行してください。 いいかげんなものなので動作保証はできませんし、on your own risk で 行ってください。 (そもそも、オリジナルソースで言うところの 0x95 - bullet というのが 何者のかわかっていない状態で無理矢理 SJIS を通していますので。)
==== cut here ==== cut here ==== cut here ==== cut here ==== *** read-ical.c-dist Wed Jan 21 23:18:12 1998 --- read-ical.c Thu Jan 22 01:55:44 1998 *************** *** 15,27 **** #include "pi-datebook.h" #include "pi-dlp.h" char * tclquote(char * in) { static char * buffer = 0; char * out; ! char * pos; int len; ! /* Skip leading bullet (and any whitespace after) */ if (in[0] == '\x95') { ++in; --- 15,33 ---- #include "pi-datebook.h" #include "pi-dlp.h" + #define isSjis1stByte(c) \ + (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0)) + + char * tclquote(char * in) { static char * buffer = 0; char * out; ! unsigned char * pos; int len; ! int inkanji = 0; ! ! #if 0 /* Skip leading bullet (and any whitespace after) */ if (in[0] == '\x95') { ++in; *************** *** 29,60 **** ++in; } } ! len = 3; ! pos = in; ! while(*pos) { ! if((*pos == '\\') || (*pos == '"') || (*pos == '[') || (*pos == '{') || (*pos == '$')) ! len++; ! len++; ! pos++; ! } ! if (buffer) ! free(buffer); ! buffer = (char*)malloc(len); ! out = buffer; ! ! pos = in; ! *out++ = '"'; ! while(*pos) { ! if((*pos == '\\') || (*pos == '"') || (*pos == '[') || (*pos == '{') || (*pos == '$')) ! *out++ = '\\'; ! *out++=*pos++; ! } ! *out++ = '"'; ! *out++ = '\0'; ! return buffer; } static void Usage(char *progname) --- 35,78 ---- ++in; } } + #endif ! len = 3; ! pos = in; ! while(*pos) { ! if (!inkanji && ((*pos == '\\') || (*pos == '"') || (*pos == '[') ! || (*pos == '{') || (*pos == '$'))) ! len++; ! if (inkanji) ! inkanji = 0; ! else if (isSjis1stByte(*pos)) ! inkanji = 1; ! len++; ! pos++; ! } ! if (buffer) ! free(buffer); ! buffer = (char*)malloc(len); ! out = buffer; ! ! pos = in; ! *out++ = '"'; ! inkanji = 0; ! while(*pos) { ! if (!inkanji && ((*pos == '\\') || (*pos == '"') || (*pos == '[') ! || (*pos == '{') || (*pos == '$'))) ! *out++ = '\\'; ! if (inkanji) ! inkanji = 0; ! else if (isSjis1stByte(*pos)) ! inkanji = 1; ! *out++ = *pos++; ! } ! *out++ = '"'; ! *out++ = '\0'; ! return buffer; } static void Usage(char *progname)