citrus_zw.c (219019) | citrus_zw.c (252583) |
---|---|
1/* $FreeBSD: head/lib/libiconv_modules/ZW/citrus_zw.c 219019 2011-02-25 00:04:39Z gabor $ */ | 1/* $FreeBSD: head/lib/libiconv_modules/ZW/citrus_zw.c 252583 2013-07-03 18:27:45Z peter $ */ |
2/* $NetBSD: citrus_zw.c,v 1.4 2008/06/14 16:01:08 tnozaki Exp $ */ 3 4/*- 5 * Copyright (c)2004, 2006 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 --- 90 unchanged lines hidden (view full) --- 100 _ZWState * __restrict psenc, const void * __restrict pspriv) 101{ 102 103 memcpy((void *)psenc, pspriv, sizeof(*psenc)); 104} 105 106static int 107_citrus_ZW_mbrtowc_priv(_ZWEncodingInfo * __restrict ei, | 2/* $NetBSD: citrus_zw.c,v 1.4 2008/06/14 16:01:08 tnozaki Exp $ */ 3 4/*- 5 * Copyright (c)2004, 2006 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 --- 90 unchanged lines hidden (view full) --- 100 _ZWState * __restrict psenc, const void * __restrict pspriv) 101{ 102 103 memcpy((void *)psenc, pspriv, sizeof(*psenc)); 104} 105 106static int 107_citrus_ZW_mbrtowc_priv(_ZWEncodingInfo * __restrict ei, |
108 wchar_t * __restrict pwc, char **__restrict s, size_t n, | 108 wchar_t * __restrict pwc, const char **__restrict s, size_t n, |
109 _ZWState * __restrict psenc, size_t * __restrict nresult) 110{ | 109 _ZWState * __restrict psenc, size_t * __restrict nresult) 110{ |
111 char *s0; | 111 const char *s0; |
112 wchar_t wc; 113 int ch, len; 114 115 if (*s == NULL) { 116 _citrus_ZW_init_state(ei, psenc); 117 *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; 118 return (0); 119 } --- 336 unchanged lines hidden --- | 112 wchar_t wc; 113 int ch, len; 114 115 if (*s == NULL) { 116 _citrus_ZW_init_state(ei, psenc); 117 *nresult = (size_t)_ENCODING_IS_STATE_DEPENDENT; 118 return (0); 119 } --- 336 unchanged lines hidden --- |