1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-15 16:59:09 +03:00

Change the multibyte character set support so that

Kanji support is one case of multibyte character
support, rather than being a specific case in
single byte character support.

This allows us to add Big5 Chinese support (code page 950)
and Korean Hangul support (code page 949) at very little
cost. Also allows us to easily add future multibyte
code pages.

Makefile: Added codepages 949, 950 as we now support more multibyte
codepages.
asyncdns.c: Fixed problem with child being re-spawned when parent killed.
charcnv.c
charset.c
client.c
clitar.c
kanji.c
kanji.h
smb.h
util.c
loadparm.c: Generic multibyte codepage support (adding Big5 Chinese
            and Korean Hangul).
nmbd.c: Fixed problem with child being re-spawned when parent killed.
mangle.c: Modified str_checksum so that first 15 characters have more
          effect on outcome. This helps with short name mangling as
          most 'long' names are still shorter than 15 chars (bug was
          foobar_mng and foobar_sum would hash to the same value, with
          the modified code they hash differently.
Jeremy.
(This used to be commit 299016338c)
This commit is contained in:
Jeremy Allison
1998-03-03 20:19:14 +00:00
parent f0e121d100
commit b7fb6c6b38
15 changed files with 594 additions and 219 deletions

View File

@ -887,6 +887,15 @@ int StrCaseCmp(char *s, char *t)
asynchronous upper to lower mapping.
*/
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -951,6 +960,15 @@ int StrnCaseCmp(char *s, char *t, int n)
asynchronous upper to lower mapping.
*/
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -1058,6 +1076,15 @@ void strlower(char *s)
while (*s)
{
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -1096,6 +1123,15 @@ void strupper(char *s)
while (*s)
{
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -1157,6 +1193,15 @@ void string_replace(char *s,char oldc,char newc)
while (*s)
{
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -1783,6 +1828,15 @@ BOOL strhasupper(char *s)
while (*s)
{
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -1816,6 +1870,15 @@ BOOL strhaslower(char *s)
while (*s)
{
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */
@ -1857,6 +1920,15 @@ int count_chars(char *s,char c)
int count=0;
#if !defined(KANJI_WIN95_COMPATIBILITY)
/*
* For completeness we should put in equivalent code for code pages
* 949 (Korean hangul) and 950 (Big5 Traditional Chinese) here - but
* doubt anyone wants Samba to behave differently from Win95 and WinNT
* here. They both treat full width ascii characters as case senstive
* filenames (ie. they don't do the work we do here).
* JRA.
*/
if(lp_client_code_page() == KANJI_CODEPAGE)
{
/* Win95 treats full width ascii characters as case sensitive. */