citrus_mskanji.c (219019) | citrus_mskanji.c (252583) |
---|---|
1/* $FreeBSD: head/lib/libiconv_modules/MSKanji/citrus_mskanji.c 219019 2011-02-25 00:04:39Z gabor $ */ | 1/* $FreeBSD: head/lib/libiconv_modules/MSKanji/citrus_mskanji.c 252583 2013-07-03 18:27:45Z peter $ */ |
2/* $NetBSD: citrus_mskanji.c,v 1.13 2008/06/14 16:01:08 tnozaki Exp $ */ 3 4/*- 5 * Copyright (c)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 --- 136 unchanged lines hidden (view full) --- 146{ 147 148 memcpy((void *)s, pspriv, sizeof(*s)); 149} 150 151static int 152/*ARGSUSED*/ 153_citrus_MSKanji_mbrtowc_priv(_MSKanjiEncodingInfo * __restrict ei, | 2/* $NetBSD: citrus_mskanji.c,v 1.13 2008/06/14 16:01:08 tnozaki Exp $ */ 3 4/*- 5 * Copyright (c)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 --- 136 unchanged lines hidden (view full) --- 146{ 147 148 memcpy((void *)s, pspriv, sizeof(*s)); 149} 150 151static int 152/*ARGSUSED*/ 153_citrus_MSKanji_mbrtowc_priv(_MSKanjiEncodingInfo * __restrict ei, |
154 wchar_t * __restrict pwc, char ** __restrict s, size_t n, | 154 wchar_t * __restrict pwc, const char ** __restrict s, size_t n, |
155 _MSKanjiState * __restrict psenc, size_t * __restrict nresult) 156{ | 155 _MSKanjiState * __restrict psenc, size_t * __restrict nresult) 156{ |
157 char *s0; | 157 const char *s0; |
158 wchar_t wchar; 159 int chlenbak, len; 160 161 s0 = *s; 162 163 if (s0 == NULL) { 164 _citrus_MSKanji_init_state(ei, psenc); 165 *nresult = 0; /* state independent */ --- 308 unchanged lines hidden --- | 158 wchar_t wchar; 159 int chlenbak, len; 160 161 s0 = *s; 162 163 if (s0 == NULL) { 164 _citrus_MSKanji_init_state(ei, psenc); 165 *nresult = 0; /* state independent */ --- 308 unchanged lines hidden --- |