OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr50723.c] - Blame information for rev 698

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
 
3
typedef short unsigned int wchar_t;
4
typedef unsigned int size_t;
5
int* _errno(void);
6
int WideCharToMultiByte (wchar_t *);
7
int __attribute__ ((__nonnull__ (1)))
8
__wcrtomb_cp (char *dst, wchar_t wc, const unsigned int cp,
9
              const unsigned int mb_max)
10
{
11
  if (cp == 0)     {
12
      if (wc > 255)
13
        (*_errno()) = 42;
14
      return 1;
15
  }
16
  else
17
    return WideCharToMultiByte (&wc);
18
}
19
void wcsrtombs (char *dst, const wchar_t *pwc, unsigned int cp,
20
                unsigned int mb_max)
21
{
22
  if ((__wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
23
    return;
24
  if ((__wcrtomb_cp (dst, *pwc, cp, mb_max)) <= 0)
25
    return;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.