The Samba-Bugzilla – Attachment 177 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]
Plugin Module for Latin 1 (fix solaris warnings)
ISO8859_1.c (text/plain), 1.86 KB, created by
Steven Tamm
on 2003-10-02 15:27:02 UTC
(
hide
)
Description:
Plugin Module for Latin 1 (fix solaris warnings)
Filename:
MIME Type:
Creator:
Steven Tamm
Created:
2003-10-02 15:27:02 UTC
Size:
1.86 KB
patch
obsolete
>/* > * Conversion table for ISO8859-1 charset > * > * This program is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * This program is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * You should have received a copy of the GNU General Public License > * along with this program; if not, write to the Free Software > * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > */ >#include "includes.h" > >static size_t latin1_pull(void *cd, char **inbuf, size_t *inbytesleft, > char **outbuf, size_t *outbytesleft) >{ > while (*inbytesleft >= 1 && *outbytesleft >= 2) { > *(uint16*)(*outbuf) = **inbuf; > (*inbytesleft) -= 1; > (*outbytesleft) -= 2; > (*inbuf) += 1; > (*outbuf) += 2; > } > > if (*inbytesleft > 0) { > errno = E2BIG; > return -1; > } > > return 0; >} > >static size_t latin1_push(void *cd, char **inbuf, size_t *inbytesleft, > char **outbuf, size_t *outbytesleft) >{ > while (*inbytesleft >= 2 && *outbytesleft >= 1) { > int i; > int done=0; > uint16 ch = SVAL(*inbuf,0); > (*outbuf)[0] = ch; > (*inbytesleft) -= 2; > (*outbytesleft) -= 1; > (*inbuf) += 2; > (*outbuf) += 1; > } > > if (*inbytesleft == 1) { > errno = EINVAL; > return -1; > } > > if (*inbytesleft > 1) { > errno = E2BIG; > return -1; > } > > return 0; >} > >struct charset_functions latin1_functions = {"ISO8859-1", latin1_pull, latin1_push}; > >NTSTATUS charset_latin1_init(void) >{ > return smb_register_charset(&latin1_functions); >}
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