tst_types.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. /*
  2. * TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
  3. *
  4. * FILE: tst_types.h
  5. *
  6. * Definitions of data types for each test function
  7. */
  8. #ifndef TST_TYPES_H
  9. #define TST_TYPES_H
  10. #include <stdio.h>
  11. #include <wchar.h>
  12. #include <wctype.h>
  13. #include "tst_funcs.h"
  14. #include "tgn_funcdef.h"
  15. #define MBSSIZE 24
  16. #define WCSSIZE 12
  17. #define MONFMTSIZE 16
  18. #define MONSIZE 64
  19. #define USE_MBCURMAX 99 /* well, but ... */
  20. #define TST_DBL_EPS 2.22153e-16
  21. #define WCSTOK_SEQNUM 3
  22. #define MBLEN_SEQNUM 3
  23. #define MBTOWC_SEQNUM 3
  24. #define MBSTOWCS_SEQNUM 3
  25. #define WCTOMB_SEQNUM 3
  26. #define WCSTOMBS_SEQNUM 3
  27. #define MBRLEN_SEQNUM 3
  28. #define MBRTOWC_SEQNUM 3
  29. #define MBSRTOWCS_SEQNUM 3
  30. #define WCRTOMB_SEQNUM 3
  31. #define WCSRTOMBS_SEQNUM 3
  32. /* Maximum numbers of test in one of the _loc arrays. */
  33. #define MAX_LOC_TEST 300
  34. /*----------------------------------------------------------------------*/
  35. /* FUNCTION */
  36. /*----------------------------------------------------------------------*/
  37. typedef struct
  38. {
  39. char *func_str;
  40. int func_id;
  41. }
  42. TST_FID;
  43. typedef struct
  44. {
  45. int func_id;
  46. const char *locale;
  47. }
  48. TST_HEAD;
  49. typedef struct
  50. {
  51. TST_HEAD *head;
  52. }
  53. TST_FUNCS;
  54. /*----------------------------------------------------------------------*/
  55. /* ISW*: int isw* (wchar_t wc) */
  56. /*----------------------------------------------------------------------*/
  57. TST_ISW_STRUCT (ALNUM, alnum);
  58. TST_ISW_STRUCT (ALPHA, alpha);
  59. TST_ISW_STRUCT (CNTRL, cntrl);
  60. TST_ISW_STRUCT (DIGIT, digit);
  61. TST_ISW_STRUCT (GRAPH, graph);
  62. TST_ISW_STRUCT (LOWER, lower);
  63. TST_ISW_STRUCT (PRINT, print);
  64. TST_ISW_STRUCT (PUNCT, punct);
  65. TST_ISW_STRUCT (SPACE, space);
  66. TST_ISW_STRUCT (UPPER, upper);
  67. TST_ISW_STRUCT (XDIGIT, xdigit);
  68. typedef struct
  69. {
  70. wint_t wc;
  71. const char *ts;
  72. }
  73. TIN_ISWCTYPE_REC;
  74. typedef
  75. TEX_ERRET_REC (int)
  76. TEX_ISWCTYPE_REC;
  77. TMD_RECHEAD (ISWCTYPE);
  78. /*----------------------------------------------------------------------*/
  79. /* MBLEN: int mblen (const char *s, size_t n) */
  80. /*----------------------------------------------------------------------*/
  81. typedef struct
  82. {
  83. char s_flg;
  84. char s[MBSSIZE];
  85. size_t n;
  86. }
  87. TIN_MBLEN_REC;
  88. typedef TEX_ERRET_REC (int) TEX_MBLEN_REC;
  89. TMD_RECHEAD (MBLEN);
  90. /*----------------------------------------------------------------------*/
  91. /* MBRLEN: size_t mbrlen (const char *s, size_t n, mbstate_t *ps) */
  92. /*----------------------------------------------------------------------*/
  93. typedef struct
  94. {
  95. struct
  96. {
  97. int s_flg;
  98. char s[MBSSIZE];
  99. size_t n;
  100. int t_flg;
  101. int t_init;
  102. }
  103. seq[WCSTOK_SEQNUM];
  104. }
  105. TIN_MBRLEN_REC;
  106. typedef TEX_ERRET_REC_SEQ (size_t, MBRLEN_SEQNUM) TEX_MBRLEN_REC;
  107. TMD_RECHEAD (MBRLEN);
  108. /*----------------------------------------------------------------------*/
  109. /* MBRTOWC: size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, */
  110. /* mbstate_t *ps) */
  111. /*----------------------------------------------------------------------*/
  112. typedef struct
  113. {
  114. struct
  115. {
  116. int w_flg;
  117. int s_flg;
  118. char s[MBSSIZE];
  119. size_t n;
  120. int t_flg;
  121. int t_init;
  122. }
  123. seq[MBRTOWC_SEQNUM];
  124. }
  125. TIN_MBRTOWC_REC;
  126. typedef struct
  127. {
  128. struct
  129. {
  130. TMD_ERRET (size_t);
  131. wchar_t wc;
  132. }
  133. seq[MBRTOWC_SEQNUM];
  134. }
  135. TEX_MBRTOWC_REC;
  136. TMD_RECHEAD (MBRTOWC);
  137. /*----------------------------------------------------------------------*/
  138. /* MBSRTOWCS: size_t mbsrtowcs (wchar_t *ws, const char **s, size_t n, */
  139. /* mbstate_t *ps ) */
  140. /*----------------------------------------------------------------------*/
  141. typedef struct
  142. {
  143. struct
  144. {
  145. int w_flg;
  146. char s[MBSSIZE];
  147. size_t n;
  148. int t_flg;
  149. int t_init;
  150. }
  151. seq[MBSRTOWCS_SEQNUM];
  152. }
  153. TIN_MBSRTOWCS_REC;
  154. typedef struct
  155. {
  156. struct
  157. {
  158. TMD_ERRET (size_t);
  159. wchar_t ws[WCSSIZE];
  160. }
  161. seq[MBSRTOWCS_SEQNUM];
  162. }
  163. TEX_MBSRTOWCS_REC;
  164. TMD_RECHEAD (MBSRTOWCS);
  165. /*----------------------------------------------------------------------*/
  166. /* MBSTOWCS: size_t mbstowcs (wchar_t *ws, const char *s, size_t n) */
  167. /*----------------------------------------------------------------------*/
  168. typedef struct
  169. {
  170. struct
  171. {
  172. int w_flg;
  173. int s_flg;
  174. const char *s;
  175. size_t n;
  176. }
  177. seq[MBSTOWCS_SEQNUM];
  178. }
  179. TIN_MBSTOWCS_REC;
  180. typedef TEX_MBSRTOWCS_REC TEX_MBSTOWCS_REC;
  181. /* MBSRTOWCS_SEQNUM == MBSTOWCS_SEQNUM */
  182. TMD_RECHEAD (MBSTOWCS);
  183. /*----------------------------------------------------------------------*/
  184. /* MBTOWC: int mbtowc (wchar_t *wc, const char *s, size_t n) */
  185. /*----------------------------------------------------------------------*/
  186. typedef TIN_MBSTOWCS_REC TIN_MBTOWC_REC;
  187. /* MBTOWC_SEQNUM == MBSTOWCS_SEQNUM */
  188. typedef struct
  189. {
  190. struct
  191. {
  192. TMD_ERRET (int);
  193. wchar_t wc;
  194. }
  195. seq[MBTOWC_SEQNUM];
  196. }
  197. TEX_MBTOWC_REC;
  198. TMD_RECHEAD (MBTOWC);
  199. /*----------------------------------------------------------------------*/
  200. /* STRCOLL: int strcoll (const char *s1, const char *s2) */
  201. /*----------------------------------------------------------------------*/
  202. typedef struct
  203. {
  204. char s1[MBSSIZE];
  205. char s2[MBSSIZE];
  206. }
  207. TIN_STRCOLL_REC;
  208. typedef TEX_ERRET_REC (int) TEX_STRCOLL_REC;
  209. TMD_RECHEAD (STRCOLL);
  210. /*----------------------------------------------------------------------*/
  211. /* STRFMON: size_t strfmon (char *buf, size_t nbytes, */
  212. /* const char *fmt, ... ) */
  213. /*----------------------------------------------------------------------*/
  214. typedef struct
  215. {
  216. int nbytes;
  217. char fmt[MONFMTSIZE];
  218. double val;
  219. }
  220. TIN_STRFMON_REC;
  221. typedef struct
  222. {
  223. TMD_ERRET (size_t);
  224. char mon[MONSIZE];
  225. }
  226. TEX_STRFMON_REC;
  227. TMD_RECHEAD (STRFMON);
  228. /*----------------------------------------------------------------------*/
  229. /* STRXFRM: size_t strxfrm (char *s1, const char *s2, size_t n) */
  230. /*----------------------------------------------------------------------*/
  231. typedef struct
  232. {
  233. char org1[MBSSIZE];
  234. char org2[MBSSIZE];
  235. size_t n1, n2;
  236. }
  237. TIN_STRXFRM_REC;
  238. typedef TEX_ERRET_REC (size_t) TEX_STRXFRM_REC; /* only for org2[] */
  239. TMD_RECHEAD (STRXFRM);
  240. /*----------------------------------------------------------------------*/
  241. /* SWSCANF: int swscanf (const wchar_t *ws, const wchar_t *fmt, ...) */
  242. /*----------------------------------------------------------------------*/
  243. typedef struct
  244. {
  245. wchar_t ws[WCSSIZE * 3];
  246. wchar_t fmt[WCSSIZE * 3];
  247. int wch;
  248. }
  249. TIN_SWSCANF_REC;
  250. typedef struct
  251. {
  252. TMD_ERRET (int);
  253. int val_int; /* %d */
  254. unsigned val_uns; /* %u */
  255. float val_flt; /* %f */
  256. int val_c; /* %c */
  257. char val_s[MBSSIZE * 2]; /* %s */
  258. wchar_t val_S[WCSSIZE * 2]; /* %lc, %ls, %C, %S */
  259. }
  260. TEX_SWSCANF_REC;
  261. TMD_RECHEAD (SWSCANF);
  262. /*----------------------------------------------------------------------*/
  263. /* TOWCTRANS: wint_t towctrans (wint_t wc, wctrans_t desc) */
  264. /*----------------------------------------------------------------------*/
  265. typedef TIN_ISWCTYPE_REC TIN_TOWCTRANS_REC;
  266. typedef TEX_ERRET_REC (wint_t) TEX_TOWCTRANS_REC;
  267. TMD_RECHEAD (TOWCTRANS);
  268. /*----------------------------------------------------------------------*/
  269. /* TOW*ER: wint_t tow*er (wint_t wc) */
  270. /*----------------------------------------------------------------------*/
  271. TST_TOW_STRUCT (LOWER, lower);
  272. TST_TOW_STRUCT (UPPER, upper);
  273. /*----------------------------------------------------------------------*/
  274. /* WCRTOMB: wchar_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps) */
  275. /*----------------------------------------------------------------------*/
  276. typedef struct
  277. {
  278. int s_flg;
  279. wchar_t wc;
  280. int t_flg;
  281. int t_init;
  282. }
  283. TIN_WCRTOMB_REC;
  284. typedef struct
  285. {
  286. TMD_ERRET (wchar_t);
  287. char s[MBSSIZE];
  288. }
  289. TEX_WCRTOMB_REC;
  290. TMD_RECHEAD (WCRTOMB);
  291. /*----------------------------------------------------------------------*/
  292. /* WCSCAT: wchar_t *wcscat (wchar_t *ws1, wchar_t *ws2) */
  293. /*----------------------------------------------------------------------*/
  294. typedef struct
  295. {
  296. wchar_t ws1[WCSSIZE];
  297. wchar_t ws2[WCSSIZE];
  298. }
  299. TIN_WCSCAT_REC;
  300. typedef struct
  301. {
  302. TMD_ERRET (wchar_t *);
  303. wchar_t ws[WCSSIZE];
  304. }
  305. TEX_WCSCAT_REC;
  306. TMD_RECHEAD (WCSCAT);
  307. /*----------------------------------------------------------------------*/
  308. /* WCSCHR: wchar_t *wcschr (wchar_t *ws, wchar_t wc); */
  309. /*----------------------------------------------------------------------*/
  310. typedef struct
  311. {
  312. wchar_t ws[WCSSIZE];
  313. wchar_t wc;
  314. }
  315. TIN_WCSCHR_REC;
  316. typedef TEX_ERRET_REC (wchar_t *) TEX_WCSCHR_REC;
  317. TMD_RECHEAD (WCSCHR);
  318. /*----------------------------------------------------------------------*/
  319. /* WCSCMP: int wcscmp (const wchar_t *ws1, const wchar_t *ws2) */
  320. /*----------------------------------------------------------------------*/
  321. typedef TIN_WCSCAT_REC TIN_WCSCMP_REC;
  322. typedef TEX_ERRET_REC (int) TEX_WCSCMP_REC;
  323. TMD_RECHEAD (WCSCMP);
  324. /*----------------------------------------------------------------------*/
  325. /* WCSCOLL: int wcscoll (const wchar_t *ws1, const wchar_t *ws2) */
  326. /*----------------------------------------------------------------------*/
  327. typedef TIN_WCSCMP_REC TIN_WCSCOLL_REC;
  328. typedef struct
  329. {
  330. TMD_ERRET (int);
  331. int cmp_flg;
  332. }
  333. TEX_WCSCOLL_REC;
  334. TMD_RECHEAD (WCSCOLL);
  335. /*----------------------------------------------------------------------*/
  336. /* WCSCPY: wchar_t *wcscpy (wchar_t *ws1, const wchar_t *ws2) */
  337. /*----------------------------------------------------------------------*/
  338. typedef struct
  339. {
  340. wchar_t ws[WCSSIZE]; /* ws2: original string */
  341. }
  342. TIN_WCSCPY_REC;
  343. typedef TEX_WCSCAT_REC TEX_WCSCPY_REC;
  344. TMD_RECHEAD (WCSCPY);
  345. /*----------------------------------------------------------------------*/
  346. /* WCSCSPN: size_t wcscspn (const wchar_t *ws1, const wchar_t *ws2) */
  347. /*----------------------------------------------------------------------*/
  348. typedef TIN_WCSCAT_REC TIN_WCSCSPN_REC;
  349. typedef TEX_ERRET_REC (size_t) TEX_WCSCSPN_REC;
  350. TMD_RECHEAD (WCSCSPN);
  351. /*----------------------------------------------------------------------*/
  352. /* WCSLEN: size_t wcslen (const wchar_t *ws) */
  353. /*----------------------------------------------------------------------*/
  354. typedef TIN_WCSCPY_REC TIN_WCSLEN_REC;
  355. typedef TEX_ERRET_REC (size_t) TEX_WCSLEN_REC;
  356. TMD_RECHEAD (WCSLEN);
  357. /*----------------------------------------------------------------------*/
  358. /* WCSNCAT: wchar_t *wcsncat (wchar_t *ws1, const wchar_t *ws2, */
  359. /* size_t n) */
  360. /*----------------------------------------------------------------------*/
  361. typedef struct
  362. {
  363. wchar_t ws1[WCSSIZE];
  364. wchar_t ws2[WCSSIZE];
  365. size_t n;
  366. }
  367. TIN_WCSNCAT_REC;
  368. typedef TEX_WCSCAT_REC TEX_WCSNCAT_REC;
  369. TMD_RECHEAD (WCSNCAT);
  370. /*----------------------------------------------------------------------*/
  371. /* WCSNCMP: int *wcsncmp (const wchar_t *ws1, const wchar_t *ws2, */
  372. /* size_t n) */
  373. /*----------------------------------------------------------------------*/
  374. typedef TIN_WCSNCAT_REC TIN_WCSNCMP_REC;
  375. typedef TEX_ERRET_REC (int) TEX_WCSNCMP_REC;
  376. TMD_RECHEAD (WCSNCMP);
  377. /*----------------------------------------------------------------------*/
  378. /* WCSNCPY: wchar_t *wcsncpy (wchar_t *ws1, const wchar_t *ws2, */
  379. /* size_t n) */
  380. /*----------------------------------------------------------------------*/
  381. typedef struct
  382. {
  383. wchar_t ws[WCSSIZE]; /* ws2: original string */
  384. size_t n;
  385. }
  386. TIN_WCSNCPY_REC;
  387. typedef TEX_WCSCPY_REC TEX_WCSNCPY_REC;
  388. TMD_RECHEAD (WCSNCPY);
  389. /*----------------------------------------------------------------------*/
  390. /* WCSPBRK: wchar_t *wcspbrk (const wchar_t *ws1, const wchar_t *ws2) */
  391. /*----------------------------------------------------------------------*/
  392. typedef TIN_WCSCSPN_REC TIN_WCSPBRK_REC;
  393. typedef struct
  394. {
  395. TMD_ERRET (wchar_t *);
  396. wchar_t wc;
  397. }
  398. TEX_WCSPBRK_REC;
  399. TMD_RECHEAD (WCSPBRK);
  400. /*----------------------------------------------------------------------*/
  401. /* WCSRTOMBS: size_t wcsrtombs (char *s, const wchar_t **ws, size_t n, */
  402. /* mbstate_t *ps) */
  403. /*----------------------------------------------------------------------*/
  404. typedef struct
  405. {
  406. int s_flg;
  407. int w_flg; /* don't need this */
  408. wchar_t ws[WCSSIZE];
  409. size_t n;
  410. int t_flg;
  411. int t_init;
  412. }
  413. TIN_WCSRTOMBS_REC;
  414. typedef struct
  415. {
  416. TMD_ERRET (size_t);
  417. char s[MBSSIZE];
  418. }
  419. TEX_WCSRTOMBS_REC;
  420. TMD_RECHEAD (WCSRTOMBS);
  421. /*----------------------------------------------------------------------*/
  422. /* WCSSPN: size_t wcsspn (const wchar_t *ws1, const wchar_t *ws2) */
  423. /*----------------------------------------------------------------------*/
  424. typedef TIN_WCSCSPN_REC TIN_WCSSPN_REC;
  425. typedef TEX_WCSCSPN_REC TEX_WCSSPN_REC;
  426. TMD_RECHEAD (WCSSPN);
  427. /*----------------------------------------------------------------------*/
  428. /* WCSSTR: wchar_t *wcsstr (const wchar_t *ws1, const wchar_t *ws2) */
  429. /*----------------------------------------------------------------------*/
  430. typedef TIN_WCSCSPN_REC TIN_WCSSTR_REC;
  431. typedef TEX_ERRET_REC (wchar_t *) TEX_WCSSTR_REC;
  432. TMD_RECHEAD (WCSSTR);
  433. /*----------------------------------------------------------------------*/
  434. /* WCSTOD: double wcstod (const wchar_t *np, wchar_t **endp) */
  435. /*----------------------------------------------------------------------*/
  436. typedef struct
  437. {
  438. wchar_t np[WCSSIZE];
  439. }
  440. TIN_WCSTOD_REC;
  441. typedef struct
  442. {
  443. TMD_ERRET (double);
  444. double val;
  445. wchar_t fwc;
  446. }
  447. TEX_WCSTOD_REC;
  448. TMD_RECHEAD (WCSTOD);
  449. /*----------------------------------------------------------------------*/
  450. /* WCSTOK: wchar_t *wcstok (wchar_t *ws, const wchar_t *dlm, */
  451. /* wchar_t **pt) */
  452. /*----------------------------------------------------------------------*/
  453. typedef struct
  454. {
  455. struct
  456. {
  457. int w_flg;
  458. wchar_t ws[WCSSIZE];
  459. wchar_t dt[WCSSIZE]; /* delimiter */
  460. }
  461. seq[WCSTOK_SEQNUM];
  462. }
  463. TIN_WCSTOK_REC;
  464. typedef struct
  465. {
  466. struct
  467. {
  468. TMD_ERRET (wchar_t *);
  469. wchar_t ws[WCSSIZE];
  470. }
  471. seq[WCSTOK_SEQNUM];
  472. }
  473. TEX_WCSTOK_REC;
  474. TMD_RECHEAD (WCSTOK);
  475. /*----------------------------------------------------------------------*/
  476. /* WCSTOMBS: size_t wcstombs (char s, const wchar_t *ws, size_t n) */
  477. /*----------------------------------------------------------------------*/
  478. typedef struct
  479. {
  480. int s_flg;
  481. int w_flg; /* currently we don't need it. */
  482. wchar_t ws[WCSSIZE];
  483. size_t n;
  484. }
  485. TIN_WCSTOMBS_REC;
  486. typedef struct
  487. {
  488. TMD_ERRET (size_t);
  489. char s[MBSSIZE];
  490. }
  491. TEX_WCSTOMBS_REC;
  492. TMD_RECHEAD (WCSTOMBS);
  493. /*----------------------------------------------------------------------*/
  494. /* WCSWIDTH: int wcswidth (const wchar_t *ws, size_t n) */
  495. /*----------------------------------------------------------------------*/
  496. typedef TIN_WCSNCPY_REC TIN_WCSWIDTH_REC;
  497. typedef TEX_ERRET_REC (int) TEX_WCSWIDTH_REC;
  498. TMD_RECHEAD (WCSWIDTH);
  499. /*----------------------------------------------------------------------*/
  500. /* WCSXFRM: size_t wcsxfrm (wchar_t *ws1, const wchar_t *ws2, size_t n)*/
  501. /*----------------------------------------------------------------------*/
  502. typedef struct
  503. {
  504. wchar_t org1[WCSSIZE];
  505. wchar_t org2[WCSSIZE];
  506. int n1, n2;
  507. }
  508. TIN_WCSXFRM_REC;
  509. typedef TEX_ERRET_REC (size_t) TEX_WCSXFRM_REC; /* only for org2[] */
  510. TMD_RECHEAD (WCSXFRM);
  511. /*----------------------------------------------------------------------*/
  512. /* WCTOB: int wctob (wint_t wc) */
  513. /*----------------------------------------------------------------------*/
  514. typedef struct
  515. {
  516. wint_t wc;
  517. }
  518. TIN_WCTOB_REC;
  519. typedef TEX_ERRET_REC (int) TEX_WCTOB_REC;
  520. TMD_RECHEAD (WCTOB);
  521. /*----------------------------------------------------------------------*/
  522. /* WCTOMB: int wctomb (char *s, wchar_t wc) */
  523. /*----------------------------------------------------------------------*/
  524. typedef struct
  525. {
  526. int s_flg;
  527. wchar_t wc;
  528. }
  529. TIN_WCTOMB_REC;
  530. typedef struct
  531. {
  532. TMD_ERRET (int);
  533. char s[MBSSIZE];
  534. }
  535. TEX_WCTOMB_REC;
  536. TMD_RECHEAD (WCTOMB);
  537. /*----------------------------------------------------------------------*/
  538. /* WCTRANS: wctrans_t wctrans (const char *charclass) */
  539. /*----------------------------------------------------------------------*/
  540. typedef struct
  541. {
  542. char class[MBSSIZE];
  543. }
  544. TIN_WCTRANS_REC;
  545. typedef TEX_ERRET_REC (wctrans_t) TEX_WCTRANS_REC;
  546. TMD_RECHEAD (WCTRANS);
  547. /*----------------------------------------------------------------------*/
  548. /* WCTYPE: wctype_t wctype (const char *class) */
  549. /*----------------------------------------------------------------------*/
  550. typedef TIN_WCTRANS_REC TIN_WCTYPE_REC;
  551. typedef TEX_ERRET_REC (wctype_t) TEX_WCTYPE_REC;
  552. TMD_RECHEAD (WCTYPE);
  553. /*----------------------------------------------------------------------*/
  554. /* WCWIDTH: int wcwidth (wchar_t wc) */
  555. /*----------------------------------------------------------------------*/
  556. typedef struct
  557. {
  558. wchar_t wc;
  559. }
  560. TIN_WCWIDTH_REC;
  561. typedef TEX_ERRET_REC (int) TEX_WCWIDTH_REC;
  562. TMD_RECHEAD (WCWIDTH);
  563. #endif /* TST_TYPES_H */