- Timestamp:
- Jan 23, 2004, 3:02:30 AM (22 years ago)
- Location:
- trunk/src/emx/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/iconv/iconv.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r1019 r1020 77 77 char **out, size_t *out_left) 78 78 { 79 int rc; 80 size_t sl = *in_left, nonid; 81 UniChar *ucs = (UniChar *) alloca (sl * sizeof (UniChar)); 82 UniChar *orig_ucs = ucs; 83 size_t retval = 0; 79 int rc; 80 size_t sl; 81 size_t nonid; 82 UniChar *ucs; 83 UniChar *orig_ucs; 84 size_t retval = 0; 84 85 FS_VAR(); 86 87 /* just in case. */ 88 if (!conv || conv == (iconv_t)-1) 89 { 90 errno = EINVAL; 91 return -1; 92 } 93 94 /* The caller wish to initate the conversion state and/or write initial 95 shift prefix (or something like that) to the output buffer. */ 96 if (!in || !*in) 97 { 98 if (!out || !*out || !out_left || !*out_left) 99 /* do nothing since we don't have any shift state in the iconv_t. */ 100 return 0; 101 102 /** @todo We don't have any shift state I or so, so what to do now? 103 * Let's do nothing till we have anyone complaining about his DBCS 104 * stuff not working 100%, and accept patches for that guy. 105 * Perhaps try call UniUconvFromUcs(conv->to, and some empty input buffer or so... 106 */ 107 return 0; 108 } 109 110 sl = *in_left; 111 ucs = (UniChar *) alloca (sl * sizeof (UniChar)); 112 orig_ucs = ucs; 85 113 86 114 FS_SAVE_LOAD(); … … 142 170 iconv_close (iconv_t conv) 143 171 { 144 if ( conv != (iconv_t)(-1))172 if (!conv && conv != (iconv_t)(-1)) 145 173 { 146 174 FS_VAR(); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/libiconv/iconv.c
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r1019 r1020 77 77 char **out, size_t *out_left) 78 78 { 79 int rc; 80 size_t sl = *in_left, nonid; 81 UniChar *ucs = (UniChar *) alloca (sl * sizeof (UniChar)); 82 UniChar *orig_ucs = ucs; 83 size_t retval = 0; 79 int rc; 80 size_t sl; 81 size_t nonid; 82 UniChar *ucs; 83 UniChar *orig_ucs; 84 size_t retval = 0; 84 85 FS_VAR(); 86 87 /* just in case. */ 88 if (!conv || conv == (iconv_t)-1) 89 { 90 errno = EINVAL; 91 return -1; 92 } 93 94 /* The caller wish to initate the conversion state and/or write initial 95 shift prefix (or something like that) to the output buffer. */ 96 if (!in || !*in) 97 { 98 if (!out || !*out || !out_left || !*out_left) 99 /* do nothing since we don't have any shift state in the iconv_t. */ 100 return 0; 101 102 /** @todo We don't have any shift state I or so, so what to do now? 103 * Let's do nothing till we have anyone complaining about his DBCS 104 * stuff not working 100%, and accept patches for that guy. 105 * Perhaps try call UniUconvFromUcs(conv->to, and some empty input buffer or so... 106 */ 107 return 0; 108 } 109 110 sl = *in_left; 111 ucs = (UniChar *) alloca (sl * sizeof (UniChar)); 112 orig_ucs = ucs; 85 113 86 114 FS_SAVE_LOAD(); … … 142 170 iconv_close (iconv_t conv) 143 171 { 144 if ( conv != (iconv_t)(-1))172 if (!conv && conv != (iconv_t)(-1)) 145 173 { 146 174 FS_VAR(); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.