File: m_34_big5.c

package info (click to toggle)
mcpp 2.7.2-5.3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,440 kB
  • sloc: ansic: 35,245; sh: 9,241; makefile: 116; cpp: 84; exp: 18
file content (26 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* m_34_big5.t: Multi-byte character constant encoded in Big-Five.  */

#include    "defs.h"

main( void)
{
    char *  ptr;

    fputs( "started\n", stderr);

/* 34.1:    */

#pragma __setlocale( "big5")                /* For MCPP     */
#pragma setlocale( "chinese-traditional")   /* For Visual C */

#if     'r' == '\xa6\x72'
    ptr = "Multi-byte character is encoded in Big-Five.";
#else
    ptr = "I cannot understand Big-Five.";
#endif

    assert( strcmp( ptr, "I cannot understand Big-Five.") != 0);
    fputs( "success\n", stderr);
    return  0;
}