Deleted Added
full compact
iconv.c (185652) iconv.c (194638)
1/*-
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2000-2001, Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/libkern/iconv.c 185652 2008-12-05 21:19:24Z jhb $");
34__FBSDID("$FreeBSD: head/sys/libkern/iconv.c 194638 2009-06-22 17:09:46Z delphij $");
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39#include <sys/iconv.h>
40#include <sys/malloc.h>
41#include <sys/mount.h>
42#include <sys/sx.h>

--- 259 unchanged lines hidden (view full) ---

302
303int
304iconv_convchr_case(void *handle, const char **inbuf,
305 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype)
306{
307 return ICONV_CONVERTER_CONV(handle, inbuf, inbytesleft, outbuf, outbytesleft, 1, casetype);
308}
309
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39#include <sys/iconv.h>
40#include <sys/malloc.h>
41#include <sys/mount.h>
42#include <sys/sx.h>

--- 259 unchanged lines hidden (view full) ---

302
303int
304iconv_convchr_case(void *handle, const char **inbuf,
305 size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int casetype)
306{
307 return ICONV_CONVERTER_CONV(handle, inbuf, inbytesleft, outbuf, outbytesleft, 1, casetype);
308}
309
310int
311towlower(int c, void *handle)
312{
313 return ICONV_CONVERTER_TOLOWER(handle, c);
314}
315
316int
317towupper(int c, void *handle)
318{
319 return ICONV_CONVERTER_TOUPPER(handle, c);
320}
321
310/*
311 * Give a list of loaded converters. Each name terminated with 0.
312 * An empty string terminates the list.
313 */
314static int
315iconv_sysctl_drvlist(SYSCTL_HANDLER_ARGS)
316{
317 struct iconv_converter_class *dcp;

--- 119 unchanged lines hidden (view full) ---

437
438int
439iconv_converter_donestub(struct iconv_converter_class *dp)
440{
441 return 0;
442}
443
444int
322/*
323 * Give a list of loaded converters. Each name terminated with 0.
324 * An empty string terminates the list.
325 */
326static int
327iconv_sysctl_drvlist(SYSCTL_HANDLER_ARGS)
328{
329 struct iconv_converter_class *dcp;

--- 119 unchanged lines hidden (view full) ---

449
450int
451iconv_converter_donestub(struct iconv_converter_class *dp)
452{
453 return 0;
454}
455
456int
457iconv_converter_tolowerstub(int c, void *handle)
458{
459 return (c);
460}
461
462int
445iconv_converter_handler(module_t mod, int type, void *data)
446{
447 struct iconv_converter_class *dcp = data;
448 int error;
449
450 switch (type) {
451 case MOD_LOAD:
452 sx_xlock(&iconv_lock);

--- 99 unchanged lines hidden ---
463iconv_converter_handler(module_t mod, int type, void *data)
464{
465 struct iconv_converter_class *dcp = data;
466 int error;
467
468 switch (type) {
469 case MOD_LOAD:
470 sx_xlock(&iconv_lock);

--- 99 unchanged lines hidden ---