home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / dev / gcc / libnixV0_8.lha / gnu / libnix-sources.lha / sources / nix / stdio / wcstombs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-12  |  304 b   |  15 lines

  1. #include <stdlib.h>
  2.  
  3. /* Sorry, the Amiga OS locale currently doesn't support
  4.  * character sets other than ECMA Latin 1, so this is
  5.  * just a "C" locale function 
  6.  */
  7. size_t wcstombs(char *s,const wchar_t *wc,size_t n)
  8. { size_t l=0;
  9.   while(n--&&*wc)
  10.   { *s++=*wc++;
  11.     l++; }
  12.   *s++='\0';
  13.   return l;
  14. }
  15.