精華區beta mud 關於我們 聯絡資訊
兔子懶得更新精華區裡頭的改法... :O 本來直接放 patch file 比較方便... 想想還是作罷... 終於要開學了... 真感動... :~ 忘了說... tintin++/src/parse.c... :P /*************************************************************/ char *get_arg_with_spaces(s, arg) /* ... ignored... */ { int nest=0; /* int inside=FALSE; */ s=space_out(s); while(*s) { /* Line 520. */ > # ifdef BIG5 > if ( *s& 0x80 ) { > *arg++= *s++ ; > if ( *s ) > *arg++= *s++ ; > } else > # endif /* End. */ if(*s=='\\') { if(*++s) *arg++=*s++; } /* ... ignored... */ /*************************************************************/ char *get_arg_in_braces(s, arg, flag) /* ... ignored... */ s++; while(*s!='\0' && !(*s==DEFAULT_CLOSE && nest==0)) { if(*s==DEFAULT_OPEN) { nest++; } else if(*s==DEFAULT_CLOSE) { nest--; } /* Line 571. */ > # ifdef BIG5 > else if ( *s& 0x80 ) { > *arg++= *s++ ; > if ( !*s ) break ; > } > # endif /* End. */ *arg++=*s++; } if (!*s) tintin_puts2("#Unmatched braces error!", (struct session *)NULL); else s++; *arg='\0'; return s; } /**********************************************/ /* get one arg, stop at spaces */ /* remove quotes */ /**********************************************/ char *get_arg_stop_spaces(s, arg) char *s; char *arg; { int inside=FALSE; s=space_out(s); while(*s) { /* Line 593. */ > # ifdef BIG5 > if ( *s& 0x80 ) { > *arg++= *s++ ; > if ( *s ) > *arg++= *s++ ; > } else > # endif /* End. */ if(*s=='\\') { if(*++s) *arg++=*s++; } else if(*s=='"') { s++; inside=!inside; } /* ... ignored... */ /*************************************************************/ 總共有三個地方要稍微修改一下... 最後在 tintin.h 開頭的部份加上一行... #define BIG5 (或者是加在 Makefile 裡頭的 $(CFLAGS)... :D) 大部份的中文字都能正常顯示... 包括 #act/#sub/#ali 等等的 tintin 指令也都可以使用中文... 有個例外... 中文第二碼如果是分號(;)... 那仍然會被吃掉... (不確定有沒有這種中文字就是了... :P)