设为首页 加入收藏

TOP

C语言学习趣事_MSCRT_IO_SourceFile (三)
2014-11-24 00:40:18 来源: 作者: 【 】 浏览:253
Tags:语言学习 趣事 _MSCRT_IO_SourceFile
ar *__nullstring; /* string to print on null ptr */
extern wchar_t *__wnullstring; /* string to print on null ptr */
#else /* WPRFLAG || CPRFLAG */
char *__nullstring = "(null)"; /* string to print on null ptr */
wchar_t *__wnullstring = L"(null)";/* string to print on null ptr */
#endif /* WPRFLAG || CPRFLAG */

/* The state table. This table is actually two tables combined into one. */
/* The lower nybble of each byte gives the character class of any */
/* character; while the uper nybble of the byte gives the next state */
/* to enter. See the macros below the table for details. */
/* */
/* The table is generated by maketabc.c -- use this program to make */
/* changes. */

#if defined(WPRFLAG) || defined(CPRFLAG)
extern const char __lookuptable[];
#else /* WPRFLAG/CPRFLAG */
#if defined(_CRUISER_) || defined(_MAC_)

/* Table generated by maketabc.c built with -D_CRUISER_. */

const char __lookuptable[] = {
0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00,
0x10, 0x00, 0x03, 0x06, 0x00, 0x06, 0x02, 0x10,
0x04, 0x45, 0x45, 0x45, 0x05, 0x05, 0x05, 0x05,
0x05, 0x35, 0x30, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x20, 0x20, 0x38, 0x50, 0x58, 0x07, 0x08,
0x00, 0x30, 0x30, 0x30, 0x57, 0x50, 0x07, 0x00,
0x00, 0x20, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00,
0x08, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
0x00, 0x70, 0x70, 0x78, 0x78, 0x78, 0x78, 0x08,
0x07, 0x08, 0x00, 0x00, 0x07, 0x00, 0x08, 0x08,
0x08, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x07,
0x08
};

#else /* ndef _CRUISER_ || _MAC_ */

#if defined(_WIN32_) || defined(_POSIX_)

/* Table generated by maketabc.c built with -D_WIN32_. Defines additional */
/* format code %Z for counted string. */

const char __lookuptable[] = {
0x06, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00,
0x10, 0x00, 0x03, 0x06, 0x00, 0x06, 0x02, 0x10,
0x04, 0x45, 0x45, 0x45, 0x05, 0x05, 0x05, 0x05,
0x05, 0x35, 0x30, 0x00, 0x50, 0x00, 0x00, 0x00,
0x00, 0x20, 0x20, 0x38, 0x50, 0x58, 0x07, 0x08,
0x00, 0x30, 0x30, 0x30, 0x57, 0x50, 0x07, 0x00,
0x00, 0x20, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00,
0x08, 0x60, 0x68, 0x60, 0x60, 0x60, 0x60, 0x00,
0x00, 0x70, 0x70, 0x78, 0x78, 0x78, 0x78, 0x08,
0x07, 0x08, 0x00, 0x00, 0x07, 0x00, 0x08, 0x08,
0x08, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x07,
0x08
};

#else /* ndef _WIN32_ */

#error ERROR - ONLY CRUISER, WIN32, POSIX, OR MAC TARGET SUPPORTED!

#endif /* _WIN32_ || _POSIX_ */

#endif /* _CRUISER_ || _MAC_ */

#endif /* WPRFLAG || CPRFLAG */

#define find_char_class(c) \
((c) < _T(' ') || (c) > _T('x') \
CH_OTHER \
: \
__lookuptable[(c)-_T(' ')] & 0xF)

#define find_next_state(class, state) \
(__lookuptable[(class) * NUMSTATES + (state)] >> 4)


/*
* Note: CPRFLAG and WPRFLAG cases are currently mutually exclusive.
*/

/* prototypes */

#ifdef CPRFLAG

#define WRITE_CHAR(ch, pnw) write_char(ch, pnw)
#define WRITE_MULTI_CHAR(ch, num, pnw) write_multi_char(ch, num, pnw)
#define WRITE_STRING(s, len, pnw) write_string(s, len, pnw)
#define WRITE_WSTRING(s, len, pnw) write_wstring(s, len, pnw)

LOCAL(void) write_char(int ch, int *pnumwritten);
LOCAL(void) write_multi_char(int ch, int num, int *pnumwritten);
LOCAL(void) write_string(char *string, int
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 3/12/12
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇STL 应用之set 下一篇快速计算32位数中1的位数

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: