The Samba-Bugzilla – Attachment 315 Details for
Bug 558
All files complain about missing ISO8859-1.so on solaris
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Support ISO-8859-1 internally
bug558-iconv.patch (text/plain), 1.62 KB, created by
Alexander Bokovoy
on 2003-12-10 07:57:36 UTC
(
hide
)
Description:
Support ISO-8859-1 internally
Filename:
MIME Type:
Creator:
Alexander Bokovoy
Created:
2003-12-10 07:57:36 UTC
Size:
1.62 KB
patch
obsolete
>Index: source/lib/iconv.c >=================================================================== >RCS file: /home/cvs/samba/source/lib/iconv.c,v >retrieving revision 1.18.2.10 >diff -u -r1.18.2.10 iconv.c >--- source/lib/iconv.c 22 Oct 2003 23:38:19 -0000 1.18.2.10 >+++ source/lib/iconv.c 10 Dec 2003 15:55:47 -0000 >@@ -53,6 +53,7 @@ > > static size_t ascii_pull(void *,char **, size_t *, char **, size_t *); > static size_t ascii_push(void *,char **, size_t *, char **, size_t *); >+static size_t latin1_push(void *,char **, size_t *, char **, size_t *); > static size_t utf8_pull(void *,char **, size_t *, char **, size_t *); > static size_t utf8_push(void *,char **, size_t *, char **, size_t *); > static size_t ucs2hex_pull(void *,char **, size_t *, char **, size_t *); >@@ -64,6 +65,7 @@ > {"UTF8", utf8_pull, utf8_push}, > {"ASCII", ascii_pull, ascii_push}, > {"646", ascii_pull, ascii_push}, >+ {"ISO-8859-1", ascii_pull, latin1_push}, > {"UCS2-HEX", ucs2hex_pull, ucs2hex_push}, > {NULL, NULL, NULL} > }; >@@ -354,6 +356,32 @@ > return ir_count; > } > >+static size_t latin1_push(void *cd, char **inbuf, size_t *inbytesleft, >+ char **outbuf, size_t *outbytesleft) >+{ >+ int ir_count=0; >+ >+ while (*inbytesleft >= 2 && *outbytesleft >= 1) { >+ (*outbuf)[0] = (*inbuf)[0]; >+ if ((*inbuf)[1]) ir_count++; >+ (*inbytesleft) -= 2; >+ (*outbytesleft) -= 1; >+ (*inbuf) += 2; >+ (*outbuf) += 1; >+ } >+ >+ if (*inbytesleft == 1) { >+ errno = EINVAL; >+ return -1; >+ } >+ >+ if (*inbytesleft > 1) { >+ errno = E2BIG; >+ return -1; >+ } >+ >+ return ir_count; >+} > > static size_t ucs2hex_pull(void *cd, char **inbuf, size_t *inbytesleft, > char **outbuf, size_t *outbytesleft)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 558
:
177
|
306
|
313
| 315