File: m_36_jis.t

package info (click to toggle)
mcpp 2.7.2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,152 kB
  • ctags: 29,136
  • sloc: ansic: 35,238; sh: 9,241; makefile: 176; cpp: 84; exp: 18
file content (31 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download | duplicates (7)
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
27
28
29
30
31
/*
 * m_36_jis.t:  Handling of 0x5c ('\\'), 0x22 ('"'), 0x27 ('\'')
 * in ISO-2022-JP multi-byte character.
 */

#define     str( a)     # a

/* 36.1:    0x5c in multi-byte character is not an escape character.    */

#pragma __setlocale( "jis")                 /* For MCPP     */
#pragma setlocale( "jis")                   /* For MCPP on VC   */

#if     '字' == '\x3b\x7a' && '移' != '\x30\x5c'
    Bad handling of '\\' in multi-byte character.
#endif

/* 36.2:    # operater should not insert '\\' before 0x5c in multi-byte
        character.  */
    str( "移動");
   /* \x22\x5c\x22\x30\x5c\x46\x30\x5c\x22\x22 with shift-sequence  */

/* 36.3:    # operater should not insert '\\' before 0x22 in multi-byte
        character.  */
    str( "右3柑陽");
   /* \x22\x5c\x22\x31\x22\x4d\x5b\x5c\x22\x22 with shift-sequence  */

/* 36.4:    # operater should not insert '\\' before 0x27 in multi-byte
        character.  */
    str( "右3校宙");
   /* \x22\x5c\x22\x31\x27\x43\x68\x5c\x22\x22 with shift-sequence  */