~ubuntu-branches/ubuntu/edgy/mcpp/edgy

« back to all changes in this revision

Viewing changes to test-c/m_34_jis.c

  • Committer: Bazaar Package Importer
  • Author(s): NIIBE Yutaka
  • Date: 2005-04-16 15:58:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050416155816-q9a9ipx724qvf3le
Tags: 2.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* m_34_jis.c:  Multi-byte character constant encoded in ISO-2022-JP.   */
 
2
 
 
3
#include    "defs.h"
 
4
 
 
5
main( void)
 
6
{
 
7
    char *  ptr;
 
8
 
 
9
    fputs( "started\n", stderr);
 
10
 
 
11
/* 34.1:    */
 
12
 
 
13
#pragma __setlocale( "jis")                 /* For MCPP     */
 
14
#pragma setlocale( "jis")                   /* For MCPP on VC   */
 
15
 
 
16
#if     '$B;z(B' == '\x3b\x7a'
 
17
    /* This line doesn't work unless "shift states" are processed.  */
 
18
    ptr = "Multi-byte character is encoded in ISO-2022-JP.";
 
19
#else
 
20
    ptr = "I cannot understand ISO-2022-JP.";
 
21
#endif
 
22
 
 
23
    assert( strcmp( ptr, "I cannot understand ISO-2022-JP.") != 0);
 
24
    fputs( "success\n", stderr);
 
25
    return  0;
 
26
}
 
27