diff options
author | Jeremy Allison <jra@samba.org> | 2000-05-12 14:28:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-05-12 14:28:48 +0000 |
commit | fa659fea9b0b71bf62de9dfec61160196c828da1 (patch) | |
tree | c0f4b510ba60b3b0a6542a0b7390459940e87892 /source3/rpc_parse | |
parent | 0806cf75ff96dee6715610bd61e21cde08fa1c61 (diff) | |
download | samba-fa659fea9b0b71bf62de9dfec61160196c828da1.tar.gz samba-fa659fea9b0b71bf62de9dfec61160196c828da1.tar.bz2 samba-fa659fea9b0b71bf62de9dfec61160196c828da1.zip |
Added unicode_to_dos_char() function to address converting single UNICODE
characters to one or more DOS codepage characters.
Jeremy.
(This used to be commit eefbfb5e16fcf40f335edc840a49f837f6b64111)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 62dbc16277..987ae42ff4 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -3718,12 +3718,12 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_ convert a buffer of UNICODE strings null terminated the buffer is terminated by a NULL - convert to an ascii array (null terminated) + convert to an dos codepage array (null terminated) dynamically allocate memory ********************************************************************/ -BOOL uniarray_2_ascarray(BUFFER5 *buf5, char ***ar) +static BOOL uniarray_2_dosarray(BUFFER5 *buf5, char ***ar) { char **array; char *string; @@ -3750,7 +3750,7 @@ BOOL uniarray_2_ascarray(BUFFER5 *buf5, char ***ar) while (dest < destend) { - *(dest++) = (char)*(src++); + dest += unicode_to_dos_char(dest, (smb_ucs2_t)*(src++)); } /* that ugly for the first one but that's working */ @@ -3912,7 +3912,7 @@ BOOL uni_2_asc_printer_driver_3(SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *uni, DEBUGADD(8,( "monitorname: %s\n", d->monitorname)); DEBUGADD(8,( "defaultdatatype: %s\n", d->defaultdatatype)); - uniarray_2_ascarray(&(uni->dependentfiles), &(d->dependentfiles) ); + uniarray_2_dosarray(&(uni->dependentfiles), &(d->dependentfiles) ); return True; } |