#include #include #include #include #include "liblouis.h" #include "louis.h" #include "brl_checks.h" int check_with_mode( const char *tableList, const char *str, const char *typeform, const char *expected, int mode, int direction); void print_int_array(const char *prefix, int *pos_list, int len) { int i; printf("%s ", prefix); for (i = 0; i < len; i++) printf("%d ", pos_list[i]); printf("\n"); } void print_widechars(widechar * buf, int len) { int i; for (i = 0; i < len; i++) printf("%c", buf[i]); } /* Helper function to convert a typeform string of '0's, '1's, '2's etc. to the required format, which is an array of 0s, 1s, 2s, etc. For example, "0000011111000" is converted to {0,0,0,0,0,1,1,1,1,1,0,0,0} The caller is responsible for freeing the returned array. */ char * convert_typeform(const char* typeform_string) { int len = strlen(typeform_string); char *typeform = malloc(len * sizeof(char)); int i; for (i=0; i