Changeset 754 for trunk/src/emx/src/libiconv/iconv.c
- Timestamp:
- Sep 30, 2003, 12:11:05 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/libiconv/iconv.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r753 r754 1 1 /* iconv wrapper based on OS/2 Unicode API. */ 2 2 3 #define INCL_FSMACROS 4 #include <os2emx.h> 3 5 #include <uconv.h> 4 6 … … 27 29 iconv_t conv; 28 30 uconv_attribute_t attr; 31 FS_VAR(); 29 32 30 33 conv = (iconv_t) malloc (sizeof (struct _iconv_t)); … … 35 38 } 36 39 40 FS_SAVE_LOAD(); 37 41 ucp = (UniChar *) alloca ((strlen (cp_from) + 2 + 1) * sizeof (UniChar)); 38 42 __convert_codepage (cp_from, ucp); … … 41 45 free (conv); 42 46 errno = EINVAL; 47 FS_RESTORE(); 43 48 return (iconv_t)(-1); 44 49 } … … 51 56 free (conv); 52 57 errno = EINVAL; 58 FS_RESTORE(); 53 59 return (iconv_t)(-1); 54 60 } … … 64 70 UniSetUconvObject (conv->from, &attr); 65 71 72 FS_RESTORE(); 66 73 return conv; 67 74 } … … 77 84 UniChar *orig_ucs = ucs; 78 85 size_t retval = 0; 86 FS_VAR(); 79 87 88 FS_SAVE_LOAD(); 80 89 rc = UniUconvToUcs (conv->from, (void **)in, in_left, &ucs, &sl, &retval); 81 90 if (rc) … … 108 117 } 109 118 #endif 119 FS_RESTORE(); 110 120 return 0; 111 121 … … 127 137 break; 128 138 } 139 FS_RESTORE(); 129 140 return (size_t)(-1); 130 141 } … … 135 146 if (conv != (iconv_t)(-1)) 136 147 { 148 FS_VAR(); 149 FS_SAVE_LOAD(); 137 150 UniFreeUconvObject (conv->to); 138 151 UniFreeUconvObject (conv->from); 152 FS_RESTORE(); 139 153 free (conv); 140 154 } -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.