Back to index

glibc  2.9
dat_isw-funcs.h
Go to the documentation of this file.
00001 /*
00002  *  TEST SUITE FOR MB/WC FUNCTIONS IN C LIBRARY
00003  *
00004  *      FILE: dat_isw-funcs.h
00005  *
00006  *      ISW*: int isw* (wint_t wc);
00007  */
00008 
00009 #include <errno.h>
00010 #include <stdlib.h>
00011 #include <wctype.h>
00012 #include "tst_types.h"
00013 #include "tgn_locdef.h"
00014 
00015 #define TST_ISW_LOC(FUNC, func) \
00016        TST_ISW## FUNC         tst_isw## func ##_loc []
00017 
00018 #define TST_ISW_REC(locale, func) \
00019        {  Tisw## func,         TST_LOC_## locale  },
00020 
00021 /*
00022  *  NOTE:
00023  *    Set ret_flg = 1, when a return value is expected to be 0 (FALSE).
00024  *    Set ret_flg = 0, when a return value is expected to be non-zero (TRUE).
00025  *
00026  *    Since the functions return *non*-zero value for TRUE, can't
00027  *    compare an actual return value with an expected return value.
00028  *    Set the ret_flg=0 for TRUE cases and the tst_isw*() will check
00029  *    the non-zero value.
00030  *
00031  *    { { WEOF }, { 0,1,0 } },
00032  *                  | |
00033  *                  | ret_val: an expected return value
00034  *                  ret_flg: if 1, compare an actual return value with the
00035  *                          ret_val; if 0, the test program
00036  *                          checks the actual return value.
00037  */