Deleted Added
full compact
citrus_iso2022.c (219019) citrus_iso2022.c (252583)
1/* $FreeBSD: head/lib/libiconv_modules/ISO2022/citrus_iso2022.c 219019 2011-02-25 00:04:39Z gabor $ */
1/* $FreeBSD: head/lib/libiconv_modules/ISO2022/citrus_iso2022.c 252583 2013-07-03 18:27:45Z peter $ */
2/* $NetBSD: citrus_iso2022.c,v 1.19 2008/06/14 16:01:07 tnozaki Exp $ */
3
4/*-
5 * Copyright (c)1999, 2002 Citrus Project,
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

567 }
568
569terminate:
570 return (p - sp->chars);
571}
572
573static wchar_t
574_ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei __unused,
2/* $NetBSD: citrus_iso2022.c,v 1.19 2008/06/14 16:01:07 tnozaki Exp $ */
3
4/*-
5 * Copyright (c)1999, 2002 Citrus Project,
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

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

567 }
568
569terminate:
570 return (p - sp->chars);
571}
572
573static wchar_t
574_ISO2022_sgetwchar(_ISO2022EncodingInfo * __restrict ei __unused,
575 char * __restrict string, size_t n, char ** __restrict result,
575 const char * __restrict string, size_t n, const char ** __restrict result,
576 _ISO2022State * __restrict psenc)
577{
578 const struct seqtable *sp;
579 wchar_t wchar = 0;
580 int i, cur, nmatch;
581
582 while (1) {
583 /* SI/SO */

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

835 psenc->singlegr = psenc->singlegl = -1;
836 return (wchar);
837}
838
839
840
841static int
842_citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei,
576 _ISO2022State * __restrict psenc)
577{
578 const struct seqtable *sp;
579 wchar_t wchar = 0;
580 int i, cur, nmatch;
581
582 while (1) {
583 /* SI/SO */

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

835 psenc->singlegr = psenc->singlegl = -1;
836 return (wchar);
837}
838
839
840
841static int
842_citrus_ISO2022_mbrtowc_priv(_ISO2022EncodingInfo * __restrict ei,
843 wchar_t * __restrict pwc, char ** __restrict s,
843 wchar_t * __restrict pwc, const char ** __restrict s,
844 size_t n, _ISO2022State * __restrict psenc, size_t * __restrict nresult)
845{
844 size_t n, _ISO2022State * __restrict psenc, size_t * __restrict nresult)
845{
846 char *p, *result, *s0;
846 const char *p, *result, *s0;
847 wchar_t wchar;
848 int c, chlenbak;
849
850 if (*s == NULL) {
851 _citrus_ISO2022_init_state(ei, psenc);
852 *nresult = _ENCODING_IS_STATE_DEPENDENT;
853 return (0);
854 }

--- 435 unchanged lines hidden ---
847 wchar_t wchar;
848 int c, chlenbak;
849
850 if (*s == NULL) {
851 _citrus_ISO2022_init_state(ei, psenc);
852 *nresult = _ENCODING_IS_STATE_DEPENDENT;
853 return (0);
854 }

--- 435 unchanged lines hidden ---