/* Code originally from Raimund Steger. */ #include #include #include #include #include #define NTHR 100 #define NTEST 100 struct thr_arg_s { int thr_num; }; static void test_match(int thr_num,int test_num) { FcPattern *pat; FcPattern *match; FcResult result; FcInit(); pat = FcNameParse((const FcChar8 *)"New Century Schoolbook"); FcConfigSubstitute(0,pat,FcMatchPattern); FcDefaultSubstitute(pat); match = FcFontMatch(0,pat,&result); FcPatternDestroy(pat); FcPatternDestroy(match); } static void *run_test_in_thread(void *arg) { struct thr_arg_s *thr_arg=(struct thr_arg_s *)arg; int thread_num = thr_arg->thr_num; int i=0; for(;i