diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-08-13 08:57:55 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-08-13 08:57:55 +0000 |
commit | aa6f8b04d125b5bc00f267abf72b800228aabf7d (patch) | |
tree | 9d649627d1930e869025642b4bec2b08fb814b52 /source/smbd/mangle.c | |
parent | fe0f5d44e20599679d392eeda34a58769378fbbf (diff) | |
download | samba-aa6f8b04d125b5bc00f267abf72b800228aabf7d.tar.gz samba-aa6f8b04d125b5bc00f267abf72b800228aabf7d.tar.xz samba-aa6f8b04d125b5bc00f267abf72b800228aabf7d.zip |
- sequent-ptx support from bressler@iftccu.ca.boeing.com (Rick
Bressler)
- machten support from Trevor Strohman (trev@figment.tenon.com)
- added qinfo command to client as part of drag-and-drop printer
support for win95 from David Chappell <chappell@mouse.cc.trincoll.edu>
He also added the "printer driver" option
- use sigblock() on more systems and use sigsetmask(0) instead of
sigunblock() as its more portable. This beats a problem with zombies
on heavilily loaded systems.
- added internals.doc written by David Chappell into the source tree
- get rid of PRINT_COMMAND options from local.h as they are no longer
relevent
- new kanji code from Fujita
- don't set the recursion_available flag on queries in nmbd
- fix a potential bug with pointer subtraction in printing.c
- got rid of error_count code as the real fix (the EOF problem) is now
in
Diffstat (limited to 'source/smbd/mangle.c')
-rw-r--r-- | source/smbd/mangle.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/source/smbd/mangle.c b/source/smbd/mangle.c index cf1ece558c7..177a34c9751 100644 --- a/source/smbd/mangle.c +++ b/source/smbd/mangle.c @@ -509,9 +509,36 @@ void mangle_name_83(char *s) *p++ = 0; while (*p && extlen < 3) { +#ifdef KANJI + if (is_shift_jis (*p)) + { + if (extlen < 2) + { + extension[extlen++] = p[0]; + extension[extlen++] = p[1]; + } + else + { + extension[extlen++] = base36 (((unsigned char) *p) % 36); + } + p += 2; + } + else if (is_kana (*p)) + { + extension[extlen++] = p[0]; + p++; + } + else + { + if (isdoschar (*p) && *p != '.') + extension[extlen++] = p[0]; + p++; + } +#else if (isdoschar(*p) && *p != '.') extension[extlen++] = *p; p++; +#endif /* KANJI */ } extension[extlen] = 0; } @@ -521,9 +548,36 @@ void mangle_name_83(char *s) while (*p && baselen < 5) { +#ifdef KANJI + if (is_shift_jis (*p)) + { + if (baselen < 4) + { + base[baselen++] = p[0]; + base[baselen++] = p[1]; + } + else + { + base[baselen++] = base36 (((unsigned char) *p) % 36); + } + p += 2; + } + else if (is_kana (*p)) + { + base[baselen++] = p[0]; + p++; + } + else + { + if (isdoschar (*p) && *p != '.') + base[baselen++] = p[0]; + p++; + } +#else if (isdoschar(*p) && *p != '.') base[baselen++] = *p; p++; +#endif /* KANJI */ } base[baselen] = 0; |