Skip to content

Commit

Permalink
cleanup C compiler code
Browse files Browse the repository at this point in the history
update multi-byte code page info
  • Loading branch information
jmalak committed Dec 13, 2023
1 parent 3043794 commit 5b37bbf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions bld/cc/c/coptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static void DefSwitchMacro( const char *str )
{
char buff[64];

Define_Macro( strcpy( strcpy( buff, "__SW_" ) + 5, str ) - 5 );
PreDefine_Macro( strcpy( strcpy( buff, "__SW_" ) + 5, str ) - 5 );
}

static void SetCharacterEncoding( void )
Expand Down Expand Up @@ -2031,7 +2031,7 @@ static const char *CollectEnvOrFileName( const char *str )
return( str );
}

static char *ReadIndirectFile( void )
static char *ReadIndirectFile( const char *fname )
{
char *env;
char *str;
Expand All @@ -2040,7 +2040,7 @@ static char *ReadIndirectFile( void )
char ch;

env = NULL;
fp = fopen( TokenBuf, "rb" );
fp = fopen( fname, "rb" );
if( fp != NULL ) {
fseek( fp, 0, SEEK_END );
len = (size_t)ftell( fp );
Expand Down Expand Up @@ -2095,7 +2095,7 @@ static void ProcOptions( const char *str )
ptr = NULL;
penv = FEGetEnv( TokenBuf );
if( penv == NULL ) {
ptr = ReadIndirectFile();
ptr = ReadIndirectFile( TokenBuf );
penv = ptr;
}
buffers[level] = ptr;
Expand Down
18 changes: 12 additions & 6 deletions bld/cc/gml/options.gml
Original file line number Diff line number Diff line change
Expand Up @@ -1231,20 +1231,26 @@
:option. zk0 zk
:target. any
:enumerate. char_set
:usage. Kanji
:jusage. 2バイト文字サポート: 日本語
:usage. Japanese (Kanji, CP 932)
:jusage.

:option. zk1
:target. any
:enumerate. char_set
:usage. Chinese/Taiwanese
:jusage. 2バイト文字サポート: 中国語/台湾語
:usage. Chinese/Taiwanese (Traditional, CP 950)
:jusage.

:option. zk2
:target. any
:enumerate. char_set
:usage. Korean
:jusage. 2バイト文字サポート: 韓国語
:usage. Korean (Wansung, CP 949)
:jusage.

:option. zk3
:target. any
:enumerate. char_set
:usage. Chinese (Simplified, CP 936)
:jusage.

:option. zk0u
:target. any
Expand Down

0 comments on commit 5b37bbf

Please sign in to comment.