Ignore:
Timestamp:
Sep 30, 2003, 12:11:05 AM (22 years ago)
Author:
bird
Message:

#679: FS preservation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/libiconv/iconv.c

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r753 r754  
    11/* iconv wrapper based on OS/2 Unicode API. */
    22
     3#define INCL_FSMACROS
     4#include <os2emx.h>
    35#include <uconv.h>
    46
     
    2729  iconv_t conv;
    2830  uconv_attribute_t attr;
     31  FS_VAR();
    2932
    3033  conv = (iconv_t) malloc (sizeof (struct _iconv_t));
     
    3538    }
    3639
     40  FS_SAVE_LOAD();
    3741  ucp = (UniChar *) alloca ((strlen (cp_from) + 2 + 1) * sizeof (UniChar));
    3842  __convert_codepage (cp_from, ucp);
     
    4145      free (conv);
    4246      errno = EINVAL;
     47      FS_RESTORE();
    4348      return (iconv_t)(-1);
    4449    }
     
    5156      free (conv);
    5257      errno = EINVAL;
     58      FS_RESTORE();
    5359      return (iconv_t)(-1);
    5460    }
     
    6470  UniSetUconvObject (conv->from, &attr);
    6571
     72  FS_RESTORE();
    6673  return conv;
    6774}
     
    7784  UniChar *orig_ucs = ucs;
    7885  size_t retval = 0;
     86  FS_VAR();
    7987
     88  FS_SAVE_LOAD();
    8089  rc = UniUconvToUcs (conv->from, (void **)in, in_left, &ucs, &sl, &retval);
    8190  if (rc)
     
    108117    }
    109118#endif
     119  FS_RESTORE();
    110120  return 0;
    111121
     
    127137      break;
    128138  }
     139  FS_RESTORE();
    129140  return (size_t)(-1);
    130141}
     
    135146  if (conv != (iconv_t)(-1))
    136147    {
     148      FS_VAR();
     149      FS_SAVE_LOAD();
    137150      UniFreeUconvObject (conv->to);
    138151      UniFreeUconvObject (conv->from);
     152      FS_RESTORE();
    139153      free (conv);
    140154    }
Note: See TracChangeset for help on using the changeset viewer.