_lou_resetPassVariables:
   35|    275|_lou_resetPassVariables(void) {
   36|    275|	memset(passVariables, 0, sizeof(passVariables[0]) * NUMVAR);
  ------------------
  |  |   58|    275|#define NUMVAR 50
  ------------------
   37|    275|}
_lou_handlePassVariableTest:
   40|    141|_lou_handlePassVariableTest(const widechar *instructions, int *IC, int *itsTrue) {
   41|    141|	switch (instructions[*IC]) {
   42|      0|	case pass_eq:
  ------------------
  |  Branch (42:2): [True: 0, False: 141]
  ------------------
   43|      0|		if (passVariables[instructions[*IC + 1]] != instructions[*IC + 2]) *itsTrue = 0;
  ------------------
  |  Branch (43:7): [True: 0, False: 0]
  ------------------
   44|      0|		*IC += 3;
   45|      0|		return 1;
   46|       |
   47|      0|	case pass_lt:
  ------------------
  |  Branch (47:2): [True: 0, False: 141]
  ------------------
   48|      0|		if (passVariables[instructions[*IC + 1]] >= instructions[*IC + 2]) *itsTrue = 0;
  ------------------
  |  Branch (48:7): [True: 0, False: 0]
  ------------------
   49|      0|		*IC += 3;
   50|      0|		return 1;
   51|       |
   52|      0|	case pass_gt:
  ------------------
  |  Branch (52:2): [True: 0, False: 141]
  ------------------
   53|      0|		if (passVariables[instructions[*IC + 1]] <= instructions[*IC + 2]) *itsTrue = 0;
  ------------------
  |  Branch (53:7): [True: 0, False: 0]
  ------------------
   54|      0|		*IC += 3;
   55|      0|		return 1;
   56|       |
   57|     31|	case pass_lteq:
  ------------------
  |  Branch (57:2): [True: 31, False: 110]
  ------------------
   58|     31|		if (passVariables[instructions[*IC + 1]] > instructions[*IC + 2]) *itsTrue = 0;
  ------------------
  |  Branch (58:7): [True: 29, False: 2]
  ------------------
   59|     31|		*IC += 3;
   60|     31|		return 1;
   61|       |
   62|      0|	case pass_gteq:
  ------------------
  |  Branch (62:2): [True: 0, False: 141]
  ------------------
   63|      0|		if (passVariables[instructions[*IC + 1]] < instructions[*IC + 2]) *itsTrue = 0;
  ------------------
  |  Branch (63:7): [True: 0, False: 0]
  ------------------
   64|      0|		*IC += 3;
   65|      0|		return 1;
   66|       |
   67|    110|	default:
  ------------------
  |  Branch (67:2): [True: 110, False: 31]
  ------------------
   68|    110|		return 0;
   69|    141|	}
   70|    141|}
_lou_handlePassVariableAction:
   73|   119k|_lou_handlePassVariableAction(const widechar *instructions, int *IC) {
   74|   119k|	switch (instructions[*IC]) {
   75|  5.43k|	case pass_eq:
  ------------------
  |  Branch (75:2): [True: 5.43k, False: 114k]
  ------------------
   76|  5.43k|		passVariables[instructions[*IC + 1]] = instructions[*IC + 2];
   77|  5.43k|		*IC += 3;
   78|  5.43k|		return 1;
   79|       |
   80|      0|	case pass_hyphen:
  ------------------
  |  Branch (80:2): [True: 0, False: 119k]
  ------------------
   81|      0|		passVariables[instructions[*IC + 1]] -= 1;
   82|      0|		if (passVariables[instructions[*IC + 1]] < 0)
  ------------------
  |  Branch (82:7): [True: 0, False: 0]
  ------------------
   83|      0|			passVariables[instructions[*IC + 1]] = 0;
   84|      0|		*IC += 2;
   85|      0|		return 1;
   86|       |
   87|  76.8k|	case pass_plus:
  ------------------
  |  Branch (87:2): [True: 76.8k, False: 43.0k]
  ------------------
   88|  76.8k|		if (passVariables[instructions[*IC + 1]] < MAXVARVALUE)
  ------------------
  |  |   59|  76.8k|#define MAXVARVALUE 255
  ------------------
  |  Branch (88:7): [True: 3.82k, False: 73.0k]
  ------------------
   89|  3.82k|			passVariables[instructions[*IC + 1]] += 1;
   90|  76.8k|		*IC += 2;
   91|  76.8k|		return 1;
   92|       |
   93|  37.6k|	default:
  ------------------
  |  Branch (93:2): [True: 37.6k, False: 82.2k]
  ------------------
   94|  37.6k|		return 0;
   95|   119k|	}
   96|   119k|}

_lou_getALine:
  341|  1.07k|_lou_getALine(FileInfo *file) {
  342|       |	/* Read a line of widechar's from an input file */
  343|  1.07k|	int ch;
  344|  1.07k|	file->linelen = 0;
  345|  68.1k|	while ((ch = getAChar(file)) != EOF) {
  ------------------
  |  Branch (345:9): [True: 67.9k, False: 276]
  ------------------
  346|  67.9k|		if (ch == 13) continue;
  ------------------
  |  Branch (346:7): [True: 83, False: 67.8k]
  ------------------
  347|  67.8k|		if (ch == 10 || file->linelen >= MAXSTRING - 1) break;
  ------------------
  |  |   80|  67.0k|#define MAXSTRING 2048
  ------------------
  |  Branch (347:7): [True: 796, False: 67.0k]
  |  Branch (347:19): [True: 0, False: 67.0k]
  ------------------
  348|  67.0k|		file->line[file->linelen++] = (widechar)ch;
  349|  67.0k|	}
  350|  1.07k|	file->line[file->linelen] = 0;
  351|  1.07k|	file->linepos = 0;
  352|  1.07k|	if (ch == EOF && !file->linelen) return 0;
  ------------------
  |  Branch (352:6): [True: 276, False: 796]
  |  Branch (352:19): [True: 144, False: 132]
  ------------------
  353|    928|	file->lineNumber++;
  354|    928|	return 1;
  355|  1.07k|}
_lou_getDotsForChar:
  653|   108k|_lou_getDotsForChar(widechar c, const DisplayTableHeader *table) {
  654|   108k|	CharDotsMapping *cdPtr = getDotsForChar(c, table);
  655|   108k|	if (cdPtr) return cdPtr->found;
  ------------------
  |  Branch (655:6): [True: 52.0k, False: 56.1k]
  ------------------
  656|  56.1k|	return LOU_DOTS;
  657|   108k|}
_lou_findOpcodeName:
 1204|      8|_lou_findOpcodeName(TranslationTableOpcode opcode) {
 1205|      8|	static char scratchBuf[MAXSTRING];
 1206|       |	/* Used by tools such as lou_debug */
 1207|      8|	if (opcode < 0 || opcode >= CTO_None) {
  ------------------
  |  Branch (1207:6): [True: 0, False: 8]
  |  Branch (1207:20): [True: 0, False: 8]
  ------------------
 1208|      0|		sprintf(scratchBuf, "%u", opcode);
 1209|      0|		return scratchBuf;
 1210|      0|	}
 1211|      8|	return opcodeNames[opcode];
 1212|      8|}
_lou_extParseChars:
 1381|    125|_lou_extParseChars(const char *inString, widechar *outString) {
 1382|       |	/* Parse external character strings */
 1383|    125|	CharsString wideIn;
 1384|    125|	CharsString result;
 1385|    125|	int k;
 1386|  89.7k|	for (k = 0; inString[k] && k < MAXSTRING - 1; k++) wideIn.chars[k] = inString[k];
  ------------------
  |  |   80|  89.6k|#define MAXSTRING 2048
  ------------------
  |  Branch (1386:14): [True: 89.6k, False: 110]
  |  Branch (1386:29): [True: 89.6k, False: 15]
  ------------------
 1387|    125|	wideIn.chars[k] = 0;
 1388|    125|	wideIn.length = k;
 1389|    125|	if (!parseChars(NULL, &result, &wideIn)) return 0;
  ------------------
  |  Branch (1389:6): [True: 8, False: 117]
  ------------------
 1390|   128k|	for (k = 0; k < result.length; k++) outString[k] = result.chars[k];
  ------------------
  |  Branch (1390:14): [True: 128k, False: 117]
  ------------------
 1391|    117|	return result.length;
 1392|    125|}
_lou_getTablePath:
 4779|    138|_lou_getTablePath(void) {
 4780|    138|	char searchPath[MAXSTRING];
 4781|    138|	int remaining = MAXSTRING;
  ------------------
  |  |   80|    138|#define MAXSTRING 2048
  ------------------
 4782|    138|	char *path;
 4783|    138|	char *cp;
 4784|    138|	int envset = 0;
 4785|    138|	cp = searchPath;
 4786|    138|	path = getenv("LOUIS_TABLEPATH");
 4787|    138|	if (path != NULL && path[0] != '\0') {
  ------------------
  |  Branch (4787:6): [True: 0, False: 138]
  |  Branch (4787:22): [True: 0, False: 0]
  ------------------
 4788|      0|		envset = 1;
 4789|      0|		int written = snprintf(cp, remaining, ",%s", path);
 4790|      0|		if (written < 0 || written >= remaining) {
  ------------------
  |  Branch (4790:7): [True: 0, False: 0]
  |  Branch (4790:22): [True: 0, False: 0]
  ------------------
 4791|      0|			_lou_logMessage(LOU_LOG_ERROR, "LOUIS_TABLEPATH too long");
 4792|      0|			return NULL;
 4793|      0|		}
 4794|      0|		cp += written;
 4795|      0|		remaining -= written;
 4796|      0|	}
 4797|    138|	path = dataPathPtr;
 4798|    138|	if (path != NULL && path[0] != '\0') {
  ------------------
  |  Branch (4798:6): [True: 0, False: 138]
  |  Branch (4798:22): [True: 0, False: 0]
  ------------------
 4799|      0|		int written = snprintf(cp, remaining, ",%s%c%s%c%s", path, DIR_SEP, "liblouis",
  ------------------
  |  |   50|      0|#define DIR_SEP '/'
  ------------------
 4800|      0|				DIR_SEP, "tables");
  ------------------
  |  |   50|      0|#define DIR_SEP '/'
  ------------------
 4801|      0|		if (written < 0 || written >= remaining) {
  ------------------
  |  Branch (4801:7): [True: 0, False: 0]
  |  Branch (4801:22): [True: 0, False: 0]
  ------------------
 4802|      0|			_lou_logMessage(LOU_LOG_ERROR, "Data path too long");
 4803|      0|			return NULL;
 4804|      0|		}
 4805|      0|		cp += written;
 4806|      0|		remaining -= written;
 4807|      0|	}
 4808|    138|	if (!envset) {
  ------------------
  |  Branch (4808:6): [True: 138, False: 0]
  ------------------
 4809|       |#ifdef _WIN32
 4810|       |		path = lou_getProgramPath();
 4811|       |		if (path != NULL) {
 4812|       |			if (path[0] != '\0') {
 4813|       |				// assuming the following directory structure:
 4814|       |				// .
 4815|       |				// ├── bin
 4816|       |				// │   ├── liblouis.dll
 4817|       |				// ├── include
 4818|       |				// ├── lib
 4819|       |				// └── share
 4820|       |				//     ├── doc
 4821|       |				//     ├── info
 4822|       |				//     └── liblouis
 4823|       |				//         └── tables
 4824|       |				int written = snprintf(
 4825|       |						cp, remaining, ",%s%s", path, "\\..\\share\\liblouis\\tables");
 4826|       |				if (written < 0 || written >= remaining) {
 4827|       |					_lou_logMessage(LOU_LOG_ERROR, "Program path too long");
 4828|       |					free(path);
 4829|       |					return NULL;
 4830|       |				}
 4831|       |				cp += written;
 4832|       |				remaining -= written;
 4833|       |			}
 4834|       |			free(path);
 4835|       |		}
 4836|       |#else
 4837|    138|		int written = snprintf(cp, remaining, ",%s", TABLESDIR);
 4838|    138|		if (written < 0 || written >= remaining) {
  ------------------
  |  Branch (4838:7): [True: 0, False: 138]
  |  Branch (4838:22): [True: 0, False: 138]
  ------------------
 4839|      0|			_lou_logMessage(LOU_LOG_ERROR, "TABLESDIR too long");
 4840|      0|			return NULL;
 4841|      0|		}
 4842|    138|		cp += written;
 4843|    138|		remaining -= written;
 4844|    138|#endif
 4845|    138|	}
 4846|    138|	if (searchPath[0] != '\0')
  ------------------
  |  Branch (4846:6): [True: 138, False: 0]
  ------------------
 4847|    138|		return strdup(&searchPath[1]);
 4848|      0|	else
 4849|      0|		return strdup(".");
 4850|    138|}
_lou_defaultTableResolver:
 4867|    138|_lou_defaultTableResolver(const char *tableList, const char *base) {
 4868|    138|	char *searchPath;
 4869|    138|	char **tableFiles;
 4870|    138|	char *subTable;
 4871|    138|	char *tableList_copy;
 4872|    138|	char *cp;
 4873|    138|	int last;
 4874|    138|	int k;
 4875|       |
 4876|       |	/* Set up search path */
 4877|    138|	searchPath = _lou_getTablePath();
 4878|       |
 4879|       |	/* Count number of subtables in table list */
 4880|    138|	k = 0;
 4881|  3.06k|	for (cp = (char *)tableList; *cp != '\0'; cp++)
  ------------------
  |  Branch (4881:31): [True: 2.92k, False: 138]
  ------------------
 4882|  2.92k|		if (*cp == ',') k++;
  ------------------
  |  Branch (4882:7): [True: 0, False: 2.92k]
  ------------------
 4883|    138|	tableFiles = (char **)calloc(k + 2, sizeof(char *));
 4884|    138|	if (!tableFiles) _lou_outOfMemory();
  ------------------
  |  Branch (4884:6): [True: 0, False: 138]
  ------------------
 4885|       |
 4886|       |	/* Resolve subtables */
 4887|    138|	k = 0;
 4888|    138|	tableList_copy = strdup(tableList);
 4889|    138|	for (subTable = tableList_copy;; subTable = cp + 1) {
 4890|  3.06k|		for (cp = subTable; *cp != '\0' && *cp != ','; cp++);
  ------------------
  |  Branch (4890:23): [True: 2.92k, False: 138]
  |  Branch (4890:38): [True: 2.92k, False: 0]
  ------------------
 4891|    138|		last = (*cp == '\0');
 4892|    138|		*cp = '\0';
 4893|    138|		if (!(tableFiles[k++] = resolveSubtable(subTable, base, searchPath))) {
  ------------------
  |  Branch (4893:7): [True: 0, False: 138]
  ------------------
 4894|      0|			char *path;
 4895|      0|			_lou_logMessage(LOU_LOG_ERROR, "Cannot resolve table '%s'", subTable);
 4896|      0|			path = getenv("LOUIS_TABLEPATH");
 4897|      0|			if (path != NULL && path[0] != '\0')
  ------------------
  |  Branch (4897:8): [True: 0, False: 0]
  |  Branch (4897:24): [True: 0, False: 0]
  ------------------
 4898|      0|				_lou_logMessage(LOU_LOG_ERROR, "LOUIS_TABLEPATH=%s", path);
 4899|      0|			free(searchPath);
 4900|      0|			free(tableList_copy);
 4901|      0|			lou_freeTableFiles(tableFiles);
 4902|      0|			return NULL;
 4903|      0|		}
 4904|    138|		if (k == 1) base = subTable;
  ------------------
  |  Branch (4904:7): [True: 138, False: 0]
  ------------------
 4905|    138|		if (last) break;
  ------------------
  |  Branch (4905:7): [True: 138, False: 0]
  ------------------
 4906|    138|	}
 4907|    138|	free(searchPath);
 4908|    138|	free(tableList_copy);
 4909|       |	tableFiles[k] = NULL;
 4910|    138|	return tableFiles;
 4911|    138|}
_lou_resolveTable:
 4933|    138|_lou_resolveTable(const char *tableList, const char *base) {
 4934|    138|	if (!tableResolver) {
  ------------------
  |  Branch (4934:6): [True: 0, False: 138]
  ------------------
 4935|      0|		_lou_logMessage(LOU_LOG_ERROR, "Table resolver is not set");
 4936|      0|		return NULL;
 4937|      0|	}
 4938|    138|	char **tableFiles = (*tableResolver)(tableList, base);
 4939|    138|	char **result = copyStringArray(tableFiles);
 4940|    138|	if (tableResolver == &_lou_defaultTableResolver) lou_freeTableFiles(tableFiles);
  ------------------
  |  Branch (4940:6): [True: 138, False: 0]
  ------------------
 4941|    138|	return result;
 4942|    138|}
lou_freeTableFiles:
 5031|    276|lou_freeTableFiles(char **tables) {
 5032|    276|	if (!tables) return;
  ------------------
  |  Branch (5032:6): [True: 0, False: 276]
  ------------------
 5033|    552|	for (char **table = tables; *table; table++) free(*table);
  ------------------
  |  Branch (5033:30): [True: 276, False: 276]
  ------------------
 5034|    276|	free(tables);
 5035|    276|}
_lou_getTable:
 5204|    254|		const DisplayTableHeader **displayTable) {
 5205|    254|	TranslationTableHeader *newTable = NULL;
 5206|    254|	DisplayTableHeader *newDisplayTable = NULL;
 5207|    254|	getTable(tableList, displayTableList, &newTable, &newDisplayTable);
 5208|    254|	if (newTable)
  ------------------
  |  Branch (5208:6): [True: 241, False: 13]
  ------------------
 5209|    241|		if (!finalizeTable(newTable)) newTable = NULL;
  ------------------
  |  Branch (5209:7): [True: 0, False: 241]
  ------------------
 5210|    254|	*translationTable = newTable;
 5211|    254|	*displayTable = newDisplayTable;
 5212|    254|}
lou_getTable:
 5216|    138|lou_getTable(const char *tableList) {
 5217|    138|	const TranslationTableHeader *table = NULL;
 5218|    138|	const DisplayTableHeader *displayTable = NULL;
 5219|    138|	_lou_getTable(tableList, tableList, &table, &displayTable);
 5220|    138|	if (!table || !displayTable) return NULL;
  ------------------
  |  Branch (5220:6): [True: 13, False: 125]
  |  Branch (5220:16): [True: 0, False: 125]
  ------------------
 5221|    125|	return table;
 5222|    138|}
getTable:
 5242|    254|		TranslationTableHeader **translationTable, DisplayTableHeader **displayTable) {
 5243|       |	/* Keep track of which tables have already been compiled */
 5244|    254|	int translationTableListLen, displayTableListLen = 0;
 5245|    254|	if (translationTableList == NULL || *translationTableList == 0)
  ------------------
  |  Branch (5245:6): [True: 0, False: 254]
  |  Branch (5245:38): [True: 0, False: 254]
  ------------------
 5246|      0|		translationTable = NULL;
 5247|    254|	if (displayTableList == NULL || *displayTableList == 0) displayTable = NULL;
  ------------------
  |  Branch (5247:6): [True: 0, False: 254]
  |  Branch (5247:34): [True: 0, False: 254]
  ------------------
 5248|       |	/* See if translation table has already been compiled */
 5249|    254|	if (translationTable) {
  ------------------
  |  Branch (5249:6): [True: 254, False: 0]
  ------------------
 5250|    254|		translationTableListLen = (int)strlen(translationTableList);
 5251|    254|		*translationTable = NULL;
 5252|    254|		TranslationTableChainEntry *currentEntry = translationTableChain;
 5253|    254|		TranslationTableChainEntry *prevEntry = NULL;
 5254|    254|		while (currentEntry != NULL) {
  ------------------
  |  Branch (5254:10): [True: 116, False: 138]
  ------------------
 5255|    116|			if (translationTableListLen == currentEntry->tableListLength &&
  ------------------
  |  Branch (5255:8): [True: 116, False: 0]
  ------------------
 5256|    116|					(memcmp(&currentEntry->tableList[0], translationTableList,
  ------------------
  |  Branch (5256:6): [True: 116, False: 0]
  ------------------
 5257|    116|							translationTableListLen)) == 0) {
 5258|       |				/* Move the table to the top of the table chain. */
 5259|    116|				if (prevEntry != NULL) {
  ------------------
  |  Branch (5259:9): [True: 0, False: 116]
  ------------------
 5260|      0|					prevEntry->next = currentEntry->next;
 5261|      0|					currentEntry->next = translationTableChain;
 5262|      0|					translationTableChain = currentEntry;
 5263|      0|				}
 5264|    116|				*translationTable = currentEntry->table;
 5265|    116|				break;
 5266|    116|			}
 5267|      0|			prevEntry = currentEntry;
 5268|      0|			currentEntry = currentEntry->next;
 5269|      0|		}
 5270|    254|	}
 5271|       |	/* See if display table has already been compiled */
 5272|    254|	if (displayTable) {
  ------------------
  |  Branch (5272:6): [True: 254, False: 0]
  ------------------
 5273|    254|		displayTableListLen = (int)strlen(displayTableList);
 5274|    254|		*displayTable = NULL;
 5275|    254|		DisplayTableChainEntry *currentEntry = displayTableChain;
 5276|    254|		DisplayTableChainEntry *prevEntry = NULL;
 5277|    254|		while (currentEntry != NULL) {
  ------------------
  |  Branch (5277:10): [True: 116, False: 138]
  ------------------
 5278|    116|			if (displayTableListLen == currentEntry->tableListLength &&
  ------------------
  |  Branch (5278:8): [True: 116, False: 0]
  ------------------
 5279|    116|					(memcmp(&currentEntry->tableList[0], displayTableList,
  ------------------
  |  Branch (5279:6): [True: 116, False: 0]
  ------------------
 5280|    116|							displayTableListLen)) == 0) {
 5281|       |				/* Move the table to the top of the table chain. */
 5282|    116|				if (prevEntry != NULL) {
  ------------------
  |  Branch (5282:9): [True: 0, False: 116]
  ------------------
 5283|      0|					prevEntry->next = currentEntry->next;
 5284|      0|					currentEntry->next = displayTableChain;
 5285|      0|					displayTableChain = currentEntry;
 5286|      0|				}
 5287|    116|				*displayTable = currentEntry->table;
 5288|    116|				break;
 5289|    116|			}
 5290|      0|			prevEntry = currentEntry;
 5291|      0|			currentEntry = currentEntry->next;
 5292|      0|		}
 5293|    254|	}
 5294|    254|	if ((translationTable && *translationTable == NULL) ||
  ------------------
  |  Branch (5294:7): [True: 254, False: 0]
  |  Branch (5294:27): [True: 138, False: 116]
  ------------------
 5295|    138|			(displayTable && *displayTable == NULL)) {
  ------------------
  |  Branch (5295:5): [True: 116, False: 0]
  |  Branch (5295:21): [True: 0, False: 116]
  ------------------
 5296|    138|		TranslationTableHeader *newTranslationTable = NULL;
 5297|    138|		DisplayTableHeader *newDisplayTable = NULL;
 5298|    138|		if (compileTable(translationTableList, displayTableList,
  ------------------
  |  Branch (5298:7): [True: 125, False: 13]
  ------------------
 5299|    138|					(translationTable && *translationTable == NULL) ? &newTranslationTable
  ------------------
  |  Branch (5299:7): [True: 138, False: 0]
  |  Branch (5299:27): [True: 138, False: 0]
  ------------------
 5300|    138|																	: NULL,
 5301|    138|					(displayTable && *displayTable == NULL) ? &newDisplayTable : NULL)) {
  ------------------
  |  Branch (5301:7): [True: 138, False: 0]
  |  Branch (5301:23): [True: 138, False: 0]
  ------------------
 5302|       |			/* Add a new entry to the top of the table chain. */
 5303|    125|			if (newTranslationTable != NULL) {
  ------------------
  |  Branch (5303:8): [True: 125, False: 0]
  ------------------
 5304|    125|				int entrySize =
 5305|    125|						sizeof(TranslationTableChainEntry) + translationTableListLen;
 5306|    125|				TranslationTableChainEntry *newEntry = malloc(entrySize);
 5307|    125|				if (!newEntry) _lou_outOfMemory();
  ------------------
  |  Branch (5307:9): [True: 0, False: 125]
  ------------------
 5308|    125|				newEntry->next = translationTableChain;
 5309|    125|				newEntry->table = newTranslationTable;
 5310|    125|				newEntry->tableListLength = translationTableListLen;
 5311|    125|				memcpy(&newEntry->tableList[0], translationTableList,
 5312|    125|						translationTableListLen);
 5313|    125|				translationTableChain = newEntry;
 5314|    125|				*translationTable = newTranslationTable;
 5315|    125|			}
 5316|    125|			if (newDisplayTable != NULL) {
  ------------------
  |  Branch (5316:8): [True: 125, False: 0]
  ------------------
 5317|    125|				int entrySize = sizeof(DisplayTableChainEntry) + displayTableListLen;
 5318|    125|				DisplayTableChainEntry *newEntry = malloc(entrySize);
 5319|    125|				if (!newEntry) _lou_outOfMemory();
  ------------------
  |  Branch (5319:9): [True: 0, False: 125]
  ------------------
 5320|    125|				newEntry->next = displayTableChain;
 5321|    125|				newEntry->table = newDisplayTable;
 5322|    125|				newEntry->tableListLength = displayTableListLen;
 5323|    125|				memcpy(&newEntry->tableList[0], displayTableList, displayTableListLen);
 5324|    125|				displayTableChain = newEntry;
 5325|    125|				*displayTable = newDisplayTable;
 5326|    125|			}
 5327|    125|		} else {
 5328|     13|			_lou_logMessage(
 5329|     13|					LOU_LOG_ERROR, "%s could not be compiled", translationTableList);
 5330|     13|			return;
 5331|     13|		}
 5332|    138|	}
 5333|    254|}
lou_checkTable:
 5336|    138|lou_checkTable(const char *tableList) {
 5337|    138|	if (lou_getTable(tableList)) return 1;
  ------------------
  |  Branch (5337:6): [True: 125, False: 13]
  ------------------
 5338|     13|	return 0;
 5339|    138|}
_lou_allocMem:
 5363|    643|_lou_allocMem(AllocBuf buffer, int index, int srcmax, int destmax) {
 5364|    643|	if (srcmax < 1024) srcmax = 1024;
  ------------------
  |  Branch (5364:6): [True: 509, False: 134]
  ------------------
 5365|    643|	if (destmax < 1024) destmax = 1024;
  ------------------
  |  Branch (5365:6): [True: 95, False: 548]
  ------------------
 5366|    643|	switch (buffer) {
 5367|      0|	case alloc_typebuf:
  ------------------
  |  Branch (5367:2): [True: 0, False: 643]
  ------------------
 5368|      0|		if (destmax > sizeTypebuf) {
  ------------------
  |  Branch (5368:7): [True: 0, False: 0]
  ------------------
 5369|      0|			if (typebuf != NULL) free(typebuf);
  ------------------
  |  Branch (5369:8): [True: 0, False: 0]
  ------------------
 5370|       |			// TODO: should this be srcmax?
 5371|      0|			typebuf = malloc((destmax + 4) * sizeof(formtype));
 5372|      0|			if (!typebuf) _lou_outOfMemory();
  ------------------
  |  Branch (5372:8): [True: 0, False: 0]
  ------------------
 5373|      0|			sizeTypebuf = destmax;
 5374|      0|		}
 5375|      0|		return typebuf;
 5376|       |
 5377|      0|	case alloc_wordBuffer:
  ------------------
  |  Branch (5377:2): [True: 0, False: 643]
  ------------------
 5378|       |
 5379|      0|		if (wordBuffer != NULL) free(wordBuffer);
  ------------------
  |  Branch (5379:7): [True: 0, False: 0]
  ------------------
 5380|      0|		wordBuffer = calloc(srcmax + 4, sizeof(unsigned int));
 5381|      0|		if (wordBuffer == NULL) _lou_outOfMemory();
  ------------------
  |  Branch (5381:7): [True: 0, False: 0]
  ------------------
 5382|      0|		return wordBuffer;
 5383|       |
 5384|      0|	case alloc_emphasisBuffer:
  ------------------
  |  Branch (5384:2): [True: 0, False: 643]
  ------------------
 5385|       |
 5386|      0|		if (emphasisBuffer != NULL) free(emphasisBuffer);
  ------------------
  |  Branch (5386:7): [True: 0, False: 0]
  ------------------
 5387|      0|		emphasisBuffer = calloc(srcmax + 4, sizeof(EmphasisInfo));
 5388|      0|		if (emphasisBuffer == NULL) _lou_outOfMemory();
  ------------------
  |  Branch (5388:7): [True: 0, False: 0]
  ------------------
 5389|      0|		return emphasisBuffer;
 5390|       |
 5391|    391|	case alloc_passbuf:
  ------------------
  |  Branch (5391:2): [True: 391, False: 252]
  ------------------
 5392|    391|		if (index < 0 || index >= MAXPASSBUF) {
  ------------------
  |  |  507|    391|#define MAXPASSBUF 3
  ------------------
  |  Branch (5392:7): [True: 0, False: 391]
  |  Branch (5392:20): [True: 0, False: 391]
  ------------------
 5393|      0|			_lou_logMessage(LOU_LOG_FATAL, "Index out of bounds: %d\n", index);
 5394|      0|			exit(3);
 5395|      0|		}
 5396|    391|		if (destmax > sizePassbuf[index]) {
  ------------------
  |  Branch (5396:7): [True: 297, False: 94]
  ------------------
 5397|    297|			if (passbuf[index] != NULL) free(passbuf[index]);
  ------------------
  |  Branch (5397:8): [True: 65, False: 232]
  ------------------
 5398|    297|			passbuf[index] = malloc((destmax + 4) * CHARSIZE);
  ------------------
  |  |   68|    297|#define CHARSIZE sizeof(widechar)
  ------------------
 5399|    297|			if (!passbuf[index]) _lou_outOfMemory();
  ------------------
  |  Branch (5399:8): [True: 0, False: 297]
  ------------------
 5400|    297|			sizePassbuf[index] = destmax;
 5401|    297|		}
 5402|    391|		return passbuf[index];
 5403|    116|	case alloc_posMapping1: {
  ------------------
  |  Branch (5403:2): [True: 116, False: 527]
  ------------------
 5404|    116|		int mapSize;
 5405|    116|		if (srcmax >= destmax)
  ------------------
  |  Branch (5405:7): [True: 11, False: 105]
  ------------------
 5406|     11|			mapSize = srcmax;
 5407|    105|		else
 5408|    105|			mapSize = destmax;
 5409|    116|		if (mapSize > sizePosMapping1) {
  ------------------
  |  Branch (5409:7): [True: 116, False: 0]
  ------------------
 5410|    116|			if (posMapping1 != NULL) free(posMapping1);
  ------------------
  |  Branch (5410:8): [True: 0, False: 116]
  ------------------
 5411|    116|			posMapping1 = malloc((mapSize + 4) * sizeof(int));
 5412|    116|			if (!posMapping1) _lou_outOfMemory();
  ------------------
  |  Branch (5412:8): [True: 0, False: 116]
  ------------------
 5413|    116|			sizePosMapping1 = mapSize;
 5414|    116|		}
 5415|    116|	}
 5416|    116|		return posMapping1;
 5417|     68|	case alloc_posMapping2: {
  ------------------
  |  Branch (5417:2): [True: 68, False: 575]
  ------------------
 5418|     68|		int mapSize;
 5419|     68|		if (srcmax >= destmax)
  ------------------
  |  Branch (5419:7): [True: 3, False: 65]
  ------------------
 5420|      3|			mapSize = srcmax;
 5421|     65|		else
 5422|     65|			mapSize = destmax;
 5423|     68|		if (mapSize > sizePosMapping2) {
  ------------------
  |  Branch (5423:7): [True: 68, False: 0]
  ------------------
 5424|     68|			if (posMapping2 != NULL) free(posMapping2);
  ------------------
  |  Branch (5424:8): [True: 0, False: 68]
  ------------------
 5425|     68|			posMapping2 = malloc((mapSize + 4) * sizeof(int));
 5426|     68|			if (!posMapping2) _lou_outOfMemory();
  ------------------
  |  Branch (5426:8): [True: 0, False: 68]
  ------------------
 5427|     68|			sizePosMapping2 = mapSize;
 5428|     68|		}
 5429|     68|	}
 5430|     68|		return posMapping2;
 5431|     68|	case alloc_posMapping3: {
  ------------------
  |  Branch (5431:2): [True: 68, False: 575]
  ------------------
 5432|     68|		int mapSize;
 5433|     68|		if (srcmax >= destmax)
  ------------------
  |  Branch (5433:7): [True: 3, False: 65]
  ------------------
 5434|      3|			mapSize = srcmax;
 5435|     65|		else
 5436|     65|			mapSize = destmax;
 5437|     68|		if (mapSize > sizePosMapping3) {
  ------------------
  |  Branch (5437:7): [True: 68, False: 0]
  ------------------
 5438|     68|			if (posMapping3 != NULL) free(posMapping3);
  ------------------
  |  Branch (5438:8): [True: 0, False: 68]
  ------------------
 5439|     68|			posMapping3 = malloc((mapSize + 4) * sizeof(int));
 5440|     68|			if (!posMapping3) _lou_outOfMemory();
  ------------------
  |  Branch (5440:8): [True: 0, False: 68]
  ------------------
 5441|     68|			sizePosMapping3 = mapSize;
 5442|     68|		}
 5443|     68|	}
 5444|     68|		return posMapping3;
 5445|      0|	default:
  ------------------
  |  Branch (5445:2): [True: 0, False: 643]
  ------------------
 5446|       |		return NULL;
 5447|    643|	}
 5448|    643|}
lou_free:
 5451|    138|lou_free(void) {
 5452|    138|	lou_logEnd();
 5453|    138|	if (translationTableChain != NULL) {
  ------------------
  |  Branch (5453:6): [True: 125, False: 13]
  ------------------
 5454|    125|		TranslationTableChainEntry *currentEntry = translationTableChain;
 5455|    125|		TranslationTableChainEntry *previousEntry;
 5456|    250|		while (currentEntry) {
  ------------------
  |  Branch (5456:10): [True: 125, False: 125]
  ------------------
 5457|    125|			freeTranslationTable(currentEntry->table);
 5458|    125|			previousEntry = currentEntry;
 5459|    125|			currentEntry = currentEntry->next;
 5460|    125|			free(previousEntry);
 5461|    125|		}
 5462|    125|		translationTableChain = NULL;
 5463|    125|	}
 5464|    138|	if (displayTableChain != NULL) {
  ------------------
  |  Branch (5464:6): [True: 125, False: 13]
  ------------------
 5465|    125|		DisplayTableChainEntry *currentEntry = displayTableChain;
 5466|    125|		DisplayTableChainEntry *previousEntry;
 5467|    250|		while (currentEntry) {
  ------------------
  |  Branch (5467:10): [True: 125, False: 125]
  ------------------
 5468|    125|			freeDisplayTable(currentEntry->table);
 5469|    125|			previousEntry = currentEntry;
 5470|    125|			currentEntry = currentEntry->next;
 5471|    125|			free(previousEntry);
 5472|    125|		}
 5473|    125|		displayTableChain = NULL;
 5474|    125|	}
 5475|    138|	if (typebuf != NULL) free(typebuf);
  ------------------
  |  Branch (5475:6): [True: 0, False: 138]
  ------------------
 5476|    138|	typebuf = NULL;
 5477|    138|	if (wordBuffer != NULL) free(wordBuffer);
  ------------------
  |  Branch (5477:6): [True: 0, False: 138]
  ------------------
 5478|    138|	wordBuffer = NULL;
 5479|    138|	if (emphasisBuffer != NULL) free(emphasisBuffer);
  ------------------
  |  Branch (5479:6): [True: 0, False: 138]
  ------------------
 5480|    138|	emphasisBuffer = NULL;
 5481|    138|	sizeTypebuf = 0;
 5482|    138|	{
 5483|    138|		int k;
 5484|    552|		for (k = 0; k < MAXPASSBUF; k++) {
  ------------------
  |  |  507|    552|#define MAXPASSBUF 3
  ------------------
  |  Branch (5484:15): [True: 414, False: 138]
  ------------------
 5485|    414|			if (passbuf[k] != NULL) free(passbuf[k]);
  ------------------
  |  Branch (5485:8): [True: 232, False: 182]
  ------------------
 5486|    414|			passbuf[k] = NULL;
 5487|    414|			sizePassbuf[k] = 0;
 5488|    414|		}
 5489|    138|	}
 5490|    138|	if (posMapping1 != NULL) free(posMapping1);
  ------------------
  |  Branch (5490:6): [True: 116, False: 22]
  ------------------
 5491|    138|	posMapping1 = NULL;
 5492|    138|	sizePosMapping1 = 0;
 5493|    138|	if (posMapping2 != NULL) free(posMapping2);
  ------------------
  |  Branch (5493:6): [True: 68, False: 70]
  ------------------
 5494|    138|	posMapping2 = NULL;
 5495|    138|	sizePosMapping2 = 0;
 5496|    138|	if (posMapping3 != NULL) free(posMapping3);
  ------------------
  |  Branch (5496:6): [True: 68, False: 70]
  ------------------
 5497|       |	posMapping3 = NULL;
 5498|    138|	sizePosMapping3 = 0;
 5499|    138|	opcodeLengths[0] = 0;
 5500|    138|	_lou_freeTableIndex();
 5501|    138|}
compileTranslationTable.c:getAChar:
  286|  68.1k|getAChar(FileInfo *file) {
  287|       |	/* Read a big endian, little endian or ASCII 8 file and convert it to
  288|       |	 * 16- or 32-bit unsigned integers */
  289|  68.1k|	int ch1 = 0, ch2 = 0;
  290|  68.1k|	widechar character;
  291|  68.1k|	if (file->encoding == ascii8)
  ------------------
  |  Branch (291:6): [True: 67.2k, False: 909]
  ------------------
  292|  67.2k|		if (file->status == 2) {
  ------------------
  |  Branch (292:7): [True: 135, False: 67.1k]
  ------------------
  293|    135|			file->status++;
  294|    135|			return file->checkencoding[1];
  295|    135|		}
  296|  68.1k|	while ((ch1 = fgetc(file->in)) != EOF) {
  ------------------
  |  Branch (296:9): [True: 67.9k, False: 276]
  ------------------
  297|  67.9k|		if (file->status < 2) file->checkencoding[file->status] = ch1;
  ------------------
  |  Branch (297:7): [True: 276, False: 67.6k]
  ------------------
  298|  67.9k|		file->status++;
  299|  67.9k|		if (file->status == 2) {
  ------------------
  |  Branch (299:7): [True: 138, False: 67.7k]
  ------------------
  300|    138|			if (file->checkencoding[0] == 0xfe && file->checkencoding[1] == 0xff)
  ------------------
  |  Branch (300:8): [True: 0, False: 138]
  |  Branch (300:42): [True: 0, False: 0]
  ------------------
  301|      0|				file->encoding = bigEndian;
  302|    138|			else if (file->checkencoding[0] == 0xff && file->checkencoding[1] == 0xfe)
  ------------------
  |  Branch (302:13): [True: 3, False: 135]
  |  Branch (302:47): [True: 3, False: 0]
  ------------------
  303|      3|				file->encoding = littleEndian;
  304|    135|			else if (file->checkencoding[0] < 128 && file->checkencoding[1] < 128) {
  ------------------
  |  Branch (304:13): [True: 135, False: 0]
  |  Branch (304:45): [True: 135, False: 0]
  ------------------
  305|    135|				file->encoding = ascii8;
  306|    135|				return file->checkencoding[0];
  307|    135|			} else {
  308|      0|				compileError(file,
  309|      0|						"encoding is neither big-endian, little-endian nor ASCII 8.");
  310|      0|				ch1 = EOF;
  311|      0|				break;
  312|      0|				;
  313|      0|			}
  314|      3|			continue;
  315|    138|		}
  316|  67.7k|		switch (file->encoding) {
  ------------------
  |  Branch (316:11): [True: 67.7k, False: 0]
  ------------------
  317|    138|		case noEncoding:
  ------------------
  |  Branch (317:3): [True: 138, False: 67.6k]
  ------------------
  318|    138|			break;
  319|  66.8k|		case ascii8:
  ------------------
  |  Branch (319:3): [True: 66.8k, False: 903]
  ------------------
  320|  66.8k|			return ch1;
  321|      0|			break;
  322|      0|		case bigEndian:
  ------------------
  |  Branch (322:3): [True: 0, False: 67.7k]
  ------------------
  323|      0|			ch2 = fgetc(file->in);
  324|      0|			if (ch2 == EOF) break;
  ------------------
  |  Branch (324:8): [True: 0, False: 0]
  ------------------
  325|      0|			character = (widechar)(ch1 << 8) | ch2;
  326|      0|			return (int)character;
  327|      0|			break;
  328|    765|		case littleEndian:
  ------------------
  |  Branch (328:3): [True: 765, False: 67.0k]
  ------------------
  329|    765|			ch2 = fgetc(file->in);
  330|    765|			if (ch2 == EOF) break;
  ------------------
  |  Branch (330:8): [True: 0, False: 765]
  ------------------
  331|    765|			character = (widechar)(ch2 << 8) | ch1;
  332|    765|			return (int)character;
  333|      0|			break;
  334|  67.7k|		}
  335|    138|		if (ch1 == EOF || ch2 == EOF) break;
  ------------------
  |  Branch (335:7): [True: 0, False: 138]
  |  Branch (335:21): [True: 0, False: 138]
  ------------------
  336|    138|	}
  337|    276|	return EOF;
  338|  68.0k|}
compileTranslationTable.c:compileError:
  392|  2.49k|compileError(const FileInfo *file, const char *format, ...) {
  393|  2.49k|#ifndef __SYMBIAN32__
  394|  2.49k|	char buffer[MAXSTRING];
  395|  2.49k|	va_list arguments;
  396|  2.49k|	va_start(arguments, format);
  397|  2.49k|	vsnprintf(buffer, sizeof(buffer), format, arguments);
  398|  2.49k|	va_end(arguments);
  399|  2.49k|	if (file)
  ------------------
  |  Branch (399:6): [True: 17, False: 2.48k]
  ------------------
  400|     17|		_lou_logMessage(LOU_LOG_ERROR, "%s:%d: error: %s", file->fileName,
  401|     17|				file->lineNumber, buffer);
  402|  2.48k|	else
  403|  2.48k|		_lou_logMessage(LOU_LOG_ERROR, "error: %s", buffer);
  404|  2.49k|	errorCount++;
  405|  2.49k|#endif
  406|  2.49k|}
compileTranslationTable.c:getDotsForChar:
  625|   108k|getDotsForChar(widechar c, const DisplayTableHeader *table) {
  626|   108k|	if (table == NULL) return NULL;
  ------------------
  |  Branch (626:6): [True: 0, False: 108k]
  ------------------
  627|   108k|	CharDotsMapping *cdPtr;
  628|   108k|	const TranslationTableOffset bucket = table->charToDots[_lou_charHash(c)];
  629|   108k|	TranslationTableOffset offset = bucket;
  630|   108k|	while (offset) {
  ------------------
  |  Branch (630:9): [True: 52.0k, False: 56.2k]
  ------------------
  631|  52.0k|		cdPtr = (CharDotsMapping *)&table->ruleArea[offset];
  632|  52.0k|		if (cdPtr->lookFor == c) return cdPtr;
  ------------------
  |  Branch (632:7): [True: 52.0k, False: 1]
  ------------------
  633|      1|		offset = cdPtr->next;
  634|      1|	}
  635|  56.2k|	return NULL;
  636|   108k|}
compileTranslationTable.c:getCharForDots:
  639|    155|getCharForDots(widechar d, const DisplayTableHeader *table) {
  640|    155|	if (table == NULL) return NULL;
  ------------------
  |  Branch (640:6): [True: 0, False: 155]
  ------------------
  641|    155|	CharDotsMapping *cdPtr;
  642|    155|	const TranslationTableOffset bucket = table->dotsToChar[_lou_charHash(d)];
  643|    155|	TranslationTableOffset offset = bucket;
  644|    155|	while (offset) {
  ------------------
  |  Branch (644:9): [True: 4, False: 151]
  ------------------
  645|      4|		cdPtr = (CharDotsMapping *)&table->ruleArea[offset];
  646|      4|		if (cdPtr->lookFor == d) return cdPtr;
  ------------------
  |  Branch (646:7): [True: 4, False: 0]
  ------------------
  647|      0|		offset = cdPtr->next;
  648|      0|	}
  649|    151|	return NULL;
  650|    155|}
compileTranslationTable.c:parseChars:
 1371|    815|parseChars(const FileInfo *file, CharsString *result, CharsString *token) {
 1372|       |	return parseCharsInternal(file, result, token, false);
 1373|    815|}
compileTranslationTable.c:parseCharsInternal:
 1246|    834|		bool inMatchPattern) {
 1247|    834|	int in = 0;
 1248|    834|	int out = 0;
 1249|    834|	int lastOutSize = 0;
 1250|  83.3k|	while (in < token->length) {
  ------------------
  |  Branch (1250:9): [True: 82.5k, False: 825]
  ------------------
 1251|  82.5k|		unsigned int ch = token->chars[in++] & 0xff;
 1252|  82.5k|		if (ch < 128) {
  ------------------
  |  Branch (1252:7): [True: 60.0k, False: 22.4k]
  ------------------
 1253|  60.0k|			if (ch == '\\' &&
  ------------------
  |  Branch (1253:8): [True: 3.61k, False: 56.4k]
  ------------------
 1254|  3.61k|					!isMatchPatternEscape(
  ------------------
  |  Branch (1254:6): [True: 3.61k, False: 0]
  ------------------
 1255|  3.61k|							token->chars[in], inMatchPattern)) { /* escape sequence */
 1256|  3.61k|				switch (ch = token->chars[in]) {
 1257|    136|				case '\\':
  ------------------
  |  Branch (1257:5): [True: 136, False: 3.47k]
  ------------------
 1258|    136|					break;
 1259|      8|				case 'e':
  ------------------
  |  Branch (1259:5): [True: 8, False: 3.60k]
  ------------------
 1260|      8|					ch = 0x1b;
 1261|      8|					break;
 1262|      0|				case 'f':
  ------------------
  |  Branch (1262:5): [True: 0, False: 3.61k]
  ------------------
 1263|      0|					ch = 12;
 1264|      0|					break;
 1265|      1|				case 'n':
  ------------------
  |  Branch (1265:5): [True: 1, False: 3.61k]
  ------------------
 1266|      1|					ch = 10;
 1267|      1|					break;
 1268|     25|				case 'r':
  ------------------
  |  Branch (1268:5): [True: 25, False: 3.58k]
  ------------------
 1269|     25|					ch = 13;
 1270|     25|					break;
 1271|      6|				case 's':
  ------------------
  |  Branch (1271:5): [True: 6, False: 3.60k]
  ------------------
 1272|      6|					ch = ' ';
 1273|      6|					break;
 1274|    192|				case 't':
  ------------------
  |  Branch (1274:5): [True: 192, False: 3.42k]
  ------------------
 1275|    192|					ch = 9;
 1276|    192|					break;
 1277|    131|				case 'v':
  ------------------
  |  Branch (1277:5): [True: 131, False: 3.48k]
  ------------------
 1278|    131|					ch = 11;
 1279|    131|					break;
 1280|      5|				case 'w':
  ------------------
  |  Branch (1280:5): [True: 5, False: 3.60k]
  ------------------
 1281|      5|					ch = LOU_ENDSEGMENT;
  ------------------
  |  |  455|      5|#define LOU_ENDSEGMENT 0xffff
  ------------------
 1282|      5|					break;
 1283|      0|				case 34:
  ------------------
  |  Branch (1283:5): [True: 0, False: 3.61k]
  ------------------
 1284|      0|					ch = QUOTESUB;
  ------------------
  |  |   44|      0|#define QUOTESUB 28 /* Stand-in for double quotes in strings */
  ------------------
 1285|      0|					break;
 1286|  2.01k|				case 'X':
  ------------------
  |  Branch (1286:5): [True: 2.01k, False: 1.59k]
  ------------------
 1287|  2.01k|					compileWarning(file, "\\Xhhhh (with a capital 'X') is deprecated.");
 1288|  2.58k|				case 'x':
  ------------------
  |  Branch (1288:5): [True: 571, False: 3.04k]
  ------------------
 1289|  2.58k|					if (token->length - in > 4) {
  ------------------
  |  Branch (1289:10): [True: 2.58k, False: 4]
  ------------------
 1290|  2.58k|						ch = hexValue(file, &token->chars[in + 1], 4);
 1291|  2.58k|						in += 4;
 1292|  2.58k|					}
 1293|  2.58k|					break;
 1294|    135|				case 'Y':
  ------------------
  |  Branch (1294:5): [True: 135, False: 3.47k]
  ------------------
 1295|    135|					compileWarning(file, "\\Yhhhhh (with a capital 'Y') is deprecated.");
 1296|    135|				case 'y':
  ------------------
  |  Branch (1296:5): [True: 0, False: 3.61k]
  ------------------
 1297|    135|					if (CHARSIZE == 2) {
  ------------------
  |  |   68|    135|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1297:10): [True: 135, Folded]
  ------------------
 1298|    518|					not32:
 1299|    518|						compileError(file,
 1300|    518|								"liblouis has not been compiled for 32-bit Unicode");
 1301|    518|						break;
 1302|    135|					}
 1303|      0|					if (token->length - in > 5) {
  ------------------
  |  Branch (1303:10): [True: 0, False: 0]
  ------------------
 1304|      0|						ch = hexValue(file, &token->chars[in + 1], 5);
 1305|      0|						in += 5;
 1306|      0|					}
 1307|      0|					break;
 1308|    255|				case 'Z':
  ------------------
  |  Branch (1308:5): [True: 255, False: 3.35k]
  ------------------
 1309|    255|					compileWarning(
 1310|    255|							file, "\\Zhhhhhhhh (with a capital 'Z') is deprecated.");
 1311|    383|				case 'z':
  ------------------
  |  Branch (1311:5): [True: 128, False: 3.48k]
  ------------------
 1312|    383|					if (CHARSIZE == 2) goto not32;
  ------------------
  |  |   68|    383|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1312:10): [True: 383, Folded]
  ------------------
 1313|      0|					if (token->length - in > 8) {
  ------------------
  |  Branch (1313:10): [True: 0, False: 0]
  ------------------
 1314|      0|						ch = hexValue(file, &token->chars[in + 1], 8);
 1315|      0|						in += 8;
 1316|      0|					}
 1317|      0|					break;
 1318|      4|				default:
  ------------------
  |  Branch (1318:5): [True: 4, False: 3.60k]
  ------------------
 1319|      4|					compileError(file, "invalid escape sequence '\\%c'", ch);
 1320|      4|					result->length = lastOutSize;
 1321|      4|					return 0;
 1322|  3.61k|				}
 1323|  3.60k|				in++;
 1324|  3.60k|			}
 1325|  60.0k|			if (out >= MAXSTRING - 1) {
  ------------------
  |  |   80|  60.0k|#define MAXSTRING 2048
  ------------------
  |  Branch (1325:8): [True: 1, False: 60.0k]
  ------------------
 1326|      1|				compileError(file, "Token too long");
 1327|      1|				result->length = MAXSTRING - 1;
  ------------------
  |  |   80|      1|#define MAXSTRING 2048
  ------------------
 1328|      1|				return 0;
 1329|      1|			}
 1330|  60.0k|			result->chars[out++] = (widechar)ch;
 1331|  60.0k|			continue;
 1332|  60.0k|		}
 1333|  22.4k|		lastOutSize = out;
 1334|  22.4k|		int lastIn = in;
 1335|  22.4k|		int numBytes = 0;
 1336|  55.6k|		for (numBytes = MAXBYTES - 1; numBytes > 0; numBytes--)
  ------------------
  |  | 1235|  22.4k|#define MAXBYTES 7
  ------------------
  |  Branch (1336:33): [True: 51.2k, False: 4.39k]
  ------------------
 1337|  51.2k|			if (ch >= first0Bit[numBytes]) break;
  ------------------
  |  Branch (1337:8): [True: 18.1k, False: 33.1k]
  ------------------
 1338|  22.4k|		unsigned int utf32 = ch & (0XFF - first0Bit[numBytes]);
 1339|   123k|		for (int k = 0; k < numBytes; k++) {
  ------------------
  |  Branch (1339:19): [True: 101k, False: 22.2k]
  ------------------
 1340|   101k|			if (in >= MAXSTRING - 1 || in >= token->length) break;
  ------------------
  |  |   80|   101k|#define MAXSTRING 2048
  ------------------
  |  Branch (1340:8): [True: 1, False: 101k]
  |  Branch (1340:31): [True: 205, False: 100k]
  ------------------
 1341|   100k|			if (out >= MAXSTRING - 1) {
  ------------------
  |  |   80|   100k|#define MAXSTRING 2048
  ------------------
  |  Branch (1341:8): [True: 1, False: 100k]
  ------------------
 1342|      1|				compileError(file, "Token too long");
 1343|      1|				result->length = lastOutSize;
 1344|      1|				return 0;
 1345|      1|			}
 1346|   100k|			if (token->chars[in] < 128 || (token->chars[in] & 0x0040)) {
  ------------------
  |  Branch (1346:8): [True: 5.24k, False: 95.6k]
  |  Branch (1346:34): [True: 95.4k, False: 212]
  ------------------
 1347|   100k|				compileWarning(file, "invalid UTF-8. Assuming Latin-1.");
 1348|   100k|				result->chars[out++] = token->chars[lastIn];
 1349|   100k|				in = lastIn + 1;
 1350|   100k|				continue;
 1351|   100k|			}
 1352|    212|			utf32 = (utf32 << 6) + (token->chars[in++] & 0x3f);
 1353|    212|		}
 1354|  22.4k|		if (out >= MAXSTRING - 1) {
  ------------------
  |  |   80|  22.4k|#define MAXSTRING 2048
  ------------------
  |  Branch (1354:7): [True: 1, False: 22.4k]
  ------------------
 1355|      1|			compileError(file, "Token too long");
 1356|      1|			result->length = lastOutSize;
 1357|      1|			return 0;
 1358|      1|		}
 1359|  22.4k|		if (CHARSIZE == 2 && utf32 > 0xffff) {
  ------------------
  |  |   68|  22.4k|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1359:7): [True: 22.4k, Folded]
  |  Branch (1359:24): [True: 2, False: 22.4k]
  ------------------
 1360|      2|			compileError(file, "liblouis has not been compiled for 32-bit Unicode");
 1361|      2|			result->length = lastOutSize;
 1362|      2|			return 0;
 1363|      2|		}
 1364|  22.4k|		result->chars[out++] = (widechar)utf32;
 1365|  22.4k|	}
 1366|    825|	result->length = out;
 1367|    825|	return 1;
 1368|    834|}
compileTranslationTable.c:isMatchPatternEscape:
 1240|  3.61k|isMatchPatternEscape(unsigned int ch, bool inMatchPattern) {
 1241|  3.61k|	return inMatchPattern && (ch == '(' || ch == ')' || ch == ']');
  ------------------
  |  Branch (1241:9): [True: 0, False: 3.61k]
  |  Branch (1241:28): [True: 0, False: 0]
  |  Branch (1241:41): [True: 0, False: 0]
  |  Branch (1241:54): [True: 0, False: 0]
  ------------------
 1242|  3.61k|}
compileTranslationTable.c:compileWarning:
  409|   103k|compileWarning(const FileInfo *file, const char *format, ...) {
  410|   103k|#ifndef __SYMBIAN32__
  411|   103k|	char buffer[MAXSTRING];
  412|   103k|	va_list arguments;
  413|   103k|	va_start(arguments, format);
  414|   103k|	vsnprintf(buffer, sizeof(buffer), format, arguments);
  415|   103k|	va_end(arguments);
  416|   103k|	if (file)
  ------------------
  |  Branch (416:6): [True: 27.2k, False: 75.8k]
  ------------------
  417|  27.2k|		_lou_logMessage(LOU_LOG_WARN, "%s:%d: warning: %s", file->fileName,
  418|  27.2k|				file->lineNumber, buffer);
  419|  75.8k|	else
  420|  75.8k|		_lou_logMessage(LOU_LOG_WARN, "warning: %s", buffer);
  421|   103k|	warningCount++;
  422|   103k|#endif
  423|   103k|}
compileTranslationTable.c:hexValue:
 1215|  2.58k|hexValue(const FileInfo *file, const widechar *digits, int length) {
 1216|  2.58k|	int k;
 1217|  2.58k|	unsigned int binaryValue = 0;
 1218|  9.33k|	for (k = 0; k < length; k++) {
  ------------------
  |  Branch (1218:14): [True: 8.71k, False: 625]
  ------------------
 1219|  8.71k|		unsigned int hexDigit = 0;
 1220|  8.71k|		if (digits[k] >= '0' && digits[k] <= '9')
  ------------------
  |  Branch (1220:7): [True: 8.33k, False: 377]
  |  Branch (1220:27): [True: 355, False: 7.98k]
  ------------------
 1221|    355|			hexDigit = digits[k] - '0';
 1222|  8.35k|		else if (digits[k] >= 'a' && digits[k] <= 'f')
  ------------------
  |  Branch (1222:12): [True: 5.18k, False: 3.17k]
  |  Branch (1222:32): [True: 3.69k, False: 1.48k]
  ------------------
 1223|  3.69k|			hexDigit = digits[k] - 'a' + 10;
 1224|  4.66k|		else if (digits[k] >= 'A' && digits[k] <= 'F')
  ------------------
  |  Branch (1224:12): [True: 4.27k, False: 389]
  |  Branch (1224:32): [True: 2.70k, False: 1.56k]
  ------------------
 1225|  2.70k|			hexDigit = digits[k] - 'A' + 10;
 1226|  1.95k|		else {
 1227|  1.95k|			compileError(file, "invalid %d-digit hexadecimal number", length);
 1228|  1.95k|			return (widechar)0xffffffff;
 1229|  1.95k|		}
 1230|  6.75k|		binaryValue |= hexDigit << (4 * (length - 1 - k));
 1231|  6.75k|	}
 1232|    625|	return (widechar)binaryValue;
 1233|  2.58k|}
compileTranslationTable.c:parseDots:
 1395|    295|parseDots(const FileInfo *file, CharsString *cells, const CharsString *token) {
 1396|       |	/* get dot patterns */
 1397|    295|	widechar cell = 0; /* assembly place for dots */
 1398|    295|	int cellCount = 0;
 1399|    295|	int index;
 1400|    295|	int start = 0;
 1401|       |
 1402|  2.60k|	for (index = 0; index < token->length; index++) {
  ------------------
  |  Branch (1402:18): [True: 2.31k, False: 293]
  ------------------
 1403|  2.31k|		int started = index != start;
 1404|  2.31k|		widechar character = token->chars[index];
 1405|  2.31k|		switch (character) { /* or dots to make up Braille cell */
 1406|      0|			{
 1407|      0|				int dot;
 1408|    176|			case '1':
  ------------------
  |  Branch (1408:4): [True: 176, False: 2.13k]
  ------------------
 1409|    176|				dot = LOU_DOT_1;
 1410|    176|				goto haveDot;
 1411|    153|			case '2':
  ------------------
  |  Branch (1411:4): [True: 153, False: 2.15k]
  ------------------
 1412|    153|				dot = LOU_DOT_2;
 1413|    153|				goto haveDot;
 1414|    141|			case '3':
  ------------------
  |  Branch (1414:4): [True: 141, False: 2.17k]
  ------------------
 1415|    141|				dot = LOU_DOT_3;
 1416|    141|				goto haveDot;
 1417|    139|			case '4':
  ------------------
  |  Branch (1417:4): [True: 139, False: 2.17k]
  ------------------
 1418|    139|				dot = LOU_DOT_4;
 1419|    139|				goto haveDot;
 1420|    148|			case '5':
  ------------------
  |  Branch (1420:4): [True: 148, False: 2.16k]
  ------------------
 1421|    148|				dot = LOU_DOT_5;
 1422|    148|				goto haveDot;
 1423|    148|			case '6':
  ------------------
  |  Branch (1423:4): [True: 148, False: 2.16k]
  ------------------
 1424|    148|				dot = LOU_DOT_6;
 1425|    148|				goto haveDot;
 1426|    143|			case '7':
  ------------------
  |  Branch (1426:4): [True: 143, False: 2.16k]
  ------------------
 1427|    143|				dot = LOU_DOT_7;
 1428|    143|				goto haveDot;
 1429|    141|			case '8':
  ------------------
  |  Branch (1429:4): [True: 141, False: 2.17k]
  ------------------
 1430|    141|				dot = LOU_DOT_8;
 1431|    141|				goto haveDot;
 1432|    145|			case '9':
  ------------------
  |  Branch (1432:4): [True: 145, False: 2.16k]
  ------------------
 1433|    145|				dot = LOU_DOT_9;
 1434|    145|				goto haveDot;
 1435|    140|			case 'a':
  ------------------
  |  Branch (1435:4): [True: 140, False: 2.17k]
  ------------------
 1436|    140|				dot = LOU_DOT_10;
 1437|    140|				goto haveDot;
 1438|    138|			case 'b':
  ------------------
  |  Branch (1438:4): [True: 138, False: 2.17k]
  ------------------
 1439|    138|				dot = LOU_DOT_11;
 1440|    138|				goto haveDot;
 1441|    142|			case 'c':
  ------------------
  |  Branch (1441:4): [True: 142, False: 2.17k]
  ------------------
 1442|    142|				dot = LOU_DOT_12;
 1443|    142|				goto haveDot;
 1444|    139|			case 'd':
  ------------------
  |  Branch (1444:4): [True: 139, False: 2.17k]
  ------------------
 1445|    139|				dot = LOU_DOT_13;
 1446|    139|				goto haveDot;
 1447|    138|			case 'e':
  ------------------
  |  Branch (1447:4): [True: 138, False: 2.17k]
  ------------------
 1448|    138|				dot = LOU_DOT_14;
 1449|    138|				goto haveDot;
 1450|    145|			case 'f':
  ------------------
  |  Branch (1450:4): [True: 145, False: 2.16k]
  ------------------
 1451|    145|				dot = LOU_DOT_15;
 1452|    145|				goto haveDot;
 1453|      0|			case 'A':
  ------------------
  |  Branch (1453:4): [True: 0, False: 2.31k]
  ------------------
 1454|      0|			case 'B':
  ------------------
  |  Branch (1454:4): [True: 0, False: 2.31k]
  ------------------
 1455|      2|			case 'C':
  ------------------
  |  Branch (1455:4): [True: 2, False: 2.31k]
  ------------------
 1456|      2|			case 'D':
  ------------------
  |  Branch (1456:4): [True: 0, False: 2.31k]
  ------------------
 1457|      2|			case 'E':
  ------------------
  |  Branch (1457:4): [True: 0, False: 2.31k]
  ------------------
 1458|      2|			case 'F':
  ------------------
  |  Branch (1458:4): [True: 0, False: 2.31k]
  ------------------
 1459|      2|				compileError(file, "Uppercase virtual dots are not allowed.");
 1460|      2|				return 0;
 1461|  2.17k|			haveDot:
 1462|  2.17k|				if (started && !cell) goto invalid;
  ------------------
  |  Branch (1462:9): [True: 1.96k, False: 211]
  |  Branch (1462:20): [True: 0, False: 1.96k]
  ------------------
 1463|  2.17k|				if (cell & dot) {
  ------------------
  |  Branch (1463:9): [True: 0, False: 2.17k]
  ------------------
 1464|      0|					compileError(file, "dot specified more than once.");
 1465|      0|					return 0;
 1466|      0|				}
 1467|  2.17k|				cell |= dot;
 1468|  2.17k|				break;
 1469|  2.17k|			}
 1470|    108|		case '0': /* blank */
  ------------------
  |  Branch (1470:3): [True: 108, False: 2.20k]
  ------------------
 1471|    108|			if (started) goto invalid;
  ------------------
  |  Branch (1471:8): [True: 0, False: 108]
  ------------------
 1472|    108|			break;
 1473|    108|		case '-': /* got all dots for this cell */
  ------------------
  |  Branch (1473:3): [True: 26, False: 2.28k]
  ------------------
 1474|     26|			if (!started) {
  ------------------
  |  Branch (1474:8): [True: 0, False: 26]
  ------------------
 1475|      0|				compileError(file, "missing cell specification.");
 1476|      0|				return 0;
 1477|      0|			}
 1478|     26|			cells->chars[cellCount++] = cell | LOU_DOTS;
 1479|     26|			cell = 0;
 1480|     26|			start = index + 1;
 1481|     26|			break;
 1482|      0|		default:
  ------------------
  |  Branch (1482:3): [True: 0, False: 2.31k]
  ------------------
 1483|      0|		invalid:
 1484|      0|			compileError(
 1485|      0|					file, "invalid dot number %s.", _lou_showString(&character, 1, 0));
 1486|      0|			return 0;
 1487|  2.31k|		}
 1488|  2.31k|	}
 1489|    293|	if (index == start) {
  ------------------
  |  Branch (1489:6): [True: 0, False: 293]
  ------------------
 1490|      0|		compileError(file, "missing cell specification.");
 1491|      0|		return 0;
 1492|      0|	}
 1493|    293|	cells->chars[cellCount++] = cell | LOU_DOTS; /* last cell */
 1494|    293|	cells->length = cellCount;
 1495|    293|	return 1;
 1496|    293|}
compileTranslationTable.c:resolveSubtable:
 4694|    138|resolveSubtable(const char *table, const char *base, const char *searchPath) {
 4695|    138|	char *tableFile;
 4696|    138|	static struct stat info;
 4697|       |
 4698|    138|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
 4699|    138|	if (table == NULL || table[0] == '\0') return NULL;
  ------------------
  |  Branch (4699:6): [True: 0, False: 138]
  |  Branch (4699:23): [True: 0, False: 138]
  ------------------
 4700|    138|	tableFile = (char *)malloc(MAX_TABLEFILE_SIZE);
  ------------------
  |  | 4698|    138|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
  |  |  ------------------
  |  |  |  |   80|    138|#define MAXSTRING 2048
  |  |  ------------------
  ------------------
 4701|       |
 4702|       |	//
 4703|       |	// First try to resolve against base
 4704|       |	//
 4705|    138|	if (base) {
  ------------------
  |  Branch (4705:6): [True: 0, False: 138]
  ------------------
 4706|      0|		int k;
 4707|      0|		if (strlen(base) >= MAX_TABLEFILE_SIZE) goto failure;
  ------------------
  |  | 4698|      0|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
  |  |  ------------------
  |  |  |  |   80|      0|#define MAXSTRING 2048
  |  |  ------------------
  ------------------
  |  Branch (4707:7): [True: 0, False: 0]
  ------------------
 4708|      0|		strcpy(tableFile, base);
 4709|      0|		k = (int)strlen(tableFile);
 4710|      0|		while (k >= 0 && tableFile[k] != '/' && tableFile[k] != '\\') k--;
  ------------------
  |  Branch (4710:10): [True: 0, False: 0]
  |  Branch (4710:20): [True: 0, False: 0]
  |  Branch (4710:43): [True: 0, False: 0]
  ------------------
 4711|      0|		tableFile[++k] = '\0';
 4712|      0|		if (strlen(tableFile) + strlen(table) >= MAX_TABLEFILE_SIZE) goto failure;
  ------------------
  |  | 4698|      0|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
  |  |  ------------------
  |  |  |  |   80|      0|#define MAXSTRING 2048
  |  |  ------------------
  ------------------
  |  Branch (4712:7): [True: 0, False: 0]
  ------------------
 4713|      0|		strcat(tableFile, table);
 4714|      0|		if (stat(tableFile, &info) == 0 && !(info.st_mode & S_IFDIR)) {
  ------------------
  |  Branch (4714:7): [True: 0, False: 0]
  |  Branch (4714:38): [True: 0, False: 0]
  ------------------
 4715|      0|			_lou_logMessage(LOU_LOG_DEBUG, "found table %s", tableFile);
 4716|      0|			return tableFile;
 4717|      0|		}
 4718|      0|	}
 4719|       |
 4720|       |	//
 4721|       |	// It could be an absolute path, or a path relative to the current working
 4722|       |	// directory
 4723|       |	//
 4724|    138|	if (strlen(table) >= MAX_TABLEFILE_SIZE) goto failure;
  ------------------
  |  | 4698|    138|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
  |  |  ------------------
  |  |  |  |   80|    138|#define MAXSTRING 2048
  |  |  ------------------
  ------------------
  |  Branch (4724:6): [True: 0, False: 138]
  ------------------
 4725|    138|	strcpy(tableFile, table);
 4726|    138|	if (stat(tableFile, &info) == 0 && !(info.st_mode & S_IFDIR)) {
  ------------------
  |  Branch (4726:6): [True: 138, False: 0]
  |  Branch (4726:37): [True: 138, False: 0]
  ------------------
 4727|    138|		_lou_logMessage(LOU_LOG_DEBUG, "found table %s", tableFile);
 4728|    138|		return tableFile;
 4729|    138|	}
 4730|       |
 4731|       |	//
 4732|       |	// Then search `LOUIS_TABLEPATH`, `dataPath` and `programPath`
 4733|       |	//
 4734|       |	// searchPath may be NULL if _lou_getTablePath failed (e.g. because the
 4735|       |	// data path was too long); the earlier resolution steps still apply.
 4736|      0|	if (searchPath != NULL && searchPath[0] != '\0') {
  ------------------
  |  Branch (4736:6): [True: 0, False: 0]
  |  Branch (4736:28): [True: 0, False: 0]
  ------------------
 4737|      0|		char *dir;
 4738|      0|		int last;
 4739|      0|		char *cp;
 4740|      0|		char *searchPath_copy = strdup(searchPath);
 4741|      0|		for (dir = searchPath_copy;; dir = cp + 1) {
 4742|      0|			for (cp = dir; *cp != '\0' && *cp != ','; cp++);
  ------------------
  |  Branch (4742:19): [True: 0, False: 0]
  |  Branch (4742:34): [True: 0, False: 0]
  ------------------
 4743|      0|			last = (*cp == '\0');
 4744|      0|			*cp = '\0';
 4745|      0|			if (dir == cp) dir = ".";
  ------------------
  |  Branch (4745:8): [True: 0, False: 0]
  ------------------
 4746|      0|			if (strlen(dir) + strlen(table) + 1 >= MAX_TABLEFILE_SIZE) {
  ------------------
  |  | 4698|      0|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
  |  |  ------------------
  |  |  |  |   80|      0|#define MAXSTRING 2048
  |  |  ------------------
  ------------------
  |  Branch (4746:8): [True: 0, False: 0]
  ------------------
 4747|      0|				free(searchPath_copy);
 4748|      0|				goto failure;
 4749|      0|			}
 4750|      0|			sprintf(tableFile, "%s%c%s", dir, DIR_SEP, table);
  ------------------
  |  |   50|      0|#define DIR_SEP '/'
  ------------------
 4751|      0|			if (stat(tableFile, &info) == 0 && !(info.st_mode & S_IFDIR)) {
  ------------------
  |  Branch (4751:8): [True: 0, False: 0]
  |  Branch (4751:39): [True: 0, False: 0]
  ------------------
 4752|      0|				_lou_logMessage(LOU_LOG_DEBUG, "found table %s", tableFile);
 4753|      0|				free(searchPath_copy);
 4754|      0|				return tableFile;
 4755|      0|			}
 4756|      0|			if (last) break;
  ------------------
  |  Branch (4756:8): [True: 0, False: 0]
  ------------------
 4757|      0|			if (strlen(dir) + strlen("liblouis") + strlen("tables") + strlen(table) + 3 >=
  ------------------
  |  Branch (4757:8): [True: 0, False: 0]
  ------------------
 4758|      0|					MAX_TABLEFILE_SIZE) {
  ------------------
  |  | 4698|      0|#define MAX_TABLEFILE_SIZE (MAXSTRING * sizeof(char) * 2)
  |  |  ------------------
  |  |  |  |   80|      0|#define MAXSTRING 2048
  |  |  ------------------
  ------------------
 4759|      0|				free(searchPath_copy);
 4760|      0|				goto failure;
 4761|      0|			}
 4762|      0|			sprintf(tableFile, "%s%c%s%c%s%c%s", dir, DIR_SEP, "liblouis", DIR_SEP,
  ------------------
  |  |   50|      0|#define DIR_SEP '/'
  ------------------
              			sprintf(tableFile, "%s%c%s%c%s%c%s", dir, DIR_SEP, "liblouis", DIR_SEP,
  ------------------
  |  |   50|      0|#define DIR_SEP '/'
  ------------------
 4763|      0|					"tables", DIR_SEP, table);
  ------------------
  |  |   50|      0|#define DIR_SEP '/'
  ------------------
 4764|      0|			if (stat(tableFile, &info) == 0 && !(info.st_mode & S_IFDIR)) {
  ------------------
  |  Branch (4764:8): [True: 0, False: 0]
  |  Branch (4764:39): [True: 0, False: 0]
  ------------------
 4765|      0|				_lou_logMessage(LOU_LOG_DEBUG, "found table %s", tableFile);
 4766|      0|				free(searchPath_copy);
 4767|      0|				return tableFile;
 4768|      0|			}
 4769|      0|			if (last) break;
  ------------------
  |  Branch (4769:8): [True: 0, False: 0]
  ------------------
 4770|      0|		}
 4771|      0|		free(searchPath_copy);
 4772|      0|	}
 4773|      0|failure:
 4774|      0|	free(tableFile);
 4775|       |	return NULL;
 4776|      0|}
compileTranslationTable.c:copyStringArray:
 4917|    138|copyStringArray(char **array) {
 4918|    138|	int len;
 4919|    138|	char **copy;
 4920|    138|	if (!array) return NULL;
  ------------------
  |  Branch (4920:6): [True: 0, False: 138]
  ------------------
 4921|    138|	len = 0;
 4922|    276|	while (array[len]) len++;
  ------------------
  |  Branch (4922:9): [True: 138, False: 138]
  ------------------
 4923|    138|	copy = malloc((len + 1) * sizeof(char *));
 4924|    138|	copy[len] = NULL;
 4925|    276|	while (len) {
  ------------------
  |  Branch (4925:9): [True: 138, False: 138]
  ------------------
 4926|    138|		len--;
 4927|    138|		copy[len] = strdup(array[len]);
 4928|    138|	}
 4929|    138|	return copy;
 4930|    138|}
compileTranslationTable.c:finalizeTable:
 4553|    241|finalizeTable(TranslationTableHeader *table) {
 4554|    241|	if (table->finalized) return 1;
  ------------------
  |  Branch (4554:6): [True: 116, False: 125]
  ------------------
 4555|       |	// normalize basechar and mode of all characters
 4556|   140k|	for (int i = 0; i < HASHNUM; i++) {
  ------------------
  |  |   77|   140k|#define HASHNUM 1123
  ------------------
  |  Branch (4556:18): [True: 140k, False: 125]
  ------------------
 4557|   140k|		TranslationTableOffset characterOffset = table->characters[i];
 4558|   140k|		while (characterOffset) {
  ------------------
  |  Branch (4558:10): [True: 561, False: 140k]
  ------------------
 4559|    561|			TranslationTableCharacter *character =
 4560|    561|					finalizeCharacter(table, characterOffset, 0);
 4561|    561|			if (!character) return 0;
  ------------------
  |  Branch (4561:8): [True: 0, False: 561]
  ------------------
 4562|    561|			characterOffset = character->next;
 4563|    561|		}
 4564|   140k|	}
 4565|       |	// add noletsign rules from single-letter word and largesign rules
 4566|   140k|	for (int i = 0; i < HASHNUM; i++) {
  ------------------
  |  |   77|   140k|#define HASHNUM 1123
  ------------------
  |  Branch (4566:18): [True: 140k, False: 125]
  ------------------
 4567|   140k|		TranslationTableOffset characterOffset = table->characters[i];
 4568|   140k|		while (characterOffset) {
  ------------------
  |  Branch (4568:10): [True: 561, False: 140k]
  ------------------
 4569|    561|			TranslationTableCharacter *character =
 4570|    561|					(TranslationTableCharacter *)&table->ruleArea[characterOffset];
 4571|    561|			if (character->attributes & CTC_Letter) {
  ------------------
  |  Branch (4571:8): [True: 5, False: 556]
  ------------------
 4572|      5|				TranslationTableOffset *otherRule = &character->otherRules;
 4573|     13|				while (*otherRule) {
  ------------------
  |  Branch (4573:12): [True: 8, False: 5]
  ------------------
 4574|      8|					TranslationTableRule *rule =
 4575|      8|							(TranslationTableRule *)&table->ruleArea[*otherRule];
 4576|      8|					if (rule->opcode == CTO_WholeWord || rule->opcode == CTO_LargeSign)
  ------------------
  |  Branch (4576:10): [True: 0, False: 8]
  |  Branch (4576:43): [True: 0, False: 8]
  ------------------
 4577|      0|						if (table->noLetsignCount < LETSIGNSIZE)
  ------------------
  |  |   62|      0|#define LETSIGNSIZE 256
  ------------------
  |  Branch (4577:11): [True: 0, False: 0]
  ------------------
 4578|      0|							table->noLetsign[table->noLetsignCount++] =
 4579|      0|									rule->charsdots[0];
 4580|      8|					otherRule = &rule->charsnext;
 4581|      8|				}
 4582|      5|			}
 4583|    561|			characterOffset = character->next;
 4584|    561|		}
 4585|   140k|	}
 4586|       |	// Rearrange rules in `forRules' so that when iterating over candidate rules in
 4587|       |	// for_selectRule(), both case-sensitive and case-insensitive rules are contained
 4588|       |	// within the same ordered list. We do the rearrangement by iterating over all
 4589|       |	// case-sensitive rules and if needed move them to another bucket. This may slow down
 4590|       |	// the compilation of tables with a lot of context rules, but the good news is that
 4591|       |	// translation speed is not affected.
 4592|   140k|	for (unsigned long int i = 0; i < HASHNUM; i++) {
  ------------------
  |  |   77|   140k|#define HASHNUM 1123
  ------------------
  |  Branch (4592:32): [True: 140k, False: 125]
  ------------------
 4593|   140k|		TranslationTableOffset *p = &table->forRules[i];
 4594|   140k|		while (*p) {
  ------------------
  |  Branch (4594:10): [True: 78, False: 140k]
  ------------------
 4595|     78|			TranslationTableRule *rule = (TranslationTableRule *)&table->ruleArea[*p];
 4596|       |			// For now only move the rules that we know are case-sensitive, namely
 4597|       |			// `context' rules. (Note that there may be other case-sensitive rules that
 4598|       |			// we're currently not aware of.) We don't move case insensitive rules because
 4599|       |			// the user can/should define them using all lowercases.
 4600|     78|			if (rule->opcode == CTO_Context) {
  ------------------
  |  Branch (4600:8): [True: 0, False: 78]
  ------------------
 4601|      0|				unsigned long int hash = _lou_stringHash(&rule->charsdots[0], 1, table);
 4602|       |				// no need to do anything if the first two characters are not uppercase
 4603|       |				// letters
 4604|      0|				if (hash != i) {
  ------------------
  |  Branch (4604:9): [True: 0, False: 0]
  ------------------
 4605|       |					// compute new position
 4606|      0|					TranslationTableOffset *insert_at = &table->forRules[hash];
 4607|      0|					while (*insert_at) {
  ------------------
  |  Branch (4607:13): [True: 0, False: 0]
  ------------------
 4608|      0|						TranslationTableRule *r =
 4609|      0|								(TranslationTableRule *)&table->ruleArea[*insert_at];
 4610|      0|						if (rule->charslen > r->charslen)
  ------------------
  |  Branch (4610:11): [True: 0, False: 0]
  ------------------
 4611|      0|							break;
 4612|      0|						else if (rule->charslen == r->charslen && r->opcode == CTO_Always)
  ------------------
  |  Branch (4612:16): [True: 0, False: 0]
  |  Branch (4612:49): [True: 0, False: 0]
  ------------------
 4613|      0|							break;
 4614|      0|						insert_at = &r->charsnext;
 4615|      0|					}
 4616|       |					// remove rule from current list and insert it at the correct position
 4617|       |					// in the new list
 4618|      0|					TranslationTableOffset next = rule->charsnext;
 4619|      0|					rule->charsnext = *insert_at;
 4620|      0|					*insert_at = *p;
 4621|      0|					*p = next;
 4622|      0|					continue;
 4623|      0|				}
 4624|      0|			}
 4625|     78|			p = &rule->charsnext;
 4626|     78|		}
 4627|   140k|	}
 4628|    125|	table->finalized = 1;
 4629|    125|	return 1;
 4630|    125|}
compileTranslationTable.c:finalizeCharacter:
 4436|    563|		int detect_loop) {
 4437|    563|	TranslationTableCharacter *character =
 4438|    563|			(TranslationTableCharacter *)&table->ruleArea[characterOffset];
 4439|    563|	if (character->finalized) return character;
  ------------------
  |  Branch (4439:6): [True: 2, False: 561]
  ------------------
 4440|    561|	if (character->basechar) {
  ------------------
  |  Branch (4440:6): [True: 2, False: 559]
  ------------------
 4441|      2|		TranslationTableOffset basecharOffset = 0;
 4442|      2|		TranslationTableCharacter *basechar = character;
 4443|      2|		TranslationTableCharacterAttributes mode = 0;
 4444|      4|		while (basechar->basechar) {
  ------------------
  |  Branch (4444:10): [True: 2, False: 2]
  ------------------
 4445|      2|			if (basechar->basechar == characterOffset || detect_loop++ > MAX_MODES) {
  ------------------
  |  |   83|      2|#define MAX_MODES 6			  // maximal number of modes that can be handled
  ------------------
  |  Branch (4445:8): [True: 0, False: 2]
  |  Branch (4445:49): [True: 0, False: 2]
  ------------------
 4446|      0|				_lou_logMessage(LOU_LOG_ERROR,
 4447|      0|						"%s: error: Character can not be (indirectly) based on "
 4448|      0|						"itself.",
 4449|      0|						printSource(NULL, character->sourceFile, character->sourceLine));
 4450|      0|				errorCount++;
 4451|      0|				return NULL;
 4452|      0|			}
 4453|       |			// inherit basechar mode
 4454|      2|			mode |= basechar->mode;
 4455|       |			// compute basechar recursively
 4456|      2|			basecharOffset = basechar->basechar;
 4457|      2|			basechar = finalizeCharacter(table, basecharOffset, detect_loop);
 4458|      2|			if (!basechar) return NULL;
  ------------------
  |  Branch (4458:8): [True: 0, False: 2]
  ------------------
 4459|      2|			if (character->mode & (basechar->attributes | basechar->mode)) {
  ------------------
  |  Branch (4459:8): [True: 0, False: 2]
  ------------------
 4460|      0|				char *attributeName = NULL;
 4461|      0|				const CharacterClass *class = table->characterClasses;
 4462|      0|				while (class) {
  ------------------
  |  Branch (4462:12): [True: 0, False: 0]
  ------------------
 4463|      0|					if (class->attribute == character->mode) {
  ------------------
  |  Branch (4463:10): [True: 0, False: 0]
  ------------------
 4464|      0|						attributeName =
 4465|      0|								strdup(_lou_showString(class->name, class->length, 0));
 4466|      0|						break;
 4467|      0|					}
 4468|      0|					class = class->next;
 4469|      0|				}
 4470|      0|				_lou_logMessage(LOU_LOG_ERROR,
 4471|      0|						"%s: error: Base character %s can not have the %s "
 4472|      0|						"attribute.",
 4473|      0|						printSource(NULL, character->sourceFile, character->sourceLine),
 4474|      0|						_lou_showString(&basechar->value, 1, 0),
 4475|      0|						attributeName != NULL ? attributeName : "?");
  ------------------
  |  Branch (4475:7): [True: 0, False: 0]
  ------------------
 4476|      0|				errorCount++;
 4477|      0|				free(attributeName);
 4478|      0|				return NULL;
 4479|      0|			}
 4480|      2|		}
 4481|       |		// unset character definition rule or base rule (whichever was declared
 4482|       |		// last) if the dot patterns are not compatible, meaning if the real parts
 4483|       |		// (1-8) of the dot patterns do not match
 4484|      2|		TranslationTableRule *basecharDefRule =
 4485|      2|				(TranslationTableRule *)&table->ruleArea[basechar->definitionRule];
 4486|      2|		if (character->definitionRule) {
  ------------------
  |  Branch (4486:7): [True: 0, False: 2]
  ------------------
 4487|      0|			TranslationTableRule *defRule =
 4488|      0|					(TranslationTableRule *)&table->ruleArea[character->definitionRule];
 4489|      0|			if (defRule->dotslen != basecharDefRule->dotslen ||
  ------------------
  |  Branch (4489:8): [True: 0, False: 0]
  ------------------
 4490|      0|					memcmp(&defRule->charsdots[defRule->charslen],
  ------------------
  |  Branch (4490:6): [True: 0, False: 0]
  ------------------
 4491|      0|							&basecharDefRule->charsdots[basecharDefRule->charslen],
 4492|      0|							defRule->dotslen * CHARSIZE)) {
  ------------------
  |  |   68|      0|#define CHARSIZE sizeof(widechar)
  ------------------
 4493|      0|				char *defOpcodeName = strdup(_lou_findOpcodeName(defRule->opcode));
 4494|      0|				if (defRule->index < character->ruleIndex) {
  ------------------
  |  Branch (4494:9): [True: 0, False: 0]
  ------------------
 4495|       |					// character definition rule was defined before base rule; ignore base
 4496|       |					// rule
 4497|      0|					_lou_logMessage(LOU_LOG_DEBUG,
 4498|      0|							"%s:%d: Character already defined (%s). The existing %s rule "
 4499|      0|							"will take precedence over the new base rule.",
 4500|      0|							character->sourceFile, character->sourceLine,
 4501|      0|							printSource(character->sourceFile, defRule->sourceFile,
 4502|      0|									defRule->sourceLine),
 4503|      0|							defOpcodeName);
 4504|      0|					free(defOpcodeName);
 4505|      0|					character->basechar = 0;
 4506|      0|					character->mode = 0;
 4507|      0|					character->sourceFile = defRule->sourceFile;
 4508|      0|					character->sourceLine = defRule->sourceLine;
 4509|      0|					character->ruleIndex = defRule->index;
 4510|      0|					character->finalized = 1;
 4511|      0|					return character;
 4512|      0|				} else {
 4513|      0|					_lou_logMessage(LOU_LOG_DEBUG,
 4514|      0|							"%s:%d: A base rule already exists for this character (%s). "
 4515|      0|							"The "
 4516|      0|							"existing base rule will take precedence over the new %s "
 4517|      0|							"rule.",
 4518|      0|							defRule->sourceFile, defRule->sourceLine,
 4519|      0|							printSource(defRule->sourceFile, character->sourceFile,
 4520|      0|									character->sourceLine),
 4521|      0|							defOpcodeName);
 4522|      0|					free(defOpcodeName);
 4523|      0|					character->definitionRule = 0;
 4524|      0|				}
 4525|      0|			}
 4526|      0|		}
 4527|      2|		character->mode = mode;
 4528|      2|		character->basechar = basecharOffset;
 4529|       |		// add mode to attributes
 4530|      2|		character->attributes |= character->mode;
 4531|      2|		if (character->attributes & (CTC_UpperCase | CTC_LowerCase))
  ------------------
  |  Branch (4531:7): [True: 0, False: 2]
  ------------------
 4532|      0|			character->attributes |= CTC_Letter;
 4533|       |		// also set the new attributes on the associated dots of the base
 4534|       |		// character
 4535|      2|		if (basecharDefRule->dotslen == 1) {
  ------------------
  |  Branch (4535:7): [True: 0, False: 2]
  ------------------
 4536|      0|			TranslationTableCharacter *dots =
 4537|      0|					getDots(basecharDefRule->charsdots[basecharDefRule->charslen], table);
 4538|      0|			if (dots) {
  ------------------
  |  Branch (4538:8): [True: 0, False: 0]
  ------------------
 4539|      0|				dots->attributes |= character->mode;
 4540|      0|				if (dots->attributes & (CTC_UpperCase | CTC_LowerCase))
  ------------------
  |  Branch (4540:9): [True: 0, False: 0]
  ------------------
 4541|      0|					dots->attributes |= CTC_Letter;
 4542|      0|			}
 4543|      0|		}
 4544|       |		// store all characters that are based on a base character in list
 4545|      2|		if (basechar->linked) character->linked = basechar->linked;
  ------------------
  |  Branch (4545:7): [True: 0, False: 2]
  ------------------
 4546|      2|		basechar->linked = characterOffset;
 4547|      2|	}
 4548|    561|	character->finalized = 1;
 4549|    561|	return character;
 4550|    561|}
compileTranslationTable.c:printSource:
  800|      4|printSource(const char *currentFile, const char *sourceFile, int sourceLine) {
  801|      4|	static char scratchBuf[MAXSTRING];
  802|      4|	if (sourceFile) {
  ------------------
  |  Branch (802:6): [True: 4, False: 0]
  ------------------
  803|      4|		if (currentFile && strcmp(currentFile, sourceFile) == 0)
  ------------------
  |  Branch (803:7): [True: 4, False: 0]
  |  Branch (803:22): [True: 4, False: 0]
  ------------------
  804|      4|			snprintf(scratchBuf, MAXSTRING, "line %d", sourceLine);
  ------------------
  |  |   80|      4|#define MAXSTRING 2048
  ------------------
  805|      0|		else
  806|      0|			snprintf(scratchBuf, MAXSTRING, "%s:%d", sourceFile, sourceLine);
  ------------------
  |  |   80|      0|#define MAXSTRING 2048
  ------------------
  807|      4|	} else
  808|      0|		snprintf(scratchBuf, MAXSTRING, "source unknown");
  ------------------
  |  |   80|      0|#define MAXSTRING 2048
  ------------------
  809|      4|	return scratchBuf;
  810|      4|}
compileTranslationTable.c:getDots:
  550|    517|getDots(widechar d, TranslationTableHeader *table) {
  551|    517|	const TranslationTableOffset bucket = table->dots[_lou_charHash(d)];
  552|    517|	TranslationTableOffset offset = bucket;
  553|    517|	while (offset) {
  ------------------
  |  Branch (553:9): [True: 189, False: 328]
  ------------------
  554|    189|		TranslationTableCharacter *character =
  555|    189|				(TranslationTableCharacter *)&table->ruleArea[offset];
  556|    189|		if (character->value == d) return character;
  ------------------
  |  Branch (556:7): [True: 189, False: 0]
  ------------------
  557|      0|		offset = character->next;
  558|      0|	}
  559|    328|	return NULL;
  560|    517|}
compileTranslationTable.c:compileTable:
 5080|    138|		TranslationTableHeader **translationTable, DisplayTableHeader **displayTable) {
 5081|    138|	char **tableFiles;
 5082|    138|	char **subTable;
 5083|    138|	if (translationTable && !tableList) return 0;
  ------------------
  |  Branch (5083:6): [True: 138, False: 0]
  |  Branch (5083:26): [True: 0, False: 138]
  ------------------
 5084|    138|	if (displayTable && !displayTableList) return 0;
  ------------------
  |  Branch (5084:6): [True: 138, False: 0]
  |  Branch (5084:22): [True: 0, False: 138]
  ------------------
 5085|    138|	if (!translationTable && !displayTable) return 0;
  ------------------
  |  Branch (5085:6): [True: 0, False: 138]
  |  Branch (5085:27): [True: 0, False: 0]
  ------------------
 5086|    138|	if (translationTable) *translationTable = NULL;
  ------------------
  |  Branch (5086:6): [True: 138, False: 0]
  ------------------
 5087|    138|	if (displayTable) *displayTable = NULL;
  ------------------
  |  Branch (5087:6): [True: 138, False: 0]
  ------------------
 5088|    138|	errorCount = warningCount = fileCount = 0;
 5089|    138|	if (!opcodeLengths[0]) {
  ------------------
  |  Branch (5089:6): [True: 138, False: 0]
  ------------------
 5090|    138|		TranslationTableOpcode opcode;
 5091|  16.2k|		for (opcode = 0; opcode < CTO_None; opcode++)
  ------------------
  |  Branch (5091:20): [True: 16.1k, False: 138]
  ------------------
 5092|  16.1k|			opcodeLengths[opcode] = (short)strlen(opcodeNames[opcode]);
 5093|    138|	}
 5094|    138|	if (translationTable) allocateTranslationTable(NULL, translationTable);
  ------------------
  |  Branch (5094:6): [True: 138, False: 0]
  ------------------
 5095|    138|	if (displayTable) allocateDisplayTable(NULL, displayTable);
  ------------------
  |  Branch (5095:6): [True: 138, False: 0]
  ------------------
 5096|       |
 5097|    138|	if (translationTable) {
  ------------------
  |  Branch (5097:6): [True: 138, False: 0]
  ------------------
 5098|    138|		(*translationTable)->emphClassNames[0] = NULL;
 5099|    138|		(*translationTable)->characterClasses = NULL;
 5100|    138|		(*translationTable)->ruleNames = NULL;
 5101|    138|	}
 5102|       |
 5103|       |	/* Compile things that are necessary for the proper operation of
 5104|       |	 * liblouis or liblouisxml or liblouisutdml */
 5105|       |	/* TODO: These definitions seem to be necessary for proper functioning of
 5106|       |	   liblouisutdml. Find a way to satisfy those requirements without hard coding
 5107|       |	   some characters in every table notably behind the user's back */
 5108|    138|	compileString("space \\xffff 123456789abcdef LOU_ENDSEGMENT", translationTable,
 5109|    138|			displayTable);
 5110|       |
 5111|    138|	if (displayTable && translationTable && strcmp(tableList, displayTableList) == 0) {
  ------------------
  |  Branch (5111:6): [True: 138, False: 0]
  |  Branch (5111:22): [True: 138, False: 0]
  |  Branch (5111:42): [True: 138, False: 0]
  ------------------
 5112|       |		/* Compile the display and translation tables in one go */
 5113|       |
 5114|       |		/* Compile all subtables in the list */
 5115|    138|		if (!(tableFiles = _lou_resolveTable(tableList, NULL))) {
  ------------------
  |  Branch (5115:7): [True: 0, False: 138]
  ------------------
 5116|      0|			errorCount++;
 5117|      0|			goto cleanup;
 5118|      0|		}
 5119|    263|		for (subTable = tableFiles; *subTable; subTable++)
  ------------------
  |  Branch (5119:31): [True: 138, False: 125]
  ------------------
 5120|    138|			if (!compileFile(*subTable, translationTable, displayTable)) goto cleanup;
  ------------------
  |  Branch (5120:8): [True: 13, False: 125]
  ------------------
 5121|    138|	} else {
 5122|       |		/* Compile the display and translation tables separately */
 5123|       |
 5124|      0|		if (displayTable) {
  ------------------
  |  Branch (5124:7): [True: 0, False: 0]
  ------------------
 5125|      0|			if (!(tableFiles = _lou_resolveTable(displayTableList, NULL))) {
  ------------------
  |  Branch (5125:8): [True: 0, False: 0]
  ------------------
 5126|      0|				errorCount++;
 5127|      0|				goto cleanup;
 5128|      0|			}
 5129|      0|			for (subTable = tableFiles; *subTable; subTable++)
  ------------------
  |  Branch (5129:32): [True: 0, False: 0]
  ------------------
 5130|      0|				if (!compileFile(*subTable, NULL, displayTable)) goto cleanup;
  ------------------
  |  Branch (5130:9): [True: 0, False: 0]
  ------------------
 5131|      0|			lou_freeTableFiles(tableFiles);
 5132|      0|			tableFiles = NULL;
 5133|      0|		}
 5134|      0|		if (translationTable) {
  ------------------
  |  Branch (5134:7): [True: 0, False: 0]
  ------------------
 5135|      0|			if (!(tableFiles = _lou_resolveTable(tableList, NULL))) {
  ------------------
  |  Branch (5135:8): [True: 0, False: 0]
  ------------------
 5136|      0|				errorCount++;
 5137|      0|				goto cleanup;
 5138|      0|			}
 5139|      0|			for (subTable = tableFiles; *subTable; subTable++)
  ------------------
  |  Branch (5139:32): [True: 0, False: 0]
  ------------------
 5140|      0|				if (!compileFile(*subTable, translationTable, NULL)) goto cleanup;
  ------------------
  |  Branch (5140:9): [True: 0, False: 0]
  ------------------
 5141|      0|		}
 5142|      0|	}
 5143|       |
 5144|       |/* Clean up after compiling files */
 5145|    138|cleanup:
 5146|    138|	lou_freeTableFiles(tableFiles);
 5147|    138|	if (warningCount)
  ------------------
  |  Branch (5147:6): [True: 100, False: 38]
  ------------------
 5148|    100|		_lou_logMessage(LOU_LOG_WARN, "%s: %d warnings issued", tableList, warningCount);
 5149|    138|	if (!errorCount) {
  ------------------
  |  Branch (5149:6): [True: 125, False: 13]
  ------------------
 5150|    125|		if (translationTable) setDefaults(*translationTable);
  ------------------
  |  Branch (5150:7): [True: 125, False: 0]
  ------------------
 5151|    125|		return 1;
 5152|    125|	} else {
 5153|     13|		_lou_logMessage(LOU_LOG_ERROR, "%d errors found.", errorCount);
 5154|     13|		if (translationTable) {
  ------------------
  |  Branch (5154:7): [True: 13, False: 0]
  ------------------
 5155|     13|			if (*translationTable) freeTranslationTable(*translationTable);
  ------------------
  |  Branch (5155:8): [True: 13, False: 0]
  ------------------
 5156|     13|			*translationTable = NULL;
 5157|     13|		}
 5158|     13|		if (displayTable) {
  ------------------
  |  Branch (5158:7): [True: 13, False: 0]
  ------------------
 5159|     13|			if (*displayTable) freeDisplayTable(*displayTable);
  ------------------
  |  Branch (5159:8): [True: 13, False: 0]
  ------------------
 5160|       |			*displayTable = NULL;
 5161|     13|		}
 5162|     13|		return 0;
 5163|     13|	}
 5164|    138|}
compileTranslationTable.c:allocateTranslationTable:
  491|    138|allocateTranslationTable(const FileInfo *file, TranslationTableHeader **table) {
  492|       |	/* Allocate memory for the table and a guess on the number of rules */
  493|    138|	const TranslationTableOffset startSize = 2 * sizeof(**table);
  494|    138|	if (*table) return 1;
  ------------------
  |  Branch (494:6): [True: 0, False: 138]
  ------------------
  495|    138|	TranslationTableOffset bytesUsed =
  496|    138|			sizeof(**table) + OFFSETSIZE; /* So no offset is ever zero */
  ------------------
  |  |   93|    138|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  497|    138|	if (!(*table = malloc(startSize))) {
  ------------------
  |  Branch (497:6): [True: 0, False: 138]
  ------------------
  498|      0|		compileError(file, "Not enough memory");
  499|      0|		if (*table != NULL) free(*table);
  ------------------
  |  Branch (499:7): [True: 0, False: 0]
  ------------------
  500|       |		*table = NULL;
  501|      0|		_lou_outOfMemory();
  502|      0|	}
  503|    138|	memset(*table, 0, startSize);
  504|    138|	(*table)->tableSize = startSize;
  505|    138|	(*table)->bytesUsed = bytesUsed;
  506|    138|	return 1;
  507|    138|}
compileTranslationTable.c:allocateDisplayTable:
  510|    138|allocateDisplayTable(const FileInfo *file, DisplayTableHeader **table) {
  511|       |	/* Allocate memory for the table and a guess on the number of rules */
  512|    138|	const TranslationTableOffset startSize = 2 * sizeof(**table);
  513|    138|	if (*table) return 1;
  ------------------
  |  Branch (513:6): [True: 0, False: 138]
  ------------------
  514|    138|	TranslationTableOffset bytesUsed =
  515|    138|			sizeof(**table) + OFFSETSIZE; /* So no offset is ever zero */
  ------------------
  |  |   93|    138|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  516|    138|	if (!(*table = malloc(startSize))) {
  ------------------
  |  Branch (516:6): [True: 0, False: 138]
  ------------------
  517|      0|		compileError(file, "Not enough memory");
  518|      0|		if (*table != NULL) free(*table);
  ------------------
  |  Branch (518:7): [True: 0, False: 0]
  ------------------
  519|       |		*table = NULL;
  520|      0|		_lou_outOfMemory();
  521|      0|	}
  522|    138|	memset(*table, 0, startSize);
  523|    138|	(*table)->tableSize = startSize;
  524|    138|	(*table)->bytesUsed = bytesUsed;
  525|    138|	return 1;
  526|    138|}
compileTranslationTable.c:compileFile:
 4968|    138|		DisplayTableHeader **displayTable) {
 4969|    138|	FileInfo file;
 4970|    138|	fileCount++;
 4971|    138|	file.fileName = fileName;
 4972|    138|	if (table) {
  ------------------
  |  Branch (4972:6): [True: 138, False: 0]
  ------------------
 4973|    138|		int i;
 4974|    138|		for (i = 0; (*table)->sourceFiles[i]; i++);
  ------------------
  |  Branch (4974:15): [True: 0, False: 138]
  ------------------
 4975|    138|		if (i >= MAX_SOURCE_FILES) {
  ------------------
  |  |   84|    138|#define MAX_SOURCE_FILES 100  // maximal number of files a table can consist of
  ------------------
  |  Branch (4975:7): [True: 0, False: 138]
  ------------------
 4976|      0|			_lou_logMessage(LOU_LOG_WARN, "Max number of source files (%i) reached",
 4977|      0|					MAX_SOURCE_FILES);
  ------------------
  |  |   84|      0|#define MAX_SOURCE_FILES 100  // maximal number of files a table can consist of
  ------------------
 4978|      0|			file.sourceFile = NULL;
 4979|    138|		} else {
 4980|    138|			file.sourceFile = (*table)->sourceFiles[i] = strdup(fileName);
 4981|    138|		}
 4982|    138|	}
 4983|    138|	file.encoding = noEncoding;
 4984|    138|	file.status = 0;
 4985|    138|	file.lineNumber = 0;
 4986|    138|	if ((file.in = fopen(file.fileName, "rb"))) {
  ------------------
  |  Branch (4986:6): [True: 138, False: 0]
  ------------------
 4987|       |		// the scope of a macro is the current file (after the macro definition)
 4988|    138|		const MacroList *inscopeMacros = NULL;
 4989|    641|		while (_lou_getALine(&file)) {
  ------------------
  |  Branch (4989:10): [True: 513, False: 128]
  ------------------
 4990|       |			// included files are compiled from here rather than from within compileRule
 4991|       |			// in order to keep the stack usage of nested includes small (see compileRule)
 4992|    513|			CharsString *includedFile = NULL;
 4993|    513|			int ok = compileRule(
 4994|    513|					&file, table, displayTable, &inscopeMacros, &includedFile);
 4995|    513|			if (ok && includedFile)
  ------------------
  |  Branch (4995:8): [True: 503, False: 10]
  |  Branch (4995:14): [True: 0, False: 503]
  ------------------
 4996|      0|				ok = includeFile(&file, includedFile, table, displayTable);
 4997|    513|			free(includedFile);
 4998|    513|			if (!ok) {
  ------------------
  |  Branch (4998:8): [True: 10, False: 503]
  ------------------
 4999|     10|				if (!errorCount) compileError(&file, "Rule could not be compiled");
  ------------------
  |  Branch (4999:9): [True: 0, False: 10]
  ------------------
 5000|     10|				break;
 5001|     10|			}
 5002|    513|		}
 5003|    138|		fclose(file.in);
 5004|    138|		free_macro_list(inscopeMacros);
 5005|    138|	} else {
 5006|      0|		_lou_logMessage(LOU_LOG_ERROR, "Cannot open table '%s'", file.fileName);
 5007|      0|		errorCount++;
 5008|      0|	}
 5009|    138|	return !errorCount;
 5010|    138|}
compileTranslationTable.c:compileRule:
 2923|    651|		CharsString **deferredInclude) {
 2924|    651|	CharsString token;
 2925|    651|	TranslationTableOpcode opcode;
 2926|    651|	CharsString ruleChars;
 2927|    651|	CharsString ruleDots;
 2928|    651|	CharsString cells;
 2929|    651|	CharsString scratchPad;
 2930|    651|	CharsString emphClass;
 2931|    651|	TranslationTableCharacterAttributes after = 0;
 2932|    651|	TranslationTableCharacterAttributes before = 0;
 2933|    651|	int noback, nofor, nocross;
 2934|    651|	noback = nofor = nocross = 0;
 2935|    793|doOpcode:
 2936|    793|	if (!getToken(file, &token, NULL)) return 1;				  /* blank line */
  ------------------
  |  Branch (2936:6): [True: 62, False: 731]
  ------------------
 2937|    731|	if (token.chars[0] == '#' || token.chars[0] == '<') return 1; /* comment */
  ------------------
  |  Branch (2937:6): [True: 108, False: 623]
  |  Branch (2937:31): [True: 0, False: 623]
  ------------------
 2938|    623|	if (file->lineNumber == 1 &&
  ------------------
  |  Branch (2938:6): [True: 303, False: 320]
  ------------------
 2939|    303|			(eqasc2uni((unsigned char *)"ISO", token.chars, 3) ||
  ------------------
  |  Branch (2939:5): [True: 9, False: 294]
  ------------------
 2940|    294|					eqasc2uni((unsigned char *)"UTF-8", token.chars, 5))) {
  ------------------
  |  Branch (2940:6): [True: 7, False: 287]
  ------------------
 2941|     16|		if (file->in == NULL)
  ------------------
  |  Branch (2941:7): [True: 0, False: 16]
  ------------------
 2942|       |			/* When compileRule is invokded by compileString, it leaves file->in a NULL
 2943|       |			 * pointer. Add a check to avoid dereferencing the NULL pointer in
 2944|       |			 * compileHyphenation*/
 2945|      0|			return 0;
 2946|     16|		if (table)
  ------------------
  |  Branch (2946:7): [True: 16, False: 0]
  ------------------
 2947|     16|			compileHyphenation(file, &token, table);
 2948|      0|		else
 2949|       |			/* ignore the whole file */
 2950|      0|			while (_lou_getALine(file));
  ------------------
  |  Branch (2950:11): [True: 0, False: 0]
  ------------------
 2951|     16|		return 1;
 2952|     16|	}
 2953|    607|	opcode = getOpcode(file, &token);
 2954|    607|	switch (opcode) {
 2955|      0|	case CTO_Macro: {
  ------------------
  |  Branch (2955:2): [True: 0, False: 607]
  ------------------
 2956|      0|		const Macro *macro;
 2957|       |#ifdef ENABLE_MACROS
 2958|       |		if (!inScopeMacros) {
 2959|       |			compileError(file, "Defining macros only allowed in table files.");
 2960|       |			return 0;
 2961|       |		}
 2962|       |		if (compileMacro(file, &macro)) {
 2963|       |			*inScopeMacros = cons_macro(macro, *inScopeMacros);
 2964|       |			return 1;
 2965|       |		}
 2966|       |		return 0;
 2967|       |#else
 2968|      0|		compileError(file, "Macro feature is disabled.");
 2969|      0|		return 0;
 2970|      0|#endif
 2971|      0|	}
 2972|      0|	case CTO_IncludeFile: {
  ------------------
  |  Branch (2972:2): [True: 0, False: 607]
  ------------------
 2973|      0|		CharsString includedFile;
 2974|      0|		if (!getToken(file, &token, "include file name")) return 0;
  ------------------
  |  Branch (2974:7): [True: 0, False: 0]
  ------------------
 2975|      0|		if (!parseChars(file, &includedFile, &token)) return 0;
  ------------------
  |  Branch (2975:7): [True: 0, False: 0]
  ------------------
 2976|      0|		if (deferredInclude) {
  ------------------
  |  Branch (2976:7): [True: 0, False: 0]
  ------------------
 2977|       |			// let the caller compile the included file (see above)
 2978|      0|			*deferredInclude = malloc(sizeof(CharsString));
 2979|      0|			if (!*deferredInclude) _lou_outOfMemory();
  ------------------
  |  Branch (2979:8): [True: 0, False: 0]
  ------------------
 2980|      0|			**deferredInclude = includedFile;
 2981|      0|			return 1;
 2982|      0|		}
 2983|      0|		return includeFile(file, &includedFile, table, displayTable);
 2984|      0|	}
 2985|      0|	case CTO_NoBack:
  ------------------
  |  Branch (2985:2): [True: 0, False: 607]
  ------------------
 2986|      0|		if (nofor) {
  ------------------
  |  Branch (2986:7): [True: 0, False: 0]
  ------------------
 2987|      0|			compileError(file, "%s already specified.", _lou_findOpcodeName(CTO_NoFor));
 2988|      0|			return 0;
 2989|      0|		}
 2990|      0|		noback = 1;
 2991|      0|		goto doOpcode;
 2992|    141|	case CTO_NoFor:
  ------------------
  |  Branch (2992:2): [True: 141, False: 466]
  ------------------
 2993|    141|		if (noback) {
  ------------------
  |  Branch (2993:7): [True: 0, False: 141]
  ------------------
 2994|      0|			compileError(file, "%s already specified.", _lou_findOpcodeName(CTO_NoBack));
 2995|      0|			return 0;
 2996|      0|		}
 2997|    141|		nofor = 1;
 2998|    141|		goto doOpcode;
 2999|    138|	case CTO_Space:
  ------------------
  |  Branch (2999:2): [True: 138, False: 469]
  ------------------
 3000|    138|		return compileCharDef(
 3001|    138|				file, opcode, CTC_Space, noback, nofor, table, displayTable);
 3002|      4|	case CTO_Digit:
  ------------------
  |  Branch (3002:2): [True: 4, False: 603]
  ------------------
 3003|      4|		return compileCharDef(
 3004|      4|				file, opcode, CTC_Digit, noback, nofor, table, displayTable);
 3005|      2|	case CTO_LitDigit:
  ------------------
  |  Branch (3005:2): [True: 2, False: 605]
  ------------------
 3006|      2|		return compileCharDef(
 3007|      2|				file, opcode, CTC_LitDigit, noback, nofor, table, displayTable);
 3008|      0|	case CTO_Punctuation:
  ------------------
  |  Branch (3008:2): [True: 0, False: 607]
  ------------------
 3009|      0|		return compileCharDef(
 3010|      0|				file, opcode, CTC_Punctuation, noback, nofor, table, displayTable);
 3011|      0|	case CTO_Math:
  ------------------
  |  Branch (3011:2): [True: 0, False: 607]
  ------------------
 3012|      0|		return compileCharDef(file, opcode, CTC_Math, noback, nofor, table, displayTable);
 3013|      2|	case CTO_Sign:
  ------------------
  |  Branch (3013:2): [True: 2, False: 605]
  ------------------
 3014|      2|		return compileCharDef(file, opcode, CTC_Sign, noback, nofor, table, displayTable);
 3015|      6|	case CTO_Letter:
  ------------------
  |  Branch (3015:2): [True: 6, False: 601]
  ------------------
 3016|      6|		return compileCharDef(
 3017|      6|				file, opcode, CTC_Letter, noback, nofor, table, displayTable);
 3018|      3|	case CTO_UpperCase:
  ------------------
  |  Branch (3018:2): [True: 3, False: 604]
  ------------------
 3019|      3|		return compileCharDef(
 3020|      3|				file, opcode, CTC_UpperCase, noback, nofor, table, displayTable);
 3021|      0|	case CTO_LowerCase:
  ------------------
  |  Branch (3021:2): [True: 0, False: 607]
  ------------------
 3022|      0|		return compileCharDef(
 3023|      0|				file, opcode, CTC_LowerCase, noback, nofor, table, displayTable);
 3024|      0|	case CTO_Grouping:
  ------------------
  |  Branch (3024:2): [True: 0, False: 607]
  ------------------
 3025|      0|		return compileGrouping(file, noback, nofor, table, displayTable);
 3026|      0|	case CTO_Display:
  ------------------
  |  Branch (3026:2): [True: 0, False: 607]
  ------------------
 3027|      0|		if (!displayTable) return 1;  // ignore
  ------------------
  |  Branch (3027:7): [True: 0, False: 0]
  ------------------
 3028|      0|		if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3028:7): [True: 0, False: 0]
  ------------------
 3029|      0|		if (!getRuleDotsPattern(file, &ruleDots)) return 0;
  ------------------
  |  Branch (3029:7): [True: 0, False: 0]
  ------------------
 3030|      0|		if (ruleChars.length != 1 || ruleDots.length != 1) {
  ------------------
  |  Branch (3030:7): [True: 0, False: 0]
  |  Branch (3030:32): [True: 0, False: 0]
  ------------------
 3031|      0|			compileError(file, "Exactly one character and one cell are required.");
 3032|      0|			return 0;
 3033|      0|		}
 3034|      0|		return putCharDotsMapping(
 3035|      0|				file, ruleChars.chars[0], ruleDots.chars[0], displayTable);
 3036|      0|	case CTO_UpLow:
  ------------------
  |  Branch (3036:2): [True: 0, False: 607]
  ------------------
 3037|      4|	case CTO_None: {
  ------------------
  |  Branch (3037:2): [True: 4, False: 603]
  ------------------
 3038|       |		// check if token is a macro name
 3039|      4|		if (inScopeMacros) {
  ------------------
  |  Branch (3039:7): [True: 4, False: 0]
  ------------------
 3040|      4|			const MacroList *macros = *inScopeMacros;
 3041|      4|			while (macros) {
  ------------------
  |  Branch (3041:11): [True: 0, False: 4]
  ------------------
 3042|      0|				const Macro *m = macros->head;
 3043|      0|				if (token.length == strlen(m->name) &&
  ------------------
  |  Branch (3043:9): [True: 0, False: 0]
  ------------------
 3044|      0|						eqasc2uni((unsigned char *)m->name, token.chars, token.length)) {
  ------------------
  |  Branch (3044:7): [True: 0, False: 0]
  ------------------
 3045|      0|					if (!inScopeMacros) {
  ------------------
  |  Branch (3045:10): [True: 0, False: 0]
  ------------------
 3046|      0|						compileError(file, "Calling macros only allowed in table files.");
 3047|      0|						return 0;
 3048|      0|					}
 3049|      0|					FileInfo tmpFile;
 3050|      0|					memset(&tmpFile, 0, sizeof(tmpFile));
 3051|      0|					tmpFile.fileName = file->fileName;
 3052|      0|					tmpFile.sourceFile = file->sourceFile;
 3053|      0|					tmpFile.lineNumber = file->lineNumber;
 3054|      0|					tmpFile.encoding = noEncoding;
 3055|      0|					tmpFile.status = 0;
 3056|      0|					tmpFile.linepos = 0;
 3057|      0|					tmpFile.linelen = 0;
 3058|      0|					int argument_count = 0;
 3059|      0|					CharsString *arguments =
 3060|      0|							malloc(m->argument_count * sizeof(CharsString));
 3061|      0|					while (argument_count < m->argument_count) {
  ------------------
  |  Branch (3061:13): [True: 0, False: 0]
  ------------------
 3062|      0|						if (getToken(file, &token, "macro argument"))
  ------------------
  |  Branch (3062:11): [True: 0, False: 0]
  ------------------
 3063|      0|							arguments[argument_count++] = token;
 3064|      0|						else
 3065|      0|							break;
 3066|      0|					}
 3067|      0|					if (argument_count < m->argument_count) {
  ------------------
  |  Branch (3067:10): [True: 0, False: 0]
  ------------------
 3068|      0|						compileError(file, "Expected %d arguments", m->argument_count);
 3069|      0|						return 0;
 3070|      0|					}
 3071|      0|					int i = 0;
 3072|      0|					int subst = 0;
 3073|      0|					int next = subst < m->substitution_count ? m->substitutions[2 * subst]
  ------------------
  |  Branch (3073:17): [True: 0, False: 0]
  ------------------
 3074|      0|															 : m->definition_length;
 3075|      0|					for (;;) {
 3076|      0|						while (i < next) {
  ------------------
  |  Branch (3076:14): [True: 0, False: 0]
  ------------------
 3077|      0|							widechar c = m->definition[i++];
 3078|      0|							if (c == '\n') {
  ------------------
  |  Branch (3078:12): [True: 0, False: 0]
  ------------------
 3079|      0|								if (!compileRule(&tmpFile, table, displayTable,
  ------------------
  |  Branch (3079:13): [True: 0, False: 0]
  ------------------
 3080|      0|											inScopeMacros, NULL)) {
 3081|      0|									_lou_logMessage(LOU_LOG_ERROR,
 3082|      0|											"result of macro expansion was: %s",
 3083|      0|											_lou_showString(
 3084|      0|													tmpFile.line, tmpFile.linelen, 0));
 3085|      0|									return 0;
 3086|      0|								}
 3087|      0|								tmpFile.linepos = 0;
 3088|      0|								tmpFile.linelen = 0;
 3089|      0|							} else if (tmpFile.linelen >= MAXSTRING) {
  ------------------
  |  |   80|      0|#define MAXSTRING 2048
  ------------------
  |  Branch (3089:19): [True: 0, False: 0]
  ------------------
 3090|      0|								compileError(file,
 3091|      0|										"Line exceeds %d characters (post macro "
 3092|      0|										"expansion)",
 3093|      0|										MAXSTRING);
  ------------------
  |  |   80|      0|#define MAXSTRING 2048
  ------------------
 3094|      0|								return 0;
 3095|      0|							} else
 3096|      0|								tmpFile.line[tmpFile.linelen++] = c;
 3097|      0|						}
 3098|      0|						if (subst < m->substitution_count) {
  ------------------
  |  Branch (3098:11): [True: 0, False: 0]
  ------------------
 3099|      0|							CharsString arg =
 3100|      0|									arguments[m->substitutions[2 * subst + 1] - 1];
 3101|      0|							for (int j = 0; j < arg.length; j++)
  ------------------
  |  Branch (3101:24): [True: 0, False: 0]
  ------------------
 3102|      0|								tmpFile.line[tmpFile.linelen++] = arg.chars[j];
 3103|      0|							subst++;
 3104|      0|							next = subst < m->substitution_count
  ------------------
  |  Branch (3104:15): [True: 0, False: 0]
  ------------------
 3105|      0|									? m->substitutions[2 * subst]
 3106|      0|									: m->definition_length;
 3107|      0|						} else {
 3108|      0|							if (!compileRule(&tmpFile, table, displayTable, inScopeMacros,
  ------------------
  |  Branch (3108:12): [True: 0, False: 0]
  ------------------
 3109|      0|										NULL)) {
 3110|      0|								_lou_logMessage(LOU_LOG_ERROR,
 3111|      0|										"result of macro expansion was: %s",
 3112|      0|										_lou_showString(
 3113|      0|												tmpFile.line, tmpFile.linelen, 0));
 3114|      0|								return 0;
 3115|      0|							}
 3116|      0|							break;
 3117|      0|						}
 3118|      0|					}
 3119|      0|					return 1;
 3120|      0|				}
 3121|      0|				macros = macros->tail;
 3122|      0|			}
 3123|      4|		}
 3124|      4|		if (opcode == CTO_UpLow) {
  ------------------
  |  Branch (3124:7): [True: 0, False: 4]
  ------------------
 3125|      0|			compileError(file, "The uplow opcode is deprecated.");
 3126|      0|			return 0;
 3127|      0|		}
 3128|      4|		compileError(file, "opcode %s not defined.",
 3129|      4|				_lou_showString(token.chars, token.length, 0));
 3130|      4|		return 0;
 3131|      4|	}
 3132|       |
 3133|       |	/* now only opcodes follow that don't modify the display table */
 3134|    307|	default:
  ------------------
  |  Branch (3134:2): [True: 307, False: 300]
  ------------------
 3135|    307|		if (!table) return 1;
  ------------------
  |  Branch (3135:7): [True: 0, False: 307]
  ------------------
 3136|    307|		switch (opcode) {
 3137|      0|		case CTO_Locale:
  ------------------
  |  Branch (3137:3): [True: 0, False: 307]
  ------------------
 3138|      0|			compileWarning(file,
 3139|      0|					"The locale opcode is not implemented. Use the locale meta data "
 3140|      0|					"instead.");
 3141|      0|			return 1;
 3142|      0|		case CTO_Undefined: {
  ------------------
  |  Branch (3142:3): [True: 0, False: 307]
  ------------------
 3143|       |			// not passing pointer to location inside table because
 3144|       |			// compileBrailleIndicator may reallocate table
 3145|      0|			TranslationTableOffset ruleOffset;
 3146|      0|			if (!compileBrailleIndicator(file, "undefined character opcode",
  ------------------
  |  Branch (3146:8): [True: 0, False: 0]
  ------------------
 3147|      0|						CTO_Undefined, &ruleOffset, noback, nofor, table))
 3148|      0|				return 0;
 3149|      0|			(*table)->undefined = ruleOffset;
 3150|      0|			return 1;
 3151|      0|		}
 3152|      1|		case CTO_Match: {
  ------------------
  |  Branch (3152:3): [True: 1, False: 306]
  ------------------
 3153|      1|			int ok = 0;
 3154|      1|			widechar *patterns = NULL;
 3155|      1|			TranslationTableRule *rule;
 3156|      1|			TranslationTableOffset ruleOffset;
 3157|      1|			CharsString ptn_before, ptn_after;
 3158|      1|			TranslationTableOffset patternsOffset;
 3159|      1|			int len, mrk;
 3160|      1|			size_t patternsByteSize = sizeof(*patterns) * 27720;
 3161|      1|			patterns = (widechar *)malloc(patternsByteSize);
 3162|      1|			if (!patterns) _lou_outOfMemory();
  ------------------
  |  Branch (3162:8): [True: 0, False: 1]
  ------------------
 3163|      1|			memset(patterns, 0xffff, patternsByteSize);
 3164|      1|			noback = 1;
 3165|      1|			getMatchPatternCharacters(file, &ptn_before);
 3166|      1|			getRuleCharsText(file, &ruleChars);
 3167|      1|			getMatchPatternCharacters(file, &ptn_after);
 3168|      1|			getRuleDotsPattern(file, &ruleDots);
 3169|      1|			if (!addRule(file, opcode, &ruleChars, &ruleDots, after, before, &ruleOffset,
  ------------------
  |  Branch (3169:8): [True: 0, False: 1]
  ------------------
 3170|      1|						&rule, noback, nofor, table))
 3171|      0|				goto CTO_Match_cleanup;
 3172|      1|			if (ptn_before.chars[0] == '-' && ptn_before.length == 1)
  ------------------
  |  Branch (3172:8): [True: 0, False: 1]
  |  Branch (3172:38): [True: 0, False: 0]
  ------------------
 3173|      0|				len = _lou_pattern_compile(
 3174|      0|						&ptn_before.chars[0], 0, &patterns[1], 13841, *table, file);
 3175|      1|			else
 3176|      1|				len = _lou_pattern_compile(&ptn_before.chars[0], ptn_before.length,
 3177|      1|						&patterns[1], 13841, *table, file);
 3178|      1|			if (!len) goto CTO_Match_cleanup;
  ------------------
  |  Branch (3178:8): [True: 0, False: 1]
  ------------------
 3179|      1|			mrk = patterns[0] = len + 1;
 3180|      1|			_lou_pattern_reverse(&patterns[1]);
 3181|      1|			if (ptn_after.chars[0] == '-' && ptn_after.length == 1)
  ------------------
  |  Branch (3181:8): [True: 0, False: 1]
  |  Branch (3181:37): [True: 0, False: 0]
  ------------------
 3182|      0|				len = _lou_pattern_compile(
 3183|      0|						&ptn_after.chars[0], 0, &patterns[mrk], 13841, *table, file);
 3184|      1|			else
 3185|      1|				len = _lou_pattern_compile(&ptn_after.chars[0], ptn_after.length,
 3186|      1|						&patterns[mrk], 13841, *table, file);
 3187|      1|			if (!len) goto CTO_Match_cleanup;
  ------------------
  |  Branch (3187:8): [True: 0, False: 1]
  ------------------
 3188|      1|			len += mrk;
 3189|      1|			if (!allocateSpaceInTranslationTable(
  ------------------
  |  Branch (3189:8): [True: 0, False: 1]
  ------------------
 3190|      1|						file, &patternsOffset, len * sizeof(widechar), table))
 3191|      0|				goto CTO_Match_cleanup;
 3192|       |			// allocateSpaceInTranslationTable may have moved table, so make sure rule is
 3193|       |			// still valid
 3194|      1|			rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
 3195|      1|			memcpy(&(*table)->ruleArea[patternsOffset], patterns, len * sizeof(widechar));
 3196|      1|			rule->patterns = patternsOffset;
 3197|      1|			ok = 1;
 3198|      1|		CTO_Match_cleanup:
 3199|      1|			free(patterns);
 3200|      1|			return ok;
 3201|      1|		}
 3202|       |
 3203|      9|		case CTO_BackMatch: {
  ------------------
  |  Branch (3203:3): [True: 9, False: 298]
  ------------------
 3204|      9|			int ok = 0;
 3205|      9|			widechar *patterns = NULL;
 3206|      9|			TranslationTableRule *rule;
 3207|      9|			TranslationTableOffset ruleOffset;
 3208|      9|			CharsString ptn_before, ptn_after;
 3209|      9|			TranslationTableOffset patternOffset;
 3210|      9|			int len, mrk;
 3211|      9|			size_t patternsByteSize = sizeof(*patterns) * 27720;
 3212|      9|			patterns = (widechar *)malloc(patternsByteSize);
 3213|      9|			if (!patterns) _lou_outOfMemory();
  ------------------
  |  Branch (3213:8): [True: 0, False: 9]
  ------------------
 3214|      9|			memset(patterns, 0xffff, patternsByteSize);
 3215|      9|			nofor = 1;
 3216|      9|			getMatchPatternCharacters(file, &ptn_before);
 3217|      9|			getRuleCharsText(file, &ruleChars);
 3218|      9|			getMatchPatternCharacters(file, &ptn_after);
 3219|      9|			getRuleDotsPattern(file, &ruleDots);
 3220|      9|			if (!addRule(file, opcode, &ruleChars, &ruleDots, 0, 0, &ruleOffset, &rule,
  ------------------
  |  Branch (3220:8): [True: 0, False: 9]
  ------------------
 3221|      9|						noback, nofor, table))
 3222|      0|				goto CTO_BackMatch_cleanup;
 3223|      9|			if (ptn_before.chars[0] == '-' && ptn_before.length == 1)
  ------------------
  |  Branch (3223:8): [True: 0, False: 9]
  |  Branch (3223:38): [True: 0, False: 0]
  ------------------
 3224|      0|				len = _lou_pattern_compile(
 3225|      0|						&ptn_before.chars[0], 0, &patterns[1], 13841, *table, file);
 3226|      9|			else
 3227|      9|				len = _lou_pattern_compile(&ptn_before.chars[0], ptn_before.length,
 3228|      9|						&patterns[1], 13841, *table, file);
 3229|      9|			if (!len) goto CTO_BackMatch_cleanup;
  ------------------
  |  Branch (3229:8): [True: 0, False: 9]
  ------------------
 3230|      9|			mrk = patterns[0] = len + 1;
 3231|      9|			_lou_pattern_reverse(&patterns[1]);
 3232|      9|			if (ptn_after.chars[0] == '-' && ptn_after.length == 1)
  ------------------
  |  Branch (3232:8): [True: 0, False: 9]
  |  Branch (3232:37): [True: 0, False: 0]
  ------------------
 3233|      0|				len = _lou_pattern_compile(
 3234|      0|						&ptn_after.chars[0], 0, &patterns[mrk], 13841, *table, file);
 3235|      9|			else
 3236|      9|				len = _lou_pattern_compile(&ptn_after.chars[0], ptn_after.length,
 3237|      9|						&patterns[mrk], 13841, *table, file);
 3238|      9|			if (!len) goto CTO_BackMatch_cleanup;
  ------------------
  |  Branch (3238:8): [True: 0, False: 9]
  ------------------
 3239|      9|			len += mrk;
 3240|      9|			if (!allocateSpaceInTranslationTable(
  ------------------
  |  Branch (3240:8): [True: 0, False: 9]
  ------------------
 3241|      9|						file, &patternOffset, len * sizeof(widechar), table))
 3242|      0|				goto CTO_BackMatch_cleanup;
 3243|       |			// allocateSpaceInTranslationTable may have moved table, so make sure rule is
 3244|       |			// still valid
 3245|      9|			rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
 3246|      9|			memcpy(&(*table)->ruleArea[patternOffset], patterns, len * sizeof(widechar));
 3247|      9|			rule->patterns = patternOffset;
 3248|      9|			ok = 1;
 3249|      9|		CTO_BackMatch_cleanup:
 3250|      9|			free(patterns);
 3251|      9|			return ok;
 3252|      9|		}
 3253|       |
 3254|      1|		case CTO_CapsLetter:
  ------------------
  |  Branch (3254:3): [True: 1, False: 306]
  ------------------
 3255|      7|		case CTO_BegCapsWord:
  ------------------
  |  Branch (3255:3): [True: 6, False: 301]
  ------------------
 3256|      7|		case CTO_EndCapsWord:
  ------------------
  |  Branch (3256:3): [True: 0, False: 307]
  ------------------
 3257|      8|		case CTO_BegCaps:
  ------------------
  |  Branch (3257:3): [True: 1, False: 306]
  ------------------
 3258|      8|		case CTO_EndCaps:
  ------------------
  |  Branch (3258:3): [True: 0, False: 307]
  ------------------
 3259|      8|		case CTO_BegCapsPhrase:
  ------------------
  |  Branch (3259:3): [True: 0, False: 307]
  ------------------
 3260|      8|		case CTO_EndCapsPhrase:
  ------------------
  |  Branch (3260:3): [True: 0, False: 307]
  ------------------
 3261|      8|		case CTO_LenCapsPhrase:
  ------------------
  |  Branch (3261:3): [True: 0, False: 307]
  ------------------
 3262|       |		/* these 8 general purpose opcodes are compiled further down to more specific
 3263|       |		 * internal opcodes:
 3264|       |		 * - modeletter
 3265|       |		 * - begmodeword
 3266|       |		 * - endmodeword
 3267|       |		 * - begmode
 3268|       |		 * - endmode
 3269|       |		 * - begmodephrase
 3270|       |		 * - endmodephrase
 3271|       |		 * - lenmodephrase
 3272|       |		 */
 3273|      8|		case CTO_ModeLetter:
  ------------------
  |  Branch (3273:3): [True: 0, False: 307]
  ------------------
 3274|      8|		case CTO_BegModeWord:
  ------------------
  |  Branch (3274:3): [True: 0, False: 307]
  ------------------
 3275|      8|		case CTO_EndModeWord:
  ------------------
  |  Branch (3275:3): [True: 0, False: 307]
  ------------------
 3276|      9|		case CTO_BegMode:
  ------------------
  |  Branch (3276:3): [True: 1, False: 306]
  ------------------
 3277|      9|		case CTO_EndMode:
  ------------------
  |  Branch (3277:3): [True: 0, False: 307]
  ------------------
 3278|      9|		case CTO_BegModePhrase:
  ------------------
  |  Branch (3278:3): [True: 0, False: 307]
  ------------------
 3279|      9|		case CTO_EndModePhrase:
  ------------------
  |  Branch (3279:3): [True: 0, False: 307]
  ------------------
 3280|      9|		case CTO_LenModePhrase: {
  ------------------
  |  Branch (3280:3): [True: 0, False: 307]
  ------------------
 3281|      9|			TranslationTableCharacterAttributes mode;
 3282|      9|			int i;
 3283|      9|			switch (opcode) {
 3284|      1|			case CTO_CapsLetter:
  ------------------
  |  Branch (3284:4): [True: 1, False: 8]
  ------------------
 3285|      7|			case CTO_BegCapsWord:
  ------------------
  |  Branch (3285:4): [True: 6, False: 3]
  ------------------
 3286|      7|			case CTO_EndCapsWord:
  ------------------
  |  Branch (3286:4): [True: 0, False: 9]
  ------------------
 3287|      8|			case CTO_BegCaps:
  ------------------
  |  Branch (3287:4): [True: 1, False: 8]
  ------------------
 3288|      8|			case CTO_EndCaps:
  ------------------
  |  Branch (3288:4): [True: 0, False: 9]
  ------------------
 3289|      8|			case CTO_BegCapsPhrase:
  ------------------
  |  Branch (3289:4): [True: 0, False: 9]
  ------------------
 3290|      8|			case CTO_EndCapsPhrase:
  ------------------
  |  Branch (3290:4): [True: 0, False: 9]
  ------------------
 3291|      8|			case CTO_LenCapsPhrase:
  ------------------
  |  Branch (3291:4): [True: 0, False: 9]
  ------------------
 3292|      8|				mode = CTC_UpperCase;
 3293|      8|				i = 0;
 3294|      8|				opcode += (CTO_ModeLetter - CTO_CapsLetter);
 3295|      8|				break;
 3296|      1|			default:
  ------------------
  |  Branch (3296:4): [True: 1, False: 8]
  ------------------
 3297|      1|				if (!getToken(file, &token, "attribute name")) return 0;
  ------------------
  |  Branch (3297:9): [True: 0, False: 1]
  ------------------
 3298|      1|				if (!(*table)->characterClasses && !allocateCharacterClasses(*table)) {
  ------------------
  |  Branch (3298:9): [True: 1, False: 0]
  |  Branch (3298:40): [True: 0, False: 1]
  ------------------
 3299|      0|					return 0;
 3300|      0|				}
 3301|      1|				const CharacterClass *characterClass = findCharacterClass(&token, *table);
 3302|      1|				if (!characterClass) {
  ------------------
  |  Branch (3302:9): [True: 1, False: 0]
  ------------------
 3303|      1|					characterClass =
 3304|      1|							addCharacterClass(file, token.chars, token.length, *table, 1);
 3305|      1|					if (!characterClass) return 0;
  ------------------
  |  Branch (3305:10): [True: 0, False: 1]
  ------------------
 3306|      1|				}
 3307|      1|				mode = characterClass->attribute;
 3308|      1|				if (!(mode == CTC_UpperCase || mode == CTC_Digit) && mode >= CTC_Space &&
  ------------------
  |  Branch (3308:11): [True: 0, False: 1]
  |  Branch (3308:36): [True: 0, False: 1]
  |  Branch (3308:58): [True: 1, False: 0]
  ------------------
 3309|      1|						mode <= CTC_LitDigit) {
  ------------------
  |  Branch (3309:7): [True: 0, False: 1]
  ------------------
 3310|      0|					compileError(file,
 3311|      0|							"mode must be \"uppercase\", \"digit\", or a custom "
 3312|      0|							"attribute name.");
 3313|      0|					return 0;
 3314|      0|				}
 3315|       |				/* check if this mode is already defined and if the number of modes does
 3316|       |				 * not exceed the maximal number */
 3317|      1|				if (mode == CTC_UpperCase)
  ------------------
  |  Branch (3317:9): [True: 0, False: 1]
  ------------------
 3318|      0|					i = 0;
 3319|      1|				else {
 3320|      1|					for (i = 1; i < MAX_MODES && (*table)->modes[i].value; i++) {
  ------------------
  |  |   83|      2|#define MAX_MODES 6			  // maximal number of modes that can be handled
  ------------------
  |  Branch (3320:18): [True: 1, False: 0]
  |  Branch (3320:35): [True: 0, False: 1]
  ------------------
 3321|      0|						if ((*table)->modes[i].mode == mode) {
  ------------------
  |  Branch (3321:11): [True: 0, False: 0]
  ------------------
 3322|      0|							break;
 3323|      0|						}
 3324|      0|					}
 3325|      1|					if (i == MAX_MODES) {
  ------------------
  |  |   83|      1|#define MAX_MODES 6			  // maximal number of modes that can be handled
  ------------------
  |  Branch (3325:10): [True: 0, False: 1]
  ------------------
 3326|      0|						compileError(file, "Max number of modes (%i) reached", MAX_MODES);
  ------------------
  |  |   83|      0|#define MAX_MODES 6			  // maximal number of modes that can be handled
  ------------------
 3327|      0|						return 0;
 3328|      0|					}
 3329|      1|				}
 3330|      9|			}
 3331|      9|			if (!(*table)->modes[i].value)
  ------------------
  |  Branch (3331:8): [True: 9, False: 0]
  ------------------
 3332|      9|				(*table)->modes[i] = (EmphasisClass){ plain_text, mode,
 3333|      9|					0x1 << (MAX_EMPH_CLASSES + i), MAX_EMPH_CLASSES + i };
  ------------------
  |  |   82|      9|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
              					0x1 << (MAX_EMPH_CLASSES + i), MAX_EMPH_CLASSES + i };
  ------------------
  |  |   82|      9|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3334|      9|			switch (opcode) {
 3335|      0|			case CTO_BegModePhrase: {
  ------------------
  |  Branch (3335:4): [True: 0, False: 9]
  ------------------
 3336|       |				// not passing pointer to location inside table because
 3337|       |				// compileBrailleIndicator may reallocate table
 3338|      0|				TranslationTableOffset ruleOffset;
 3339|      0|				if (!compileBrailleIndicator(file, "first word capital sign",
  ------------------
  |  Branch (3339:9): [True: 0, False: 0]
  ------------------
 3340|       |							// when mode is not caps (i != 0), provide enough information
 3341|       |							// for back-translator to be able to recognize and ignore the
 3342|       |							// indicator (but it won't be able to determine the mode)
 3343|      0|							i == 0 ? CTO_BegCapsPhrase : CTO_BegModePhrase, &ruleOffset,
  ------------------
  |  Branch (3343:8): [True: 0, False: 0]
  ------------------
 3344|      0|							noback, nofor, table))
 3345|      0|					return 0;
 3346|      0|				(*table)->emphRules[MAX_EMPH_CLASSES + i][begPhraseOffset] = ruleOffset;
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3347|      0|				return 1;
 3348|      0|			}
 3349|      0|			case CTO_EndModePhrase: {
  ------------------
  |  Branch (3349:4): [True: 0, False: 9]
  ------------------
 3350|      0|				TranslationTableOffset ruleOffset;
 3351|      0|				switch (compileBeforeAfter(file)) {
 3352|      0|				case 1:	 // before
  ------------------
  |  Branch (3352:5): [True: 0, False: 0]
  ------------------
 3353|      0|					if ((*table)->emphRules[MAX_EMPH_CLASSES + i][endPhraseAfterOffset]) {
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (3353:10): [True: 0, False: 0]
  ------------------
 3354|      0|						compileError(
 3355|      0|								file, "Capital sign after last word already defined.");
 3356|      0|						return 0;
 3357|      0|					}
 3358|       |					// not passing pointer to location inside table because
 3359|       |					// compileBrailleIndicator may reallocate table
 3360|      0|					if (!compileBrailleIndicator(file, "capital sign before last word",
  ------------------
  |  Branch (3360:10): [True: 0, False: 0]
  ------------------
 3361|      0|								i == 0 ? CTO_EndCapsPhraseBefore : CTO_EndModePhrase,
  ------------------
  |  Branch (3361:9): [True: 0, False: 0]
  ------------------
 3362|      0|								&ruleOffset, noback, nofor, table))
 3363|      0|						return 0;
 3364|      0|					(*table)->emphRules[MAX_EMPH_CLASSES + i][endPhraseBeforeOffset] =
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3365|      0|							ruleOffset;
 3366|      0|					return 1;
 3367|      0|				case 2:	 // after
  ------------------
  |  Branch (3367:5): [True: 0, False: 0]
  ------------------
 3368|      0|					if ((*table)->emphRules[MAX_EMPH_CLASSES + i]
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (3368:10): [True: 0, False: 0]
  ------------------
 3369|      0|										   [endPhraseBeforeOffset]) {
 3370|      0|						compileError(
 3371|      0|								file, "Capital sign before last word already defined.");
 3372|      0|						return 0;
 3373|      0|					}
 3374|       |					// not passing pointer to location inside table because
 3375|       |					// compileBrailleIndicator may reallocate table
 3376|      0|					if (!compileBrailleIndicator(file, "capital sign after last word",
  ------------------
  |  Branch (3376:10): [True: 0, False: 0]
  ------------------
 3377|      0|								i == 0 ? CTO_EndCapsPhraseAfter : CTO_EndModePhrase,
  ------------------
  |  Branch (3377:9): [True: 0, False: 0]
  ------------------
 3378|      0|								&ruleOffset, noback, nofor, table))
 3379|      0|						return 0;
 3380|      0|					(*table)->emphRules[MAX_EMPH_CLASSES + i][endPhraseAfterOffset] =
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3381|      0|							ruleOffset;
 3382|      0|					return 1;
 3383|      0|				default:  // error
  ------------------
  |  Branch (3383:5): [True: 0, False: 0]
  ------------------
 3384|      0|					compileError(file, "Invalid lastword indicator location.");
 3385|      0|					return 0;
 3386|      0|				}
 3387|      0|				return 0;
 3388|      0|			}
 3389|      2|			case CTO_BegMode: {
  ------------------
  |  Branch (3389:4): [True: 2, False: 7]
  ------------------
 3390|       |				// not passing pointer to location inside table because
 3391|       |				// compileBrailleIndicator may reallocate table
 3392|      2|				TranslationTableOffset ruleOffset;
 3393|      2|				if (!compileBrailleIndicator(file, "first letter capital sign",
  ------------------
  |  Branch (3393:9): [True: 0, False: 2]
  ------------------
 3394|      2|							i == 0 ? CTO_BegCaps : CTO_BegMode, &ruleOffset, noback,
  ------------------
  |  Branch (3394:8): [True: 1, False: 1]
  ------------------
 3395|      2|							nofor, table))
 3396|      0|					return 0;
 3397|      2|				(*table)->emphRules[MAX_EMPH_CLASSES + i][begOffset] = ruleOffset;
  ------------------
  |  |   82|      2|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3398|      2|				return 1;
 3399|      2|			}
 3400|      0|			case CTO_EndMode: {
  ------------------
  |  Branch (3400:4): [True: 0, False: 9]
  ------------------
 3401|       |				// not passing pointer to location inside table because
 3402|       |				// compileBrailleIndicator may reallocate table
 3403|      0|				TranslationTableOffset ruleOffset;
 3404|      0|				if (!compileBrailleIndicator(file, "last letter capital sign",
  ------------------
  |  Branch (3404:9): [True: 0, False: 0]
  ------------------
 3405|      0|							i == 0 ? CTO_EndCaps : CTO_EndMode, &ruleOffset, noback,
  ------------------
  |  Branch (3405:8): [True: 0, False: 0]
  ------------------
 3406|      0|							nofor, table))
 3407|      0|					return 0;
 3408|      0|				(*table)->emphRules[MAX_EMPH_CLASSES + i][endOffset] = ruleOffset;
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3409|      0|				return 1;
 3410|      0|			}
 3411|      1|			case CTO_ModeLetter: {
  ------------------
  |  Branch (3411:4): [True: 1, False: 8]
  ------------------
 3412|       |				// not passing pointer to location inside table because
 3413|       |				// compileBrailleIndicator may reallocate table
 3414|      1|				TranslationTableOffset ruleOffset;
 3415|      1|				if (!compileBrailleIndicator(file, "single letter capital sign",
  ------------------
  |  Branch (3415:9): [True: 0, False: 1]
  ------------------
 3416|      1|							i == 0 ? CTO_CapsLetter : CTO_ModeLetter, &ruleOffset, noback,
  ------------------
  |  Branch (3416:8): [True: 1, False: 0]
  ------------------
 3417|      1|							nofor, table))
 3418|      0|					return 0;
 3419|      1|				(*table)->emphRules[MAX_EMPH_CLASSES + i][letterOffset] = ruleOffset;
  ------------------
  |  |   82|      1|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3420|      1|				return 1;
 3421|      1|			}
 3422|      6|			case CTO_BegModeWord: {
  ------------------
  |  Branch (3422:4): [True: 6, False: 3]
  ------------------
 3423|       |				// not passing pointer to location inside table because
 3424|       |				// compileBrailleIndicator may reallocate table
 3425|      6|				TranslationTableOffset ruleOffset;
 3426|      6|				if (!compileBrailleIndicator(file, "capital word",
  ------------------
  |  Branch (3426:9): [True: 0, False: 6]
  ------------------
 3427|      6|							i == 0 ? CTO_BegCapsWord : CTO_BegModeWord, &ruleOffset,
  ------------------
  |  Branch (3427:8): [True: 6, False: 0]
  ------------------
 3428|      6|							noback, nofor, table))
 3429|      0|					return 0;
 3430|      6|				(*table)->emphRules[MAX_EMPH_CLASSES + i][begWordOffset] = ruleOffset;
  ------------------
  |  |   82|      6|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3431|      6|				return 1;
 3432|      6|			}
 3433|      0|			case CTO_EndModeWord: {
  ------------------
  |  Branch (3433:4): [True: 0, False: 9]
  ------------------
 3434|       |				// not passing pointer to location inside table because
 3435|       |				// compileBrailleIndicator may reallocate table
 3436|      0|				TranslationTableOffset ruleOffset;
 3437|      0|				if (!compileBrailleIndicator(file, "capital word stop",
  ------------------
  |  Branch (3437:9): [True: 0, False: 0]
  ------------------
 3438|      0|							i == 0 ? CTO_EndCapsWord : CTO_EndModeWord, &ruleOffset,
  ------------------
  |  Branch (3438:8): [True: 0, False: 0]
  ------------------
 3439|      0|							noback, nofor, table))
 3440|      0|					return 0;
 3441|      0|				(*table)->emphRules[MAX_EMPH_CLASSES + i][endWordOffset] = ruleOffset;
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3442|      0|				return 1;
 3443|      0|			}
 3444|      0|			case CTO_LenModePhrase:
  ------------------
  |  Branch (3444:4): [True: 0, False: 9]
  ------------------
 3445|      0|				return (*table)->emphRules[MAX_EMPH_CLASSES + i][lenPhraseOffset] =
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3446|      0|							   compileNumber(file);
 3447|      0|			default:
  ------------------
  |  Branch (3447:4): [True: 0, False: 9]
  ------------------
 3448|      0|				break;
 3449|      9|			}
 3450|      0|			break;
 3451|      9|		}
 3452|       |
 3453|       |		/* these 8 general purpose emphasis opcodes are compiled further down to more
 3454|       |		 * specific internal opcodes:
 3455|       |		 * - emphletter
 3456|       |		 * - begemphword
 3457|       |		 * - endemphword
 3458|       |		 * - begemph
 3459|       |		 * - endemph
 3460|       |		 * - begemphphrase
 3461|       |		 * - endemphphrase
 3462|       |		 * - lenemphphrase
 3463|       |		 */
 3464|      1|		case CTO_EmphClass:
  ------------------
  |  Branch (3464:3): [True: 1, False: 306]
  ------------------
 3465|      1|			if (!getToken(file, &emphClass, "emphasis class")) {
  ------------------
  |  Branch (3465:8): [True: 0, False: 1]
  ------------------
 3466|      0|				compileError(file, "emphclass must be followed by a valid class name.");
 3467|      0|				return 0;
 3468|      0|			}
 3469|      1|			int k, i;
 3470|      1|			char *s = malloc(sizeof(char) * (emphClass.length + 1));
 3471|      7|			for (k = 0; k < emphClass.length; k++) s[k] = (char)emphClass.chars[k];
  ------------------
  |  Branch (3471:16): [True: 6, False: 1]
  ------------------
 3472|      1|			s[k++] = '\0';
 3473|      1|			for (i = 0; i < MAX_EMPH_CLASSES && (*table)->emphClassNames[i]; i++)
  ------------------
  |  |   82|      2|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (3473:16): [True: 1, False: 0]
  |  Branch (3473:40): [True: 0, False: 1]
  ------------------
 3474|      0|				if (strcmp(s, (*table)->emphClassNames[i]) == 0) {
  ------------------
  |  Branch (3474:9): [True: 0, False: 0]
  ------------------
 3475|      0|					_lou_logMessage(LOU_LOG_DEBUG, "Duplicate emphasis class: %s", s);
 3476|      0|					free(s);
 3477|      0|					return 1;
 3478|      0|				}
 3479|      1|			if (i == MAX_EMPH_CLASSES) {
  ------------------
  |  |   82|      1|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (3479:8): [True: 0, False: 1]
  ------------------
 3480|      0|				_lou_logMessage(LOU_LOG_ERROR,
 3481|      0|						"Max number of emphasis classes (%i) reached", MAX_EMPH_CLASSES);
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
 3482|      0|				errorCount++;
 3483|      0|				free(s);
 3484|      0|				return 0;
 3485|      0|			}
 3486|      1|			switch (i) {
  ------------------
  |  Branch (3486:12): [True: 1, False: 0]
  ------------------
 3487|       |			/* For backwards compatibility (i.e. because programs will assume
 3488|       |			 * the first 3 typeform bits are `italic', `underline' and `bold')
 3489|       |			 * we require that the first 3 emphclass definitions are (in that
 3490|       |			 * order):
 3491|       |			 *
 3492|       |			 *   emphclass italic
 3493|       |			 *   emphclass underline
 3494|       |			 *   emphclass bold
 3495|       |			 *
 3496|       |			 * While it would be possible to use the emphclass opcode only for
 3497|       |			 * defining _additional_ classes (not allowing for them to be called
 3498|       |			 * italic, underline or bold), thereby reducing the amount of
 3499|       |			 * boilerplate, we deliberately choose not to do that in order to
 3500|       |			 * not give italic, underline and bold any special status. The
 3501|       |			 * hope is that eventually all programs will use liblouis for
 3502|       |			 * emphasis the recommended way (i.e. by looking up the supported
 3503|       |			 * typeforms in the documentation or API) so that we can drop this
 3504|       |			 * restriction.
 3505|       |			 */
 3506|      1|			case 0:
  ------------------
  |  Branch (3506:4): [True: 1, False: 0]
  ------------------
 3507|      1|				if (strcmp(s, "italic") != 0) {
  ------------------
  |  Branch (3507:9): [True: 0, False: 1]
  ------------------
 3508|      0|					_lou_logMessage(LOU_LOG_ERROR,
 3509|      0|							"First emphasis class must be \"italic\" but got "
 3510|      0|							"%s",
 3511|      0|							s);
 3512|      0|					errorCount++;
 3513|      0|					free(s);
 3514|      0|					return 0;
 3515|      0|				}
 3516|      1|				break;
 3517|      1|			case 1:
  ------------------
  |  Branch (3517:4): [True: 0, False: 1]
  ------------------
 3518|      0|				if (strcmp(s, "underline") != 0) {
  ------------------
  |  Branch (3518:9): [True: 0, False: 0]
  ------------------
 3519|      0|					_lou_logMessage(LOU_LOG_ERROR,
 3520|      0|							"Second emphasis class must be \"underline\" but "
 3521|      0|							"got "
 3522|      0|							"%s",
 3523|      0|							s);
 3524|      0|					errorCount++;
 3525|      0|					free(s);
 3526|      0|					return 0;
 3527|      0|				}
 3528|      0|				break;
 3529|      0|			case 2:
  ------------------
  |  Branch (3529:4): [True: 0, False: 1]
  ------------------
 3530|      0|				if (strcmp(s, "bold") != 0) {
  ------------------
  |  Branch (3530:9): [True: 0, False: 0]
  ------------------
 3531|      0|					_lou_logMessage(LOU_LOG_ERROR,
 3532|      0|							"Third emphasis class must be \"bold\" but got "
 3533|      0|							"%s",
 3534|      0|							s);
 3535|      0|					errorCount++;
 3536|      0|					free(s);
 3537|      0|					return 0;
 3538|      0|				}
 3539|      0|				break;
 3540|      1|			}
 3541|      1|			(*table)->emphClassNames[i] = s;
 3542|      1|			(*table)->emphClasses[i] = (EmphasisClass){ emph_1
 3543|      1|						<< i, /* relies on the order of typeforms emph_1..emph_10 */
 3544|      1|				0, 0x1 << i, i };
 3545|      1|			return 1;
 3546|      0|		case CTO_EmphLetter:
  ------------------
  |  Branch (3546:3): [True: 0, False: 307]
  ------------------
 3547|      0|		case CTO_BegEmphWord:
  ------------------
  |  Branch (3547:3): [True: 0, False: 307]
  ------------------
 3548|      0|		case CTO_EndEmphWord:
  ------------------
  |  Branch (3548:3): [True: 0, False: 307]
  ------------------
 3549|      0|		case CTO_BegEmph:
  ------------------
  |  Branch (3549:3): [True: 0, False: 307]
  ------------------
 3550|      0|		case CTO_EndEmph:
  ------------------
  |  Branch (3550:3): [True: 0, False: 307]
  ------------------
 3551|      0|		case CTO_BegEmphPhrase:
  ------------------
  |  Branch (3551:3): [True: 0, False: 307]
  ------------------
 3552|      0|		case CTO_EndEmphPhrase:
  ------------------
  |  Branch (3552:3): [True: 0, False: 307]
  ------------------
 3553|      0|		case CTO_LenEmphPhrase:
  ------------------
  |  Branch (3553:3): [True: 0, False: 307]
  ------------------
 3554|      0|		case CTO_EmphModeChars:
  ------------------
  |  Branch (3554:3): [True: 0, False: 307]
  ------------------
 3555|      0|		case CTO_NoEmphChars: {
  ------------------
  |  Branch (3555:3): [True: 0, False: 307]
  ------------------
 3556|      0|			if (!getToken(file, &token, "emphasis class")) return 0;
  ------------------
  |  Branch (3556:8): [True: 0, False: 0]
  ------------------
 3557|      0|			if (!parseChars(file, &emphClass, &token)) return 0;
  ------------------
  |  Branch (3557:8): [True: 0, False: 0]
  ------------------
 3558|      0|			char *s = malloc(sizeof(char) * (emphClass.length + 1));
 3559|      0|			int k, i;
 3560|      0|			for (k = 0; k < emphClass.length; k++) s[k] = (char)emphClass.chars[k];
  ------------------
  |  Branch (3560:16): [True: 0, False: 0]
  ------------------
 3561|      0|			s[k++] = '\0';
 3562|      0|			for (i = 0; i < MAX_EMPH_CLASSES && (*table)->emphClassNames[i]; i++)
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (3562:16): [True: 0, False: 0]
  |  Branch (3562:40): [True: 0, False: 0]
  ------------------
 3563|      0|				if (strcmp(s, (*table)->emphClassNames[i]) == 0) break;
  ------------------
  |  Branch (3563:9): [True: 0, False: 0]
  ------------------
 3564|      0|			if (i == MAX_EMPH_CLASSES || !(*table)->emphClassNames[i]) {
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (3564:8): [True: 0, False: 0]
  |  Branch (3564:33): [True: 0, False: 0]
  ------------------
 3565|      0|				_lou_logMessage(LOU_LOG_ERROR, "Emphasis class %s not declared", s);
 3566|      0|				errorCount++;
 3567|      0|				free(s);
 3568|      0|				return 0;
 3569|      0|			}
 3570|      0|			int ok = 0;
 3571|      0|			switch (opcode) {
 3572|      0|			case CTO_EmphLetter: {
  ------------------
  |  Branch (3572:4): [True: 0, False: 0]
  ------------------
 3573|       |				// not passing pointer to location inside table because
 3574|       |				// compileBrailleIndicator may reallocate table
 3575|      0|				TranslationTableOffset ruleOffset;
 3576|       |				// provide enough information for back-translator to be able to recognize
 3577|       |				// and ignore the indicator (but it won't be able to determine the
 3578|       |				// emphasis class)
 3579|      0|				if (!compileBrailleIndicator(file, "single letter", CTO_EmphLetter,
  ------------------
  |  Branch (3579:9): [True: 0, False: 0]
  ------------------
 3580|      0|							&ruleOffset, noback, nofor, table))
 3581|      0|					break;
 3582|      0|				(*table)->emphRules[i][letterOffset] = ruleOffset;
 3583|      0|				ok = 1;
 3584|      0|				break;
 3585|      0|			}
 3586|      0|			case CTO_BegEmphWord: {
  ------------------
  |  Branch (3586:4): [True: 0, False: 0]
  ------------------
 3587|       |				// not passing pointer to location inside table because
 3588|       |				// compileBrailleIndicator may reallocate table
 3589|      0|				TranslationTableOffset ruleOffset;
 3590|      0|				if (!compileBrailleIndicator(file, "word", CTO_BegEmphWord, &ruleOffset,
  ------------------
  |  Branch (3590:9): [True: 0, False: 0]
  ------------------
 3591|      0|							noback, nofor, table))
 3592|      0|					break;
 3593|      0|				(*table)->emphRules[i][begWordOffset] = ruleOffset;
 3594|      0|				ok = 1;
 3595|      0|				break;
 3596|      0|			}
 3597|      0|			case CTO_EndEmphWord: {
  ------------------
  |  Branch (3597:4): [True: 0, False: 0]
  ------------------
 3598|       |				// not passing pointer to location inside table because
 3599|       |				// compileBrailleIndicator may reallocate table
 3600|      0|				TranslationTableOffset ruleOffset;
 3601|      0|				if (!compileBrailleIndicator(file, "word stop", CTO_EndEmphWord,
  ------------------
  |  Branch (3601:9): [True: 0, False: 0]
  ------------------
 3602|      0|							&ruleOffset, noback, nofor, table))
 3603|      0|					break;
 3604|      0|				(*table)->emphRules[i][endWordOffset] = ruleOffset;
 3605|      0|				ok = 1;
 3606|      0|				break;
 3607|      0|			}
 3608|      0|			case CTO_BegEmph: {
  ------------------
  |  Branch (3608:4): [True: 0, False: 0]
  ------------------
 3609|       |				/* fail if both begemph and any of begemphphrase or begemphword are
 3610|       |				 * defined */
 3611|      0|				if ((*table)->emphRules[i][begWordOffset] ||
  ------------------
  |  Branch (3611:9): [True: 0, False: 0]
  ------------------
 3612|      0|						(*table)->emphRules[i][begPhraseOffset]) {
  ------------------
  |  Branch (3612:7): [True: 0, False: 0]
  ------------------
 3613|      0|					compileError(file,
 3614|      0|							"Cannot define emphasis for both no context and word or "
 3615|      0|							"phrase context, i.e. cannot have both begemph and "
 3616|      0|							"begemphword or begemphphrase.");
 3617|      0|					break;
 3618|      0|				}
 3619|       |				// not passing pointer to location inside table because
 3620|       |				// compileBrailleIndicator may reallocate table
 3621|      0|				TranslationTableOffset ruleOffset;
 3622|      0|				if (!compileBrailleIndicator(file, "first letter", CTO_BegEmph,
  ------------------
  |  Branch (3622:9): [True: 0, False: 0]
  ------------------
 3623|      0|							&ruleOffset, noback, nofor, table))
 3624|      0|					break;
 3625|      0|				(*table)->emphRules[i][begOffset] = ruleOffset;
 3626|      0|				ok = 1;
 3627|      0|				break;
 3628|      0|			}
 3629|      0|			case CTO_EndEmph: {
  ------------------
  |  Branch (3629:4): [True: 0, False: 0]
  ------------------
 3630|      0|				if ((*table)->emphRules[i][endWordOffset] ||
  ------------------
  |  Branch (3630:9): [True: 0, False: 0]
  ------------------
 3631|      0|						(*table)->emphRules[i][endPhraseBeforeOffset] ||
  ------------------
  |  Branch (3631:7): [True: 0, False: 0]
  ------------------
 3632|      0|						(*table)->emphRules[i][endPhraseAfterOffset]) {
  ------------------
  |  Branch (3632:7): [True: 0, False: 0]
  ------------------
 3633|      0|					compileError(file,
 3634|      0|							"Cannot define emphasis for both no context and word or "
 3635|      0|							"phrase context, i.e. cannot have both endemph and "
 3636|      0|							"endemphword or endemphphrase.");
 3637|      0|					break;
 3638|      0|				}
 3639|       |				// not passing pointer to location inside table because
 3640|       |				// compileBrailleIndicator may reallocate table
 3641|      0|				TranslationTableOffset ruleOffset;
 3642|      0|				if (!compileBrailleIndicator(file, "last letter", CTO_EndEmph,
  ------------------
  |  Branch (3642:9): [True: 0, False: 0]
  ------------------
 3643|      0|							&ruleOffset, noback, nofor, table))
 3644|      0|					break;
 3645|      0|				(*table)->emphRules[i][endOffset] = ruleOffset;
 3646|      0|				ok = 1;
 3647|      0|				break;
 3648|      0|			}
 3649|      0|			case CTO_BegEmphPhrase: {
  ------------------
  |  Branch (3649:4): [True: 0, False: 0]
  ------------------
 3650|       |				// not passing pointer to location inside table because
 3651|       |				// compileBrailleIndicator may reallocate table
 3652|      0|				TranslationTableOffset ruleOffset;
 3653|      0|				if (!compileBrailleIndicator(file, "first word", CTO_BegEmphPhrase,
  ------------------
  |  Branch (3653:9): [True: 0, False: 0]
  ------------------
 3654|      0|							&ruleOffset, noback, nofor, table))
 3655|      0|					break;
 3656|      0|				(*table)->emphRules[i][begPhraseOffset] = ruleOffset;
 3657|      0|				ok = 1;
 3658|      0|				break;
 3659|      0|			}
 3660|      0|			case CTO_EndEmphPhrase:
  ------------------
  |  Branch (3660:4): [True: 0, False: 0]
  ------------------
 3661|      0|				switch (compileBeforeAfter(file)) {
 3662|      0|				case 1: {  // before
  ------------------
  |  Branch (3662:5): [True: 0, False: 0]
  ------------------
 3663|      0|					if ((*table)->emphRules[i][endPhraseAfterOffset]) {
  ------------------
  |  Branch (3663:10): [True: 0, False: 0]
  ------------------
 3664|      0|						compileError(file, "last word after already defined.");
 3665|      0|						break;
 3666|      0|					}
 3667|       |					// not passing pointer to location inside table because
 3668|       |					// compileBrailleIndicator may reallocate table
 3669|      0|					TranslationTableOffset ruleOffset;
 3670|      0|					if (!compileBrailleIndicator(file, "last word before",
  ------------------
  |  Branch (3670:10): [True: 0, False: 0]
  ------------------
 3671|      0|								CTO_EndEmphPhrase, &ruleOffset, noback, nofor, table))
 3672|      0|						break;
 3673|      0|					(*table)->emphRules[i][endPhraseBeforeOffset] = ruleOffset;
 3674|      0|					ok = 1;
 3675|      0|					break;
 3676|      0|				}
 3677|      0|				case 2: {  // after
  ------------------
  |  Branch (3677:5): [True: 0, False: 0]
  ------------------
 3678|      0|					if ((*table)->emphRules[i][endPhraseBeforeOffset]) {
  ------------------
  |  Branch (3678:10): [True: 0, False: 0]
  ------------------
 3679|      0|						compileError(file, "last word before already defined.");
 3680|      0|						break;
 3681|      0|					}
 3682|       |					// not passing pointer to location inside table because
 3683|       |					// compileBrailleIndicator may reallocate table
 3684|      0|					TranslationTableOffset ruleOffset;
 3685|      0|					if (!compileBrailleIndicator(file, "last word after",
  ------------------
  |  Branch (3685:10): [True: 0, False: 0]
  ------------------
 3686|      0|								CTO_EndEmphPhrase, &ruleOffset, noback, nofor, table))
 3687|      0|						break;
 3688|      0|					(*table)->emphRules[i][endPhraseAfterOffset] = ruleOffset;
 3689|      0|					ok = 1;
 3690|      0|					break;
 3691|      0|				}
 3692|      0|				default:  // error
  ------------------
  |  Branch (3692:5): [True: 0, False: 0]
  ------------------
 3693|      0|					compileError(file, "Invalid lastword indicator location.");
 3694|      0|					break;
 3695|      0|				}
 3696|      0|				break;
 3697|      0|			case CTO_LenEmphPhrase:
  ------------------
  |  Branch (3697:4): [True: 0, False: 0]
  ------------------
 3698|      0|				if (((*table)->emphRules[i][lenPhraseOffset] = compileNumber(file)))
  ------------------
  |  Branch (3698:9): [True: 0, False: 0]
  ------------------
 3699|      0|					ok = 1;
 3700|      0|				break;
 3701|      0|			case CTO_EmphModeChars: {
  ------------------
  |  Branch (3701:4): [True: 0, False: 0]
  ------------------
 3702|      0|				if (!getRuleCharsText(file, &ruleChars)) break;
  ------------------
  |  Branch (3702:9): [True: 0, False: 0]
  ------------------
 3703|      0|				widechar *emphmodechars = (*table)->emphModeChars[i];
 3704|      0|				int len;
 3705|      0|				for (len = 0; len < EMPHMODECHARSSIZE && emphmodechars[len]; len++);
  ------------------
  |  |   60|      0|#define EMPHMODECHARSSIZE 256
  ------------------
  |  Branch (3705:19): [True: 0, False: 0]
  |  Branch (3705:46): [True: 0, False: 0]
  ------------------
 3706|      0|				if (len + ruleChars.length > EMPHMODECHARSSIZE) {
  ------------------
  |  |   60|      0|#define EMPHMODECHARSSIZE 256
  ------------------
  |  Branch (3706:9): [True: 0, False: 0]
  ------------------
 3707|      0|					compileError(file, "More than %d characters", EMPHMODECHARSSIZE);
  ------------------
  |  |   60|      0|#define EMPHMODECHARSSIZE 256
  ------------------
 3708|      0|					break;
 3709|      0|				}
 3710|      0|				ok = 1;
 3711|      0|				for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3711:21): [True: 0, False: 0]
  ------------------
 3712|      0|					if (!getChar(ruleChars.chars[k], *table, NULL)) {
  ------------------
  |  Branch (3712:10): [True: 0, False: 0]
  ------------------
 3713|      0|						compileError(file, "Emphasis mode character undefined");
 3714|      0|						ok = 0;
 3715|      0|						break;
 3716|      0|					}
 3717|      0|					emphmodechars[len++] = ruleChars.chars[k];
 3718|      0|				}
 3719|      0|				break;
 3720|      0|			}
 3721|      0|			case CTO_NoEmphChars: {
  ------------------
  |  Branch (3721:4): [True: 0, False: 0]
  ------------------
 3722|      0|				if (!getRuleCharsText(file, &ruleChars)) break;
  ------------------
  |  Branch (3722:9): [True: 0, False: 0]
  ------------------
 3723|      0|				widechar *noemphchars = (*table)->noEmphChars[i];
 3724|      0|				int len;
 3725|      0|				for (len = 0; len < NOEMPHCHARSSIZE && noemphchars[len]; len++);
  ------------------
  |  |   61|      0|#define NOEMPHCHARSSIZE 256
  ------------------
  |  Branch (3725:19): [True: 0, False: 0]
  |  Branch (3725:44): [True: 0, False: 0]
  ------------------
 3726|      0|				if (len + ruleChars.length > NOEMPHCHARSSIZE) {
  ------------------
  |  |   61|      0|#define NOEMPHCHARSSIZE 256
  ------------------
  |  Branch (3726:9): [True: 0, False: 0]
  ------------------
 3727|      0|					compileError(file, "More than %d characters", NOEMPHCHARSSIZE);
  ------------------
  |  |   61|      0|#define NOEMPHCHARSSIZE 256
  ------------------
 3728|      0|					break;
 3729|      0|				}
 3730|      0|				ok = 1;
 3731|      0|				for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3731:21): [True: 0, False: 0]
  ------------------
 3732|      0|					if (!getChar(ruleChars.chars[k], *table, NULL)) {
  ------------------
  |  Branch (3732:10): [True: 0, False: 0]
  ------------------
 3733|      0|						compileError(file, "Character undefined");
 3734|      0|						ok = 0;
 3735|      0|						break;
 3736|      0|					}
 3737|      0|					noemphchars[len++] = ruleChars.chars[k];
 3738|      0|				}
 3739|      0|				break;
 3740|      0|			}
 3741|      0|			default:
  ------------------
  |  Branch (3741:4): [True: 0, False: 0]
  ------------------
 3742|      0|				break;
 3743|      0|			}
 3744|      0|			free(s);
 3745|      0|			return ok;
 3746|      0|		}
 3747|      0|		case CTO_LetterSign: {
  ------------------
  |  Branch (3747:3): [True: 0, False: 307]
  ------------------
 3748|       |			// not passing pointer to location inside table because
 3749|       |			// compileBrailleIndicator may reallocate table
 3750|      0|			TranslationTableOffset ruleOffset;
 3751|      0|			if (!compileBrailleIndicator(file, "letter sign", CTO_LetterSign, &ruleOffset,
  ------------------
  |  Branch (3751:8): [True: 0, False: 0]
  ------------------
 3752|      0|						noback, nofor, table))
 3753|      0|				return 0;
 3754|      0|			(*table)->letterSign = ruleOffset;
 3755|      0|			return 1;
 3756|      0|		}
 3757|     10|		case CTO_NoLetsignBefore:
  ------------------
  |  Branch (3757:3): [True: 10, False: 297]
  ------------------
 3758|     10|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3758:8): [True: 0, False: 10]
  ------------------
 3759|     10|			if (((*table)->noLetsignBeforeCount + ruleChars.length) > LETSIGNBEFORESIZE) {
  ------------------
  |  |   65|     10|#define LETSIGNBEFORESIZE 64
  ------------------
  |  Branch (3759:8): [True: 0, False: 10]
  ------------------
 3760|      0|				compileError(file, "More than %d characters", LETSIGNBEFORESIZE);
  ------------------
  |  |   65|      0|#define LETSIGNBEFORESIZE 64
  ------------------
 3761|      0|				return 0;
 3762|      0|			}
 3763|     82|			for (int k = 0; k < ruleChars.length; k++)
  ------------------
  |  Branch (3763:20): [True: 72, False: 10]
  ------------------
 3764|     72|				(*table)->noLetsignBefore[(*table)->noLetsignBeforeCount++] =
 3765|     72|						ruleChars.chars[k];
 3766|     10|			return 1;
 3767|      0|		case CTO_NoLetsign:
  ------------------
  |  Branch (3767:3): [True: 0, False: 307]
  ------------------
 3768|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3768:8): [True: 0, False: 0]
  ------------------
 3769|      0|			if (((*table)->noLetsignCount + ruleChars.length) > LETSIGNSIZE) {
  ------------------
  |  |   62|      0|#define LETSIGNSIZE 256
  ------------------
  |  Branch (3769:8): [True: 0, False: 0]
  ------------------
 3770|      0|				compileError(file, "More than %d characters", LETSIGNSIZE);
  ------------------
  |  |   62|      0|#define LETSIGNSIZE 256
  ------------------
 3771|      0|				return 0;
 3772|      0|			}
 3773|      0|			for (int k = 0; k < ruleChars.length; k++)
  ------------------
  |  Branch (3773:20): [True: 0, False: 0]
  ------------------
 3774|      0|				(*table)->noLetsign[(*table)->noLetsignCount++] = ruleChars.chars[k];
 3775|      0|			return 1;
 3776|      0|		case CTO_NoLetsignAfter:
  ------------------
  |  Branch (3776:3): [True: 0, False: 307]
  ------------------
 3777|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3777:8): [True: 0, False: 0]
  ------------------
 3778|      0|			if (((*table)->noLetsignAfterCount + ruleChars.length) > LETSIGNAFTERSIZE) {
  ------------------
  |  |   66|      0|#define LETSIGNAFTERSIZE 64
  ------------------
  |  Branch (3778:8): [True: 0, False: 0]
  ------------------
 3779|      0|				compileError(file, "More than %d characters", LETSIGNAFTERSIZE);
  ------------------
  |  |   66|      0|#define LETSIGNAFTERSIZE 64
  ------------------
 3780|      0|				return 0;
 3781|      0|			}
 3782|      0|			for (int k = 0; k < ruleChars.length; k++)
  ------------------
  |  Branch (3782:20): [True: 0, False: 0]
  ------------------
 3783|      0|				(*table)->noLetsignAfter[(*table)->noLetsignAfterCount++] =
 3784|      0|						ruleChars.chars[k];
 3785|      0|			return 1;
 3786|      1|		case CTO_NumberSign: {
  ------------------
  |  Branch (3786:3): [True: 1, False: 306]
  ------------------
 3787|       |			// not passing pointer to location inside table because
 3788|       |			// compileBrailleIndicator may reallocate table
 3789|      1|			TranslationTableOffset ruleOffset;
 3790|      1|			if (!compileBrailleIndicator(file, "number sign", CTO_NumberSign, &ruleOffset,
  ------------------
  |  Branch (3790:8): [True: 0, False: 1]
  ------------------
 3791|      1|						noback, nofor, table))
 3792|      0|				return 0;
 3793|      1|			(*table)->numberSign = ruleOffset;
 3794|      1|			return 1;
 3795|      1|		}
 3796|      1|		case CTO_NoNumberSign: {
  ------------------
  |  Branch (3796:3): [True: 1, False: 306]
  ------------------
 3797|       |			// not passing pointer to location inside table because
 3798|       |			// compileBrailleIndicator may reallocate table
 3799|      1|			TranslationTableOffset ruleOffset;
 3800|      1|			if (!compileBrailleIndicator(file, "no number sign", CTO_NoNumberSign,
  ------------------
  |  Branch (3800:8): [True: 0, False: 1]
  ------------------
 3801|      1|						&ruleOffset, noback, nofor, table))
 3802|      0|				return 0;
 3803|      1|			(*table)->noNumberSign = ruleOffset;
 3804|      1|			return 1;
 3805|      1|		}
 3806|       |
 3807|      0|		case CTO_NumericModeChars:
  ------------------
  |  Branch (3807:3): [True: 0, False: 307]
  ------------------
 3808|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3808:8): [True: 0, False: 0]
  ------------------
 3809|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3809:20): [True: 0, False: 0]
  ------------------
 3810|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3811|      0|				if (!c) {
  ------------------
  |  Branch (3811:9): [True: 0, False: 0]
  ------------------
 3812|      0|					compileError(file, "Numeric mode character undefined: %s",
 3813|      0|							_lou_showString(&ruleChars.chars[k], 1, 0));
 3814|      0|					return 0;
 3815|      0|				}
 3816|      0|				c->attributes |= CTC_NumericMode;
 3817|      0|				(*table)->usesNumericMode = 1;
 3818|      0|			}
 3819|      0|			return 1;
 3820|       |
 3821|      0|		case CTO_MidEndNumericModeChars:
  ------------------
  |  Branch (3821:3): [True: 0, False: 307]
  ------------------
 3822|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3822:8): [True: 0, False: 0]
  ------------------
 3823|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3823:20): [True: 0, False: 0]
  ------------------
 3824|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3825|      0|				if (!c) {
  ------------------
  |  Branch (3825:9): [True: 0, False: 0]
  ------------------
 3826|      0|					compileError(file, "Midendnumeric mode character undefined");
 3827|      0|					return 0;
 3828|      0|				}
 3829|      0|				c->attributes |= CTC_MidEndNumericMode;
 3830|      0|				(*table)->usesNumericMode = 1;
 3831|      0|			}
 3832|      0|			return 1;
 3833|       |
 3834|      0|		case CTO_NumericNoContractChars:
  ------------------
  |  Branch (3834:3): [True: 0, False: 307]
  ------------------
 3835|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3835:8): [True: 0, False: 0]
  ------------------
 3836|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3836:20): [True: 0, False: 0]
  ------------------
 3837|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3838|      0|				if (!c) {
  ------------------
  |  Branch (3838:9): [True: 0, False: 0]
  ------------------
 3839|      0|					compileError(file, "Numeric no contraction character undefined");
 3840|      0|					return 0;
 3841|      0|				}
 3842|      0|				c->attributes |= CTC_NumericNoContract;
 3843|      0|				(*table)->usesNumericMode = 1;
 3844|      0|			}
 3845|      0|			return 1;
 3846|       |
 3847|      0|		case CTO_NoContractSign: {
  ------------------
  |  Branch (3847:3): [True: 0, False: 307]
  ------------------
 3848|       |			// not passing pointer to location inside table because
 3849|       |			// compileBrailleIndicator may reallocate table
 3850|      0|			TranslationTableOffset ruleOffset;
 3851|      0|			if (!compileBrailleIndicator(file, "no contractions sign", CTO_NoContractSign,
  ------------------
  |  Branch (3851:8): [True: 0, False: 0]
  ------------------
 3852|      0|						&ruleOffset, noback, nofor, table))
 3853|      0|				return 0;
 3854|      0|			(*table)->noContractSign = ruleOffset;
 3855|      0|			return 1;
 3856|      0|		}
 3857|      0|		case CTO_SeqDelimiter:
  ------------------
  |  Branch (3857:3): [True: 0, False: 307]
  ------------------
 3858|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3858:8): [True: 0, False: 0]
  ------------------
 3859|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3859:20): [True: 0, False: 0]
  ------------------
 3860|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3861|      0|				if (!c) {
  ------------------
  |  Branch (3861:9): [True: 0, False: 0]
  ------------------
 3862|      0|					compileError(file, "Sequence delimiter character undefined");
 3863|      0|					return 0;
 3864|      0|				}
 3865|      0|				c->attributes |= CTC_SeqDelimiter;
 3866|      0|				(*table)->usesSequences = 1;
 3867|      0|			}
 3868|      0|			return 1;
 3869|       |
 3870|      0|		case CTO_SeqBeforeChars:
  ------------------
  |  Branch (3870:3): [True: 0, False: 307]
  ------------------
 3871|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3871:8): [True: 0, False: 0]
  ------------------
 3872|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3872:20): [True: 0, False: 0]
  ------------------
 3873|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3874|      0|				if (!c) {
  ------------------
  |  Branch (3874:9): [True: 0, False: 0]
  ------------------
 3875|      0|					compileError(file, "Sequence before character undefined");
 3876|      0|					return 0;
 3877|      0|				}
 3878|      0|				c->attributes |= CTC_SeqBefore;
 3879|      0|			}
 3880|      0|			return 1;
 3881|       |
 3882|      0|		case CTO_SeqAfterChars:
  ------------------
  |  Branch (3882:3): [True: 0, False: 307]
  ------------------
 3883|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3883:8): [True: 0, False: 0]
  ------------------
 3884|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3884:20): [True: 0, False: 0]
  ------------------
 3885|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3886|      0|				if (!c) {
  ------------------
  |  Branch (3886:9): [True: 0, False: 0]
  ------------------
 3887|      0|					compileError(file, "Sequence after character undefined");
 3888|      0|					return 0;
 3889|      0|				}
 3890|      0|				c->attributes |= CTC_SeqAfter;
 3891|      0|			}
 3892|      0|			return 1;
 3893|       |
 3894|      5|		case CTO_SeqAfterPattern:
  ------------------
  |  Branch (3894:3): [True: 5, False: 302]
  ------------------
 3895|      5|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3895:8): [True: 0, False: 5]
  ------------------
 3896|      5|			if (((*table)->seqPatternsCount + ruleChars.length + 1) > SEQPATTERNSIZE) {
  ------------------
  |  |   67|      5|#define SEQPATTERNSIZE 128
  ------------------
  |  Branch (3896:8): [True: 0, False: 5]
  ------------------
 3897|      0|				compileError(file, "More than %d characters", SEQPATTERNSIZE);
  ------------------
  |  |   67|      0|#define SEQPATTERNSIZE 128
  ------------------
 3898|      0|				return 0;
 3899|      0|			}
 3900|    144|			for (int k = 0; k < ruleChars.length; k++)
  ------------------
  |  Branch (3900:20): [True: 139, False: 5]
  ------------------
 3901|    139|				(*table)->seqPatterns[(*table)->seqPatternsCount++] = ruleChars.chars[k];
 3902|      5|			(*table)->seqPatterns[(*table)->seqPatternsCount++] = 0;
 3903|      5|			return 1;
 3904|       |
 3905|      1|		case CTO_SeqAfterExpression:
  ------------------
  |  Branch (3905:3): [True: 1, False: 306]
  ------------------
 3906|      1|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3906:8): [True: 0, False: 1]
  ------------------
 3907|      1|			if ((ruleChars.length + 1) > SEQPATTERNSIZE) {
  ------------------
  |  |   67|      1|#define SEQPATTERNSIZE 128
  ------------------
  |  Branch (3907:8): [True: 0, False: 1]
  ------------------
 3908|      0|				compileError(file, "More than %d characters", SEQPATTERNSIZE);
  ------------------
  |  |   67|      0|#define SEQPATTERNSIZE 128
  ------------------
 3909|      0|				return 0;
 3910|      0|			}
 3911|     93|			for (int k = 0; k < ruleChars.length; k++)
  ------------------
  |  Branch (3911:20): [True: 92, False: 1]
  ------------------
 3912|     92|				(*table)->seqAfterExpression[k] = ruleChars.chars[k];
 3913|      1|			(*table)->seqAfterExpression[ruleChars.length] = 0;
 3914|      1|			(*table)->seqAfterExpressionLength = ruleChars.length;
 3915|      1|			return 1;
 3916|       |
 3917|      0|		case CTO_CapsModeChars:
  ------------------
  |  Branch (3917:3): [True: 0, False: 307]
  ------------------
 3918|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3918:8): [True: 0, False: 0]
  ------------------
 3919|      0|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3919:20): [True: 0, False: 0]
  ------------------
 3920|      0|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 3921|      0|				if (!c) {
  ------------------
  |  Branch (3921:9): [True: 0, False: 0]
  ------------------
 3922|      0|					compileError(file, "Capital mode character undefined");
 3923|      0|					return 0;
 3924|      0|				}
 3925|      0|				c->attributes |= CTC_CapsMode;
 3926|      0|				(*table)->hasCapsModeChars = 1;
 3927|      0|			}
 3928|      0|			return 1;
 3929|       |
 3930|      1|		case CTO_BegComp: {
  ------------------
  |  Branch (3930:3): [True: 1, False: 306]
  ------------------
 3931|       |			// not passing pointer to location inside table because
 3932|       |			// compileBrailleIndicator may reallocate table
 3933|      1|			TranslationTableOffset ruleOffset;
 3934|      1|			if (!compileBrailleIndicator(file, "begin computer braille", CTO_BegComp,
  ------------------
  |  Branch (3934:8): [True: 0, False: 1]
  ------------------
 3935|      1|						&ruleOffset, noback, nofor, table))
 3936|      0|				return 0;
 3937|      1|			(*table)->begComp = ruleOffset;
 3938|      1|			return 1;
 3939|      1|		}
 3940|      7|		case CTO_EndComp: {
  ------------------
  |  Branch (3940:3): [True: 7, False: 300]
  ------------------
 3941|       |			// not passing pointer to location inside table because
 3942|       |			// compileBrailleIndicator may reallocate table
 3943|      7|			TranslationTableOffset ruleOffset;
 3944|      7|			if (!compileBrailleIndicator(file, "end computer braslle", CTO_EndComp,
  ------------------
  |  Branch (3944:8): [True: 0, False: 7]
  ------------------
 3945|      7|						&ruleOffset, noback, nofor, table))
 3946|      0|				return 0;
 3947|      7|			(*table)->endComp = ruleOffset;
 3948|      7|			return 1;
 3949|      7|		}
 3950|      0|		case CTO_NoCross:
  ------------------
  |  Branch (3950:3): [True: 0, False: 307]
  ------------------
 3951|      0|			if (nocross) {
  ------------------
  |  Branch (3951:8): [True: 0, False: 0]
  ------------------
 3952|      0|				compileError(
 3953|      0|						file, "%s already specified.", _lou_findOpcodeName(CTO_NoCross));
 3954|      0|				return 0;
 3955|      0|			}
 3956|      0|			nocross = 1;
 3957|      0|			goto doOpcode;
 3958|      0|		case CTO_Syllable:
  ------------------
  |  Branch (3958:3): [True: 0, False: 307]
  ------------------
 3959|      0|			(*table)->syllables = 1;
 3960|     15|		case CTO_Always:
  ------------------
  |  Branch (3960:3): [True: 15, False: 292]
  ------------------
 3961|     19|		case CTO_LargeSign:
  ------------------
  |  Branch (3961:3): [True: 4, False: 303]
  ------------------
 3962|     19|		case CTO_WholeWord:
  ------------------
  |  Branch (3962:3): [True: 0, False: 307]
  ------------------
 3963|     19|		case CTO_PartWord:
  ------------------
  |  Branch (3963:3): [True: 0, False: 307]
  ------------------
 3964|     19|		case CTO_JoinNum:
  ------------------
  |  Branch (3964:3): [True: 0, False: 307]
  ------------------
 3965|     20|		case CTO_JoinableWord:
  ------------------
  |  Branch (3965:3): [True: 1, False: 306]
  ------------------
 3966|     20|		case CTO_LowWord:
  ------------------
  |  Branch (3966:3): [True: 0, False: 307]
  ------------------
 3967|     20|		case CTO_SuffixableWord:
  ------------------
  |  Branch (3967:3): [True: 0, False: 307]
  ------------------
 3968|     21|		case CTO_PrefixableWord:
  ------------------
  |  Branch (3968:3): [True: 1, False: 306]
  ------------------
 3969|     21|		case CTO_BegWord:
  ------------------
  |  Branch (3969:3): [True: 0, False: 307]
  ------------------
 3970|     21|		case CTO_BegMidWord:
  ------------------
  |  Branch (3970:3): [True: 0, False: 307]
  ------------------
 3971|     21|		case CTO_MidWord:
  ------------------
  |  Branch (3971:3): [True: 0, False: 307]
  ------------------
 3972|     21|		case CTO_MidEndWord:
  ------------------
  |  Branch (3972:3): [True: 0, False: 307]
  ------------------
 3973|     27|		case CTO_EndWord:
  ------------------
  |  Branch (3973:3): [True: 6, False: 301]
  ------------------
 3974|     28|		case CTO_PrePunc:
  ------------------
  |  Branch (3974:3): [True: 1, False: 306]
  ------------------
 3975|     31|		case CTO_PostPunc:
  ------------------
  |  Branch (3975:3): [True: 3, False: 304]
  ------------------
 3976|     31|		case CTO_BegNum:
  ------------------
  |  Branch (3976:3): [True: 0, False: 307]
  ------------------
 3977|     31|		case CTO_MidNum:
  ------------------
  |  Branch (3977:3): [True: 0, False: 307]
  ------------------
 3978|     32|		case CTO_EndNum:
  ------------------
  |  Branch (3978:3): [True: 1, False: 306]
  ------------------
 3979|     32|		case CTO_Repeated:
  ------------------
  |  Branch (3979:3): [True: 0, False: 307]
  ------------------
 3980|     37|		case CTO_RepWord:
  ------------------
  |  Branch (3980:3): [True: 5, False: 302]
  ------------------
 3981|     37|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (3981:8): [True: 0, False: 37]
  ------------------
 3982|     37|			if (!getRuleDotsPattern(file, &ruleDots)) return 0;
  ------------------
  |  Branch (3982:8): [True: 0, False: 37]
  ------------------
 3983|     37|			if (ruleDots.length == 0)
  ------------------
  |  Branch (3983:8): [True: 0, False: 37]
  ------------------
 3984|       |				// check that all characters in a rule with `=` as second operand are
 3985|       |				// defined (or based on another character)
 3986|      0|				for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (3986:21): [True: 0, False: 0]
  ------------------
 3987|      0|					TranslationTableCharacter *c =
 3988|      0|							getChar(ruleChars.chars[k], *table, NULL);
 3989|      0|					if (!(c && (c->definitionRule || c->basechar))) {
  ------------------
  |  Branch (3989:12): [True: 0, False: 0]
  |  Branch (3989:18): [True: 0, False: 0]
  |  Branch (3989:39): [True: 0, False: 0]
  ------------------
 3990|      0|						compileError(file, "Character %s is not defined",
 3991|      0|								_lou_showString(&ruleChars.chars[k], 1, 0));
 3992|      0|						return 0;
 3993|      0|					}
 3994|      0|				}
 3995|     37|			TranslationTableRule *r;
 3996|     37|			if (!addRule(file, opcode, &ruleChars, &ruleDots, after, before, NULL, &r,
  ------------------
  |  Branch (3996:8): [True: 0, False: 37]
  ------------------
 3997|     37|						noback, nofor, table))
 3998|      0|				return 0;
 3999|     37|			if (nocross) r->nocross = 1;
  ------------------
  |  Branch (3999:8): [True: 0, False: 37]
  ------------------
 4000|     37|			return 1;
 4001|       |			// if (opcode == CTO_MidNum)
 4002|       |			// {
 4003|       |			//   TranslationTableCharacter *c = getChar(ruleChars.chars[0]);
 4004|       |			//   if(c)
 4005|       |			//     c->attributes |= CTC_NumericMode;
 4006|       |			// }
 4007|      0|		case CTO_RepEndWord:
  ------------------
  |  Branch (4007:3): [True: 0, False: 307]
  ------------------
 4008|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (4008:8): [True: 0, False: 0]
  ------------------
 4009|      0|			CharsString dots;
 4010|      0|			if (!getToken(file, &dots, "dots,dots operand")) return 0;
  ------------------
  |  Branch (4010:8): [True: 0, False: 0]
  ------------------
 4011|      0|			int len = dots.length;
 4012|      0|			for (int k = 0; k < len - 1; k++) {
  ------------------
  |  Branch (4012:20): [True: 0, False: 0]
  ------------------
 4013|      0|				if (dots.chars[k] == ',') {
  ------------------
  |  Branch (4013:9): [True: 0, False: 0]
  ------------------
 4014|      0|					dots.length = k;
 4015|      0|					if (!parseDots(file, &ruleDots, &dots)) return 0;
  ------------------
  |  Branch (4015:10): [True: 0, False: 0]
  ------------------
 4016|      0|					ruleDots.chars[ruleDots.length++] = ',';
 4017|      0|					k++;
 4018|      0|					if (k == len - 1 && dots.chars[k] == '=') {
  ------------------
  |  Branch (4018:10): [True: 0, False: 0]
  |  Branch (4018:26): [True: 0, False: 0]
  ------------------
 4019|       |						// check that all characters are defined (or based on another
 4020|       |						// character)
 4021|      0|						for (int l = 0; l < ruleChars.length; l++) {
  ------------------
  |  Branch (4021:23): [True: 0, False: 0]
  ------------------
 4022|      0|							TranslationTableCharacter *c =
 4023|      0|									getChar(ruleChars.chars[l], *table, NULL);
 4024|      0|							if (!(c && (c->definitionRule || c->basechar))) {
  ------------------
  |  Branch (4024:14): [True: 0, False: 0]
  |  Branch (4024:20): [True: 0, False: 0]
  |  Branch (4024:41): [True: 0, False: 0]
  ------------------
 4025|      0|								compileError(file, "Character %s is not defined",
 4026|      0|										_lou_showString(&ruleChars.chars[l], 1, 0));
 4027|      0|								return 0;
 4028|      0|							}
 4029|      0|						}
 4030|      0|					} else {
 4031|      0|						CharsString x, y;
 4032|      0|						x.length = 0;
 4033|      0|						while (k < len) x.chars[x.length++] = dots.chars[k++];
  ------------------
  |  Branch (4033:14): [True: 0, False: 0]
  ------------------
 4034|      0|						if (parseDots(file, &y, &x))
  ------------------
  |  Branch (4034:11): [True: 0, False: 0]
  ------------------
 4035|      0|							for (int l = 0; l < y.length; l++)
  ------------------
  |  Branch (4035:24): [True: 0, False: 0]
  ------------------
 4036|      0|								ruleDots.chars[ruleDots.length++] = y.chars[l];
 4037|      0|					}
 4038|      0|					return addRule(file, opcode, &ruleChars, &ruleDots, after, before,
 4039|      0|							NULL, NULL, noback, nofor, table);
 4040|      0|				}
 4041|      0|			}
 4042|      0|			return 0;
 4043|      0|		case CTO_CompDots:
  ------------------
  |  Branch (4043:3): [True: 0, False: 307]
  ------------------
 4044|      0|		case CTO_Comp6: {
  ------------------
  |  Branch (4044:3): [True: 0, False: 307]
  ------------------
 4045|      0|			TranslationTableOffset ruleOffset;
 4046|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (4046:8): [True: 0, False: 0]
  ------------------
 4047|      0|			if (ruleChars.length != 1) {
  ------------------
  |  Branch (4047:8): [True: 0, False: 0]
  ------------------
 4048|      0|				compileError(file, "first operand must be 1 character");
 4049|      0|				return 0;
 4050|      0|			}
 4051|      0|			if (nofor || noback) {
  ------------------
  |  Branch (4051:8): [True: 0, False: 0]
  |  Branch (4051:17): [True: 0, False: 0]
  ------------------
 4052|      0|				compileWarning(file, "nofor and noback not allowed on comp6 rules");
 4053|      0|			}
 4054|      0|			if (!getRuleDotsPattern(file, &ruleDots)) return 0;
  ------------------
  |  Branch (4054:8): [True: 0, False: 0]
  ------------------
 4055|      0|			if (!addRule(file, opcode, &ruleChars, &ruleDots, after, before, &ruleOffset,
  ------------------
  |  Branch (4055:8): [True: 0, False: 0]
  ------------------
 4056|      0|						NULL, noback, nofor, table))
 4057|      0|				return 0;
 4058|      0|			return 1;
 4059|      0|		}
 4060|      3|		case CTO_ExactDots:
  ------------------
  |  Branch (4060:3): [True: 3, False: 304]
  ------------------
 4061|      3|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (4061:8): [True: 0, False: 3]
  ------------------
 4062|      3|			if (ruleChars.chars[0] != '@') {
  ------------------
  |  Branch (4062:8): [True: 1, False: 2]
  ------------------
 4063|      1|				compileError(file, "The operand must begin with an at sign (@)");
 4064|      1|				return 0;
 4065|      1|			}
 4066|      4|			for (int k = 1; k < ruleChars.length; k++)
  ------------------
  |  Branch (4066:20): [True: 2, False: 2]
  ------------------
 4067|      2|				scratchPad.chars[k - 1] = ruleChars.chars[k];
 4068|      2|			scratchPad.length = ruleChars.length - 1;
 4069|      2|			if (!parseDots(file, &ruleDots, &scratchPad)) return 0;
  ------------------
  |  Branch (4069:8): [True: 0, False: 2]
  ------------------
 4070|      2|			return addRule(file, opcode, &ruleChars, &ruleDots, after, before, NULL, NULL,
 4071|      2|					noback, nofor, table);
 4072|      0|		case CTO_CapsNoCont: {
  ------------------
  |  Branch (4072:3): [True: 0, False: 307]
  ------------------
 4073|      0|			TranslationTableOffset ruleOffset;
 4074|      0|			ruleChars.length = 1;
 4075|      0|			ruleChars.chars[0] = 'a';
 4076|      0|			if (!addRule(file, opcode, &ruleChars, NULL, after, before, &ruleOffset, NULL,
  ------------------
  |  Branch (4076:8): [True: 0, False: 0]
  ------------------
 4077|      0|						noback, nofor, table))
 4078|      0|				return 0;
 4079|      0|			(*table)->capsNoCont = ruleOffset;
 4080|      0|			return 1;
 4081|      0|		}
 4082|     56|		case CTO_Replace:
  ------------------
  |  Branch (4082:3): [True: 56, False: 251]
  ------------------
 4083|     56|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (4083:8): [True: 0, False: 56]
  ------------------
 4084|     56|			if (atEndOfLine(file))
  ------------------
  |  Branch (4084:8): [True: 2, False: 54]
  ------------------
 4085|      2|				ruleDots.length = ruleDots.chars[0] = 0;
 4086|     54|			else {
 4087|     54|				if (!getRuleDotsText(file, &ruleDots)) return 0;
  ------------------
  |  Branch (4087:9): [True: 0, False: 54]
  ------------------
 4088|     54|				if (ruleDots.length > 0 && ruleDots.chars[0] == '#')
  ------------------
  |  Branch (4088:9): [True: 54, False: 0]
  |  Branch (4088:32): [True: 0, False: 54]
  ------------------
 4089|      0|					ruleDots.length = ruleDots.chars[0] = 0;
 4090|     54|				else if (ruleDots.length > 1 && ruleDots.chars[0] == '\\' &&
  ------------------
  |  Branch (4090:14): [True: 40, False: 14]
  |  Branch (4090:37): [True: 0, False: 40]
  ------------------
 4091|      0|						ruleDots.chars[1] == '#') {
  ------------------
  |  Branch (4091:7): [True: 0, False: 0]
  ------------------
 4092|      0|					ruleDots.length--;
 4093|      0|					memmove(&ruleDots.chars[0], &ruleDots.chars[1],
 4094|      0|							ruleDots.length * CHARSIZE);
  ------------------
  |  |   68|      0|#define CHARSIZE sizeof(widechar)
  ------------------
 4095|      0|				}
 4096|     54|			}
 4097|  1.40k|			for (int k = 0; k < ruleChars.length; k++)
  ------------------
  |  Branch (4097:20): [True: 1.34k, False: 56]
  ------------------
 4098|  1.34k|				putChar(file, ruleChars.chars[k], table, NULL, (*table)->ruleCounter);
 4099|  2.04k|			for (int k = 0; k < ruleDots.length; k++)
  ------------------
  |  Branch (4099:20): [True: 1.98k, False: 56]
  ------------------
 4100|  1.98k|				putChar(file, ruleDots.chars[k], table, NULL, (*table)->ruleCounter);
 4101|     56|			return addRule(file, opcode, &ruleChars, &ruleDots, after, before, NULL, NULL,
 4102|     56|					noback, nofor, table);
 4103|     26|		case CTO_Correct:
  ------------------
  |  Branch (4103:3): [True: 26, False: 281]
  ------------------
 4104|     26|			(*table)->corrections = 1;
 4105|     26|			goto doPass;
 4106|     15|		case CTO_Pass2:
  ------------------
  |  Branch (4106:3): [True: 15, False: 292]
  ------------------
 4107|     15|			if ((*table)->numPasses < 2) (*table)->numPasses = 2;
  ------------------
  |  Branch (4107:8): [True: 10, False: 5]
  ------------------
 4108|     15|			goto doPass;
 4109|     27|		case CTO_Pass3:
  ------------------
  |  Branch (4109:3): [True: 27, False: 280]
  ------------------
 4110|     27|			if ((*table)->numPasses < 3) (*table)->numPasses = 3;
  ------------------
  |  Branch (4110:8): [True: 20, False: 7]
  ------------------
 4111|     27|			goto doPass;
 4112|     38|		case CTO_Pass4:
  ------------------
  |  Branch (4112:3): [True: 38, False: 269]
  ------------------
 4113|     38|			if ((*table)->numPasses < 4) (*table)->numPasses = 4;
  ------------------
  |  Branch (4113:8): [True: 36, False: 2]
  ------------------
 4114|    106|		doPass:
 4115|    127|		case CTO_Context:
  ------------------
  |  Branch (4115:3): [True: 21, False: 286]
  ------------------
 4116|    127|			if (!(nofor || noback)) {
  ------------------
  |  Branch (4116:10): [True: 127, False: 0]
  |  Branch (4116:19): [True: 0, False: 0]
  ------------------
 4117|      0|				compileError(file, "%s or %s must be specified.",
 4118|      0|						_lou_findOpcodeName(CTO_NoFor), _lou_findOpcodeName(CTO_NoBack));
 4119|      0|				return 0;
 4120|      0|			}
 4121|    127|			return compilePassOpcode(file, opcode, noback, nofor, table);
 4122|      0|		case CTO_Contraction:
  ------------------
  |  Branch (4122:3): [True: 0, False: 307]
  ------------------
 4123|      0|		case CTO_NoCont:
  ------------------
  |  Branch (4123:3): [True: 0, False: 307]
  ------------------
 4124|      3|		case CTO_CompBrl:
  ------------------
  |  Branch (4124:3): [True: 3, False: 304]
  ------------------
 4125|      3|		case CTO_Literal:
  ------------------
  |  Branch (4125:3): [True: 0, False: 307]
  ------------------
 4126|      3|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (4126:8): [True: 0, False: 3]
  ------------------
 4127|       |			// check that all characters in a compbrl, contraction,
 4128|       |			// nocont or literal rule are defined (or based on another
 4129|       |			// character)
 4130|      6|			for (int k = 0; k < ruleChars.length; k++) {
  ------------------
  |  Branch (4130:20): [True: 3, False: 3]
  ------------------
 4131|      3|				TranslationTableCharacter *c = getChar(ruleChars.chars[k], *table, NULL);
 4132|      3|				if (!(c && (c->definitionRule || c->basechar))) {
  ------------------
  |  Branch (4132:11): [True: 3, False: 0]
  |  Branch (4132:17): [True: 0, False: 3]
  |  Branch (4132:38): [True: 3, False: 0]
  ------------------
 4133|      0|					compileError(file, "Character %s is not defined",
 4134|      0|							_lou_showString(&ruleChars.chars[k], 1, 0));
 4135|      0|					return 0;
 4136|      0|				}
 4137|      3|			}
 4138|      3|			if (opcode == CTO_Literal) {
  ------------------
  |  Branch (4138:8): [True: 0, False: 3]
  ------------------
 4139|      0|				compileWarning(file, "literal is deprecated, use compbrl instead");
 4140|      0|				opcode = CTO_CompBrl;
 4141|      0|			}
 4142|      3|			return addRule(file, opcode, &ruleChars, NULL, after, before, NULL, NULL,
 4143|      3|					noback, nofor, table);
 4144|      2|		case CTO_MultInd: {
  ------------------
  |  Branch (4144:3): [True: 2, False: 305]
  ------------------
 4145|      2|			ruleChars.length = 0;
 4146|      2|			if (!getToken(file, &token, "multiple braille indicators") ||
  ------------------
  |  Branch (4146:8): [True: 0, False: 2]
  ------------------
 4147|      2|					!parseDots(file, &cells, &token))
  ------------------
  |  Branch (4147:6): [True: 0, False: 2]
  ------------------
 4148|      0|				return 0;
 4149|      8|			while (getToken(file, &token, "multind opcodes")) {
  ------------------
  |  Branch (4149:11): [True: 8, False: 0]
  ------------------
 4150|      8|				opcode = getOpcode(file, &token);
 4151|      8|				if (opcode == CTO_None) {
  ------------------
  |  Branch (4151:9): [True: 0, False: 8]
  ------------------
 4152|      0|					compileError(file, "opcode %s not defined.",
 4153|      0|							_lou_showString(token.chars, token.length, 0));
 4154|      0|					return 0;
 4155|      0|				}
 4156|      8|				if (!(opcode >= CTO_CapsLetter && opcode < CTO_MultInd)) {
  ------------------
  |  Branch (4156:11): [True: 8, False: 0]
  |  Branch (4156:39): [True: 8, False: 0]
  ------------------
 4157|      0|					compileError(file, "Not a braille indicator opcode.");
 4158|      0|					return 0;
 4159|      0|				}
 4160|      8|				ruleChars.chars[ruleChars.length++] = (widechar)opcode;
 4161|      8|				if (atEndOfLine(file)) break;
  ------------------
  |  Branch (4161:9): [True: 2, False: 6]
  ------------------
 4162|      8|			}
 4163|      2|			return addRule(file, CTO_MultInd, &ruleChars, &cells, after, before, NULL,
 4164|      2|					NULL, noback, nofor, table);
 4165|      2|		}
 4166|       |
 4167|      0|		case CTO_Class:
  ------------------
  |  Branch (4167:3): [True: 0, False: 307]
  ------------------
 4168|      0|			compileWarning(file, "class is deprecated, use attribute instead");
 4169|      0|		case CTO_Attribute: {
  ------------------
  |  Branch (4169:3): [True: 0, False: 307]
  ------------------
 4170|      0|			if (nofor || noback) {
  ------------------
  |  Branch (4170:8): [True: 0, False: 0]
  |  Branch (4170:17): [True: 0, False: 0]
  ------------------
 4171|      0|				compileWarning(
 4172|      0|						file, "nofor and noback not allowed before class/attribute");
 4173|      0|			}
 4174|      0|			if ((opcode == CTO_Class && (*table)->usesAttributeOrClass == 1) ||
  ------------------
  |  Branch (4174:9): [True: 0, False: 0]
  |  Branch (4174:32): [True: 0, False: 0]
  ------------------
 4175|      0|					(opcode == CTO_Attribute && (*table)->usesAttributeOrClass == 2)) {
  ------------------
  |  Branch (4175:7): [True: 0, False: 0]
  |  Branch (4175:34): [True: 0, False: 0]
  ------------------
 4176|      0|				compileError(file,
 4177|      0|						"attribute and class rules must not be both present in a table");
 4178|      0|				return 0;
 4179|      0|			}
 4180|      0|			if (opcode == CTO_Class)
  ------------------
  |  Branch (4180:8): [True: 0, False: 0]
  ------------------
 4181|      0|				(*table)->usesAttributeOrClass = 2;
 4182|      0|			else
 4183|      0|				(*table)->usesAttributeOrClass = 1;
 4184|      0|			if (!getToken(file, &token, "attribute name")) {
  ------------------
  |  Branch (4184:8): [True: 0, False: 0]
  ------------------
 4185|      0|				compileError(file, "Expected %s", "attribute name");
 4186|      0|				return 0;
 4187|      0|			}
 4188|      0|			if (!(*table)->characterClasses && !allocateCharacterClasses(*table)) {
  ------------------
  |  Branch (4188:8): [True: 0, False: 0]
  |  Branch (4188:39): [True: 0, False: 0]
  ------------------
 4189|      0|				return 0;
 4190|      0|			}
 4191|       |
 4192|      0|			TranslationTableCharacterAttributes attribute = 0;
 4193|      0|			{
 4194|      0|				int attrNumber = -1;
 4195|      0|				switch (token.chars[0]) {
  ------------------
  |  Branch (4195:13): [True: 0, False: 0]
  ------------------
 4196|      0|				case '0':
  ------------------
  |  Branch (4196:5): [True: 0, False: 0]
  ------------------
 4197|      0|				case '1':
  ------------------
  |  Branch (4197:5): [True: 0, False: 0]
  ------------------
 4198|      0|				case '2':
  ------------------
  |  Branch (4198:5): [True: 0, False: 0]
  ------------------
 4199|      0|				case '3':
  ------------------
  |  Branch (4199:5): [True: 0, False: 0]
  ------------------
 4200|      0|				case '4':
  ------------------
  |  Branch (4200:5): [True: 0, False: 0]
  ------------------
 4201|      0|				case '5':
  ------------------
  |  Branch (4201:5): [True: 0, False: 0]
  ------------------
 4202|      0|				case '6':
  ------------------
  |  Branch (4202:5): [True: 0, False: 0]
  ------------------
 4203|      0|				case '7':
  ------------------
  |  Branch (4203:5): [True: 0, False: 0]
  ------------------
 4204|      0|				case '8':
  ------------------
  |  Branch (4204:5): [True: 0, False: 0]
  ------------------
 4205|      0|				case '9':
  ------------------
  |  Branch (4205:5): [True: 0, False: 0]
  ------------------
 4206|      0|					attrNumber = token.chars[0] - '0';
 4207|      0|					break;
 4208|      0|				}
 4209|      0|				if (attrNumber >= 0) {
  ------------------
  |  Branch (4209:9): [True: 0, False: 0]
  ------------------
 4210|      0|					if (opcode == CTO_Class) {
  ------------------
  |  Branch (4210:10): [True: 0, False: 0]
  ------------------
 4211|      0|						compileError(file,
 4212|      0|								"Invalid class name: may not contain digits, use "
 4213|      0|								"attribute instead of class");
 4214|      0|						return 0;
 4215|      0|					}
 4216|      0|					if (token.length > 1 || attrNumber > 7) {
  ------------------
  |  Branch (4216:10): [True: 0, False: 0]
  |  Branch (4216:30): [True: 0, False: 0]
  ------------------
 4217|      0|						compileError(file,
 4218|      0|								"Invalid attribute name: must be a digit between 0 and 7 "
 4219|      0|								"or a word containing only letters");
 4220|      0|						return 0;
 4221|      0|					}
 4222|      0|					if (!(*table)->numberedAttributes[attrNumber])
  ------------------
  |  Branch (4222:10): [True: 0, False: 0]
  ------------------
 4223|       |						// attribute not used before yet: assign it a value
 4224|      0|						(*table)->numberedAttributes[attrNumber] =
 4225|      0|								getNextNumberedAttribute(*table);
 4226|      0|					attribute = (*table)->numberedAttributes[attrNumber];
 4227|      0|				} else {
 4228|      0|					const CharacterClass *namedAttr = findCharacterClass(&token, *table);
 4229|      0|					if (!namedAttr) {
  ------------------
  |  Branch (4229:10): [True: 0, False: 0]
  ------------------
 4230|       |						// no class with that name: create one
 4231|      0|						namedAttr = addCharacterClass(
 4232|      0|								file, &token.chars[0], token.length, *table, 1);
 4233|      0|						if (!namedAttr) return 0;
  ------------------
  |  Branch (4233:11): [True: 0, False: 0]
  ------------------
 4234|      0|					}
 4235|       |					// there is a class with that name or a new class was successfully
 4236|       |					// created
 4237|      0|					attribute = namedAttr->attribute;
 4238|      0|					if (attribute == CTC_UpperCase || attribute == CTC_LowerCase)
  ------------------
  |  Branch (4238:10): [True: 0, False: 0]
  |  Branch (4238:40): [True: 0, False: 0]
  ------------------
 4239|      0|						attribute |= CTC_Letter;
 4240|      0|				}
 4241|      0|			}
 4242|      0|			CharsString characters;
 4243|      0|			if (!getCharacters(file, &characters)) return 0;
  ------------------
  |  Branch (4243:8): [True: 0, False: 0]
  ------------------
 4244|      0|			for (int i = 0; i < characters.length; i++) {
  ------------------
  |  Branch (4244:20): [True: 0, False: 0]
  ------------------
 4245|       |				// get the character from the table, or if it is not defined yet,
 4246|       |				// define it
 4247|      0|				TranslationTableCharacter *character = putChar(
 4248|      0|						file, characters.chars[i], table, NULL, (*table)->ruleCounter);
 4249|       |				// set the attribute
 4250|      0|				character->attributes |= attribute;
 4251|       |				// also set the attribute on the associated dots (if any)
 4252|      0|				if (character->basechar)
  ------------------
  |  Branch (4252:9): [True: 0, False: 0]
  ------------------
 4253|      0|					character = (TranslationTableCharacter *)&(*table)
 4254|      0|										->ruleArea[character->basechar];
 4255|      0|				if (character->definitionRule) {
  ------------------
  |  Branch (4255:9): [True: 0, False: 0]
  ------------------
 4256|      0|					TranslationTableRule *defRule =
 4257|      0|							(TranslationTableRule *)&(*table)
 4258|      0|									->ruleArea[character->definitionRule];
 4259|      0|					if (defRule->dotslen == 1) {
  ------------------
  |  Branch (4259:10): [True: 0, False: 0]
  ------------------
 4260|      0|						TranslationTableCharacter *dots =
 4261|      0|								getDots(defRule->charsdots[defRule->charslen], *table);
 4262|      0|						if (dots) dots->attributes |= attribute;
  ------------------
  |  Branch (4262:11): [True: 0, False: 0]
  ------------------
 4263|      0|					}
 4264|      0|				}
 4265|      0|			}
 4266|      0|			(*table)->ruleCounter++;
 4267|      0|			return 1;
 4268|      0|		}
 4269|       |
 4270|      0|			{
 4271|      0|				TranslationTableCharacterAttributes *attributes;
 4272|      0|				const CharacterClass *class;
 4273|      0|			case CTO_After:
  ------------------
  |  Branch (4273:4): [True: 0, False: 307]
  ------------------
 4274|      0|				attributes = &after;
 4275|      0|				goto doBeforeAfter;
 4276|      0|			case CTO_Before:
  ------------------
  |  Branch (4276:4): [True: 0, False: 307]
  ------------------
 4277|      0|				attributes = &before;
 4278|      0|			doBeforeAfter:
 4279|      0|				if (!(*table)->characterClasses) {
  ------------------
  |  Branch (4279:9): [True: 0, False: 0]
  ------------------
 4280|      0|					if (!allocateCharacterClasses(*table)) return 0;
  ------------------
  |  Branch (4280:10): [True: 0, False: 0]
  ------------------
 4281|      0|				}
 4282|      0|				if (!getToken(file, &token, "attribute name")) return 0;
  ------------------
  |  Branch (4282:9): [True: 0, False: 0]
  ------------------
 4283|      0|				if (!(class = findCharacterClass(&token, *table))) {
  ------------------
  |  Branch (4283:9): [True: 0, False: 0]
  ------------------
 4284|      0|					compileError(file, "attribute not defined");
 4285|      0|					return 0;
 4286|      0|				}
 4287|      0|				*attributes |= class->attribute;
 4288|      0|				goto doOpcode;
 4289|      0|			}
 4290|     19|		case CTO_Base:
  ------------------
  |  Branch (4290:3): [True: 19, False: 288]
  ------------------
 4291|     19|			if (nofor || noback) {
  ------------------
  |  Branch (4291:8): [True: 0, False: 19]
  |  Branch (4291:17): [True: 0, False: 19]
  ------------------
 4292|      0|				compileWarning(file, "nofor and noback not allowed before base");
 4293|      0|			}
 4294|     19|			if (!getToken(file, &token, "attribute name")) {
  ------------------
  |  Branch (4294:8): [True: 1, False: 18]
  ------------------
 4295|      1|				compileError(
 4296|      1|						file, "base opcode must be followed by a valid attribute name.");
 4297|      1|				return 0;
 4298|      1|			}
 4299|     18|			if (!(*table)->characterClasses && !allocateCharacterClasses(*table)) {
  ------------------
  |  Branch (4299:8): [True: 3, False: 15]
  |  Branch (4299:39): [True: 0, False: 3]
  ------------------
 4300|      0|				return 0;
 4301|      0|			}
 4302|     18|			const CharacterClass *mode = findCharacterClass(&token, *table);
 4303|     18|			if (!mode) {
  ------------------
  |  Branch (4303:8): [True: 2, False: 16]
  ------------------
 4304|      2|				mode = addCharacterClass(file, token.chars, token.length, *table, 1);
 4305|      2|				if (!mode) return 0;
  ------------------
  |  Branch (4305:9): [True: 0, False: 2]
  ------------------
 4306|      2|			}
 4307|     18|			if (!(mode->attribute == CTC_UpperCase || mode->attribute == CTC_Digit) &&
  ------------------
  |  Branch (4307:10): [True: 0, False: 18]
  |  Branch (4307:46): [True: 16, False: 2]
  ------------------
 4308|      2|					mode->attribute >= CTC_Space && mode->attribute <= CTC_LitDigit) {
  ------------------
  |  Branch (4308:6): [True: 2, False: 0]
  |  Branch (4308:38): [True: 0, False: 2]
  ------------------
 4309|      0|				compileError(file,
 4310|      0|						"base opcode must be followed by \"uppercase\", \"digit\", or a "
 4311|      0|						"custom attribute name.");
 4312|      0|				return 0;
 4313|      0|			}
 4314|     18|			if (!getRuleCharsText(file, &token)) return 0;
  ------------------
  |  Branch (4314:8): [True: 0, False: 18]
  ------------------
 4315|     18|			if (token.length != 1) {
  ------------------
  |  Branch (4315:8): [True: 0, False: 18]
  ------------------
 4316|      0|				compileError(file,
 4317|      0|						"Exactly one character followed by one base character is "
 4318|      0|						"required.");
 4319|      0|				return 0;
 4320|      0|			}
 4321|     18|			TranslationTableOffset characterOffset;
 4322|     18|			TranslationTableCharacter *character = putChar(
 4323|     18|					file, token.chars[0], table, &characterOffset, (*table)->ruleCounter);
 4324|     18|			if (!getRuleCharsText(file, &token)) return 0;
  ------------------
  |  Branch (4324:8): [True: 0, False: 18]
  ------------------
 4325|     18|			if (token.length != 1) {
  ------------------
  |  Branch (4325:8): [True: 0, False: 18]
  ------------------
 4326|      0|				compileError(file, "Exactly one base character is required.");
 4327|      0|				return 0;
 4328|      0|			}
 4329|     18|			TranslationTableOffset basechar;
 4330|     18|			putChar(file, token.chars[0], table, &basechar, (*table)->ruleCounter);
 4331|       |			// putChar may have moved table, so make sure character is still valid
 4332|     18|			character = (TranslationTableCharacter *)&(*table)->ruleArea[characterOffset];
 4333|     18|			if (character->basechar) {
  ------------------
  |  Branch (4333:8): [True: 15, False: 3]
  ------------------
 4334|     15|				if (character->basechar == basechar &&
  ------------------
  |  Branch (4334:9): [True: 15, False: 0]
  ------------------
 4335|     15|						character->mode == mode->attribute) {
  ------------------
  |  Branch (4335:7): [True: 15, False: 0]
  ------------------
 4336|     15|					_lou_logMessage(LOU_LOG_DEBUG, "%s:%d: Duplicate base rule.",
 4337|     15|							file->fileName, file->lineNumber);
 4338|     15|				} else {
 4339|      0|					_lou_logMessage(LOU_LOG_DEBUG,
 4340|      0|							"%s:%d: A different base rule already exists for this "
 4341|      0|							"character (%s). The existing rule will take precedence "
 4342|      0|							"over the new one.",
 4343|      0|							file->fileName, file->lineNumber,
 4344|      0|							printSource(file->sourceFile, character->sourceFile,
 4345|      0|									character->sourceLine));
 4346|      0|				}
 4347|     15|			} else {
 4348|      3|				character->basechar = basechar;
 4349|      3|				character->mode = mode->attribute;
 4350|      3|				character->sourceFile = file->sourceFile;
 4351|      3|				character->sourceLine = file->lineNumber;
 4352|      3|				character->ruleIndex = (*table)->ruleCounter;
 4353|       |				/* some other processing is done at the end of the compilation, in
 4354|       |				 * finalizeTable() */
 4355|      3|			}
 4356|     18|			(*table)->ruleCounter++;
 4357|     18|			return 1;
 4358|      1|		case CTO_EmpMatchBefore:
  ------------------
  |  Branch (4358:3): [True: 1, False: 306]
  ------------------
 4359|      1|			before |= CTC_EmpMatch;
 4360|      1|			goto doOpcode;
 4361|      0|		case CTO_EmpMatchAfter:
  ------------------
  |  Branch (4361:3): [True: 0, False: 307]
  ------------------
 4362|      0|			after |= CTC_EmpMatch;
 4363|      0|			goto doOpcode;
 4364|       |
 4365|      5|		case CTO_SwapCc:
  ------------------
  |  Branch (4365:3): [True: 5, False: 302]
  ------------------
 4366|     13|		case CTO_SwapCd:
  ------------------
  |  Branch (4366:3): [True: 8, False: 299]
  ------------------
 4367|     13|		case CTO_SwapDd:
  ------------------
  |  Branch (4367:3): [True: 0, False: 307]
  ------------------
 4368|     13|			return compileSwap(file, opcode, noback, nofor, table);
 4369|      0|		case CTO_Hyphen:
  ------------------
  |  Branch (4369:3): [True: 0, False: 307]
  ------------------
 4370|      0|		case CTO_DecPoint:
  ------------------
  |  Branch (4370:3): [True: 0, False: 307]
  ------------------
 4371|       |			//	case CTO_Apostrophe:
 4372|       |			//	case CTO_Initial:
 4373|      0|			if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (4373:8): [True: 0, False: 0]
  ------------------
 4374|      0|			if (!getRuleDotsPattern(file, &ruleDots)) return 0;
  ------------------
  |  Branch (4374:8): [True: 0, False: 0]
  ------------------
 4375|      0|			if (ruleChars.length != 1 || ruleDots.length < 1) {
  ------------------
  |  Branch (4375:8): [True: 0, False: 0]
  |  Branch (4375:33): [True: 0, False: 0]
  ------------------
 4376|      0|				compileError(file,
 4377|      0|						"One Unicode character and at least one cell are "
 4378|      0|						"required.");
 4379|      0|				return 0;
 4380|      0|			}
 4381|      0|			return addRule(file, opcode, &ruleChars, &ruleDots, after, before, NULL, NULL,
 4382|      0|					noback, nofor, table);
 4383|       |			// if (opcode == CTO_DecPoint)
 4384|       |			// {
 4385|       |			//   TranslationTableCharacter *c =
 4386|       |			//   getChar(ruleChars.chars[0]);
 4387|       |			//   if(c)
 4388|       |			//     c->attributes |= CTC_NumericMode;
 4389|       |			// }
 4390|      0|		default:
  ------------------
  |  Branch (4390:3): [True: 0, False: 307]
  ------------------
 4391|      0|			compileError(file, "unimplemented opcode.");
 4392|      0|			return 0;
 4393|    307|		}
 4394|    607|	}
 4395|      0|	return 0;
 4396|    607|}
compileTranslationTable.c:getToken:
  368|  1.90k|getToken(FileInfo *file, CharsString *result, const char *description) {
  369|       |	/* Find the next string of contiguous non-whitespace characters. If this
  370|       |	 * is the last token on the line, return 2 instead of 1. */
  371|  4.53k|	while (!atEndOfLine(file) && atTokenDelimiter(file)) file->linepos++;
  ------------------
  |  Branch (371:9): [True: 4.31k, False: 221]
  |  Branch (371:31): [True: 2.63k, False: 1.68k]
  ------------------
  372|  1.90k|	result->length = 0;
  373|  15.2k|	while (!atEndOfLine(file) && !atTokenDelimiter(file)) {
  ------------------
  |  Branch (373:9): [True: 14.8k, False: 400]
  |  Branch (373:31): [True: 13.3k, False: 1.50k]
  ------------------
  374|  13.3k|		int maxlen = MAXSTRING;
  ------------------
  |  |   80|  13.3k|#define MAXSTRING 2048
  ------------------
  375|  13.3k|		if (result->length >= maxlen) {
  ------------------
  |  Branch (375:7): [True: 0, False: 13.3k]
  ------------------
  376|      0|			compileError(file, "more than %d characters (bytes)", maxlen);
  377|      0|			return 0;
  378|      0|		} else
  379|  13.3k|			result->chars[result->length++] = file->line[file->linepos++];
  380|  13.3k|	}
  381|  1.90k|	if (!result->length) {
  ------------------
  |  Branch (381:6): [True: 221, False: 1.68k]
  ------------------
  382|       |		/* Not enough tokens */
  383|    221|		if (description) compileError(file, "%s not specified.", description);
  ------------------
  |  Branch (383:7): [True: 4, False: 217]
  ------------------
  384|    221|		return 0;
  385|    221|	}
  386|  1.68k|	result->chars[result->length] = 0;
  387|  7.10k|	while (!atEndOfLine(file) && atTokenDelimiter(file)) file->linepos++;
  ------------------
  |  Branch (387:9): [True: 6.88k, False: 218]
  |  Branch (387:31): [True: 5.42k, False: 1.46k]
  ------------------
  388|  1.68k|	return 1;
  389|  1.90k|}
compileTranslationTable.c:atTokenDelimiter:
  363|  26.0k|atTokenDelimiter(const FileInfo *file) {
  364|  26.0k|	return file->line[file->linepos] <= 32;
  365|  26.0k|}
compileTranslationTable.c:eqasc2uni:
   78|  4.80k|eqasc2uni(const unsigned char *a, const widechar *b, const int len) {
   79|  4.80k|	int k;
   80|  9.18k|	for (k = 0; k < len; k++)
  ------------------
  |  Branch (80:14): [True: 8.56k, False: 627]
  ------------------
   81|  8.56k|		if ((widechar)a[k] != b[k]) return 0;
  ------------------
  |  Branch (81:7): [True: 4.17k, False: 4.38k]
  ------------------
   82|    627|	return 1;
   83|  4.80k|}
compileTranslationTable.c:compileHyphenation:
 2580|     16|		FileInfo *file, CharsString *encoding, TranslationTableHeader **table) {
 2581|     16|	CharsString hyph;
 2582|     16|	HyphenationTrans *holdPointer;
 2583|     16|	HyphenHashTab *hashTab;
 2584|     16|	CharsString word;
 2585|     16|	char pattern[MAXSTRING + 1];
 2586|     16|	unsigned int stateNum = 0, lastState = 0;
 2587|     16|	int i, j, k = encoding->length;
 2588|     16|	widechar ch;
 2589|     16|	int found;
 2590|     16|	HyphenHashEntry *e;
 2591|     16|	HyphenDict dict;
 2592|     16|	TranslationTableOffset holdOffset;
 2593|       |	/* Set aside enough space for hyphenation states and transitions in
 2594|       |	 * translation table. Must be done before anything else */
 2595|     16|	allocateSpaceInTranslationTable(file, NULL, 250000, table);
 2596|     16|	hashTab = hyphenHashNew();
 2597|     16|	dict.numStates = 1;
 2598|     16|	dict.states = malloc(sizeof(HyphenationState));
 2599|     16|	if (!dict.states) _lou_outOfMemory();
  ------------------
  |  Branch (2599:6): [True: 0, False: 16]
  ------------------
 2600|     16|	dict.states[0].hyphenPattern = 0;
 2601|     16|	dict.states[0].fallbackState = DEFAULTSTATE;
  ------------------
  |  | 2466|     16|#define DEFAULTSTATE 0xffff
  ------------------
 2602|     16|	dict.states[0].numTrans = 0;
 2603|     16|	dict.states[0].trans.pointer = NULL;
 2604|    431|	do {
 2605|    431|		if (encoding->chars[0] == 'I') {
  ------------------
  |  Branch (2605:7): [True: 102, False: 329]
  ------------------
 2606|    102|			if (!getToken(file, &hyph, NULL)) continue;
  ------------------
  |  Branch (2606:8): [True: 2, False: 100]
  ------------------
 2607|    329|		} else {
 2608|       |			/* UTF-8 */
 2609|    329|			if (!getToken(file, &word, NULL)) continue;
  ------------------
  |  Branch (2609:8): [True: 153, False: 176]
  ------------------
 2610|    176|			parseChars(file, &hyph, &word);
 2611|    176|		}
 2612|    276|		if (hyph.length == 0 || hyph.chars[0] == '#' || hyph.chars[0] == '%' ||
  ------------------
  |  Branch (2612:7): [True: 0, False: 276]
  |  Branch (2612:27): [True: 72, False: 204]
  |  Branch (2612:51): [True: 0, False: 204]
  ------------------
 2613|    204|				hyph.chars[0] == '<')
  ------------------
  |  Branch (2613:5): [True: 0, False: 204]
  ------------------
 2614|     72|			continue; /* comment */
 2615|    204|		j = 0;
 2616|    204|		pattern[j] = '0';
 2617|  2.89k|		for (i = 0; i < hyph.length; i++) {
  ------------------
  |  Branch (2617:15): [True: 2.68k, False: 204]
  ------------------
 2618|  2.68k|			if (hyph.chars[i] >= '0' && hyph.chars[i] <= '9')
  ------------------
  |  Branch (2618:8): [True: 2.35k, False: 335]
  |  Branch (2618:32): [True: 58, False: 2.29k]
  ------------------
 2619|     58|				pattern[j] = (char)hyph.chars[i];
 2620|  2.62k|			else {
 2621|  2.62k|				word.chars[j] = hyph.chars[i];
 2622|  2.62k|				pattern[++j] = '0';
 2623|  2.62k|			}
 2624|  2.68k|		}
 2625|    204|		word.chars[j] = 0;
 2626|    204|		word.length = j;
 2627|    204|		pattern[j + 1] = 0;
 2628|  2.93k|		for (i = 0; pattern[i] == '0'; i++);
  ------------------
  |  Branch (2628:15): [True: 2.73k, False: 204]
  ------------------
 2629|    204|		found = hyphenHashLookup(hashTab, &word);
 2630|    204|		if (found != DEFAULTSTATE)
  ------------------
  |  | 2466|    204|#define DEFAULTSTATE 0xffff
  ------------------
  |  Branch (2630:7): [True: 102, False: 102]
  ------------------
 2631|    102|			stateNum = found;
 2632|    102|		else
 2633|    102|			stateNum = hyphenGetNewState(&dict, hashTab, &word);
 2634|    204|		k = j + 2 - i;
 2635|    204|		if (k > 0) {
  ------------------
  |  Branch (2635:7): [True: 204, False: 0]
  ------------------
 2636|    204|			allocateSpaceInTranslationTable(
 2637|    204|					file, &dict.states[stateNum].hyphenPattern, k, table);
 2638|    204|			memcpy(&(*table)->ruleArea[dict.states[stateNum].hyphenPattern], &pattern[i],
 2639|    204|					k);
 2640|    204|		}
 2641|       |		/* now, put in the prefix transitions */
 2642|  2.33k|		while (found == DEFAULTSTATE) {
  ------------------
  |  | 2466|  2.33k|#define DEFAULTSTATE 0xffff
  ------------------
  |  Branch (2642:10): [True: 2.12k, False: 204]
  ------------------
 2643|  2.12k|			lastState = stateNum;
 2644|  2.12k|			ch = word.chars[word.length-- - 1];
 2645|  2.12k|			found = hyphenHashLookup(hashTab, &word);
 2646|  2.12k|			if (found != DEFAULTSTATE)
  ------------------
  |  | 2466|  2.12k|#define DEFAULTSTATE 0xffff
  ------------------
  |  Branch (2646:8): [True: 102, False: 2.02k]
  ------------------
 2647|    102|				stateNum = found;
 2648|  2.02k|			else
 2649|  2.02k|				stateNum = hyphenGetNewState(&dict, hashTab, &word);
 2650|  2.12k|			hyphenAddTrans(&dict, stateNum, lastState, ch);
 2651|  2.12k|		}
 2652|    431|	} while (_lou_getALine(file));
  ------------------
  |  Branch (2652:11): [True: 415, False: 16]
  ------------------
 2653|       |	/* put in the fallback states */
 2654|   131k|	for (i = 0; i < HYPHENHASHSIZE; i++) {
  ------------------
  |  | 2467|   131k|#define HYPHENHASHSIZE 8191
  ------------------
  |  Branch (2654:14): [True: 131k, False: 16]
  ------------------
 2655|   133k|		for (e = hashTab->entries[i]; e; e = e->next) {
  ------------------
  |  Branch (2655:33): [True: 2.12k, False: 131k]
  ------------------
 2656|   142k|			for (j = 1; j <= e->key->length; j++) {
  ------------------
  |  Branch (2656:16): [True: 142k, False: 0]
  ------------------
 2657|   142k|				word.length = 0;
 2658|  13.3M|				for (k = j; k < e->key->length; k++)
  ------------------
  |  Branch (2658:17): [True: 13.2M, False: 142k]
  ------------------
 2659|  13.2M|					word.chars[word.length++] = e->key->chars[k];
 2660|   142k|				stateNum = hyphenHashLookup(hashTab, &word);
 2661|   142k|				if (stateNum != DEFAULTSTATE) break;
  ------------------
  |  | 2466|   142k|#define DEFAULTSTATE 0xffff
  ------------------
  |  Branch (2661:9): [True: 2.12k, False: 140k]
  ------------------
 2662|   142k|			}
 2663|  2.12k|			if (e->val) dict.states[e->val].fallbackState = stateNum;
  ------------------
  |  Branch (2663:8): [True: 2.12k, False: 0]
  ------------------
 2664|  2.12k|		}
 2665|   131k|	}
 2666|     16|	hyphenHashFree(hashTab);
 2667|       |	/* Transfer hyphenation information to table */
 2668|  2.16k|	for (i = 0; i < dict.numStates; i++) {
  ------------------
  |  Branch (2668:14): [True: 2.14k, False: 16]
  ------------------
 2669|  2.14k|		if (dict.states[i].numTrans == 0)
  ------------------
  |  Branch (2669:7): [True: 98, False: 2.04k]
  ------------------
 2670|     98|			dict.states[i].trans.offset = 0;
 2671|  2.04k|		else {
 2672|  2.04k|			holdPointer = dict.states[i].trans.pointer;
 2673|  2.04k|			allocateSpaceInTranslationTable(file, &dict.states[i].trans.offset,
 2674|  2.04k|					dict.states[i].numTrans * sizeof(HyphenationTrans), table);
 2675|  2.04k|			memcpy(&(*table)->ruleArea[dict.states[i].trans.offset], holdPointer,
 2676|  2.04k|					dict.states[i].numTrans * sizeof(HyphenationTrans));
 2677|  2.04k|			free(holdPointer);
 2678|  2.04k|		}
 2679|  2.14k|	}
 2680|     16|	allocateSpaceInTranslationTable(
 2681|     16|			file, &holdOffset, dict.numStates * sizeof(HyphenationState), table);
 2682|     16|	(*table)->hyphenStatesArray = holdOffset;
 2683|       |	/* Prevents segmentation fault if table is reallocated */
 2684|     16|	memcpy(&(*table)->ruleArea[(*table)->hyphenStatesArray], &dict.states[0],
 2685|     16|			dict.numStates * sizeof(HyphenationState));
 2686|     16|	free(dict.states);
 2687|     16|	return 1;
 2688|     16|}
compileTranslationTable.c:hyphenHashNew:
 2495|     16|hyphenHashNew(void) {
 2496|     16|	HyphenHashTab *hashTab;
 2497|     16|	if (!(hashTab = malloc(sizeof(HyphenHashTab)))) _lou_outOfMemory();
  ------------------
  |  Branch (2497:6): [True: 0, False: 16]
  ------------------
 2498|     16|	memset(hashTab, 0, sizeof(HyphenHashTab));
 2499|     16|	return hashTab;
 2500|     16|}
compileTranslationTable.c:hyphenHashLookup:
 2533|   144k|hyphenHashLookup(HyphenHashTab *hashTab, const CharsString *key) {
 2534|   144k|	int i, j;
 2535|   144k|	HyphenHashEntry *e;
 2536|   144k|	if (key->length == 0) return 0;
  ------------------
  |  Branch (2536:6): [True: 2.02k, False: 142k]
  ------------------
 2537|   142k|	i = hyphenStringHash(key) % HYPHENHASHSIZE;
  ------------------
  |  | 2467|   142k|#define HYPHENHASHSIZE 8191
  ------------------
 2538|   148k|	for (e = hashTab->entries[i]; e; e = e->next) {
  ------------------
  |  Branch (2538:32): [True: 6.03k, False: 142k]
  ------------------
 2539|  6.03k|		if (key->length != e->key->length) continue;
  ------------------
  |  Branch (2539:7): [True: 5.69k, False: 346]
  ------------------
 2540|  1.86k|		for (j = 0; j < key->length; j++)
  ------------------
  |  Branch (2540:15): [True: 1.55k, False: 312]
  ------------------
 2541|  1.55k|			if (key->chars[j] != e->key->chars[j]) break;
  ------------------
  |  Branch (2541:8): [True: 34, False: 1.52k]
  ------------------
 2542|    346|		if (j == key->length) return e->val;
  ------------------
  |  Branch (2542:7): [True: 312, False: 34]
  ------------------
 2543|    346|	}
 2544|   142k|	return DEFAULTSTATE;
  ------------------
  |  | 2466|   142k|#define DEFAULTSTATE 0xffff
  ------------------
 2545|   142k|}
compileTranslationTable.c:hyphenStringHash:
 2481|   144k|hyphenStringHash(const CharsString *s) {
 2482|   144k|	int k;
 2483|   144k|	unsigned int h = 0, g;
 2484|  13.6M|	for (k = 0; k < s->length; k++) {
  ------------------
  |  Branch (2484:14): [True: 13.4M, False: 144k]
  ------------------
 2485|  13.4M|		h = (h << 4) + s->chars[k];
 2486|  13.4M|		if ((g = h & 0xf0000000)) {
  ------------------
  |  Branch (2486:7): [True: 11.9M, False: 1.57M]
  ------------------
 2487|  11.9M|			h = h ^ (g >> 24);
 2488|  11.9M|			h = h ^ g;
 2489|  11.9M|		}
 2490|  13.4M|	}
 2491|   144k|	return h;
 2492|   144k|}
compileTranslationTable.c:hyphenGetNewState:
 2548|  2.12k|hyphenGetNewState(HyphenDict *dict, HyphenHashTab *hashTab, const CharsString *string) {
 2549|  2.12k|	hyphenHashInsert(hashTab, string, dict->numStates);
 2550|       |	/* predicate is true if dict->numStates is a power of two */
 2551|  2.12k|	if (!(dict->numStates & (dict->numStates - 1)))
  ------------------
  |  Branch (2551:6): [True: 107, False: 2.02k]
  ------------------
 2552|    107|		dict->states =
 2553|    107|				realloc(dict->states, (dict->numStates << 1) * sizeof(HyphenationState));
 2554|  2.12k|	if (!dict->states) _lou_outOfMemory();
  ------------------
  |  Branch (2554:6): [True: 0, False: 2.12k]
  ------------------
 2555|  2.12k|	dict->states[dict->numStates].hyphenPattern = 0;
 2556|  2.12k|	dict->states[dict->numStates].fallbackState = DEFAULTSTATE;
  ------------------
  |  | 2466|  2.12k|#define DEFAULTSTATE 0xffff
  ------------------
 2557|  2.12k|	dict->states[dict->numStates].numTrans = 0;
 2558|       |	dict->states[dict->numStates].trans.pointer = NULL;
 2559|  2.12k|	return dict->numStates++;
 2560|  2.12k|}
compileTranslationTable.c:hyphenHashInsert:
 2517|  2.12k|hyphenHashInsert(HyphenHashTab *hashTab, const CharsString *key, int val) {
 2518|  2.12k|	int i, j;
 2519|  2.12k|	HyphenHashEntry *e;
 2520|  2.12k|	i = hyphenStringHash(key) % HYPHENHASHSIZE;
  ------------------
  |  | 2467|  2.12k|#define HYPHENHASHSIZE 8191
  ------------------
 2521|  2.12k|	if (!(e = malloc(sizeof(HyphenHashEntry)))) _lou_outOfMemory();
  ------------------
  |  Branch (2521:6): [True: 0, False: 2.12k]
  ------------------
 2522|  2.12k|	e->next = hashTab->entries[i];
 2523|  2.12k|	e->key = malloc((key->length + 1) * CHARSIZE);
  ------------------
  |  |   68|  2.12k|#define CHARSIZE sizeof(widechar)
  ------------------
 2524|  2.12k|	if (!e->key) _lou_outOfMemory();
  ------------------
  |  Branch (2524:6): [True: 0, False: 2.12k]
  ------------------
 2525|  2.12k|	e->key->length = key->length;
 2526|   145k|	for (j = 0; j < key->length; j++) e->key->chars[j] = key->chars[j];
  ------------------
  |  Branch (2526:14): [True: 143k, False: 2.12k]
  ------------------
 2527|  2.12k|	e->val = val;
 2528|  2.12k|	hashTab->entries[i] = e;
 2529|  2.12k|}
compileTranslationTable.c:hyphenAddTrans:
 2565|  2.12k|hyphenAddTrans(HyphenDict *dict, int state1, int state2, widechar ch) {
 2566|  2.12k|	int numTrans;
 2567|  2.12k|	numTrans = dict->states[state1].numTrans;
 2568|  2.12k|	if (numTrans == 0)
  ------------------
  |  Branch (2568:6): [True: 2.04k, False: 82]
  ------------------
 2569|  2.04k|		dict->states[state1].trans.pointer = malloc(sizeof(HyphenationTrans));
 2570|     82|	else if (!(numTrans & (numTrans - 1)))
  ------------------
  |  Branch (2570:11): [True: 51, False: 31]
  ------------------
 2571|     51|		dict->states[state1].trans.pointer = realloc(dict->states[state1].trans.pointer,
 2572|     51|				(numTrans << 1) * sizeof(HyphenationTrans));
 2573|  2.12k|	dict->states[state1].trans.pointer[numTrans].ch = ch;
 2574|  2.12k|	dict->states[state1].trans.pointer[numTrans].newState = state2;
 2575|  2.12k|	dict->states[state1].numTrans++;
 2576|  2.12k|}
compileTranslationTable.c:hyphenHashFree:
 2503|     16|hyphenHashFree(HyphenHashTab *hashTab) {
 2504|     16|	int i;
 2505|     16|	HyphenHashEntry *e, *next;
 2506|   131k|	for (i = 0; i < HYPHENHASHSIZE; i++)
  ------------------
  |  | 2467|   131k|#define HYPHENHASHSIZE 8191
  ------------------
  |  Branch (2506:14): [True: 131k, False: 16]
  ------------------
 2507|   133k|		for (e = hashTab->entries[i]; e; e = next) {
  ------------------
  |  Branch (2507:33): [True: 2.12k, False: 131k]
  ------------------
 2508|  2.12k|			next = e->next;
 2509|  2.12k|			free(e->key);
 2510|  2.12k|			free(e);
 2511|  2.12k|		}
 2512|     16|	free(hashTab);
 2513|     16|}
compileTranslationTable.c:getOpcode:
 1186|    615|getOpcode(const FileInfo *file, const CharsString *token) {
 1187|    615|	static TranslationTableOpcode lastOpcode = 0;
 1188|    615|	TranslationTableOpcode opcode = lastOpcode;
 1189|       |
 1190|  34.1k|	do {
 1191|  34.1k|		if (token->length == opcodeLengths[opcode])
  ------------------
  |  Branch (1191:7): [True: 4.20k, False: 29.9k]
  ------------------
 1192|  4.20k|			if (eqasc2uni((unsigned char *)opcodeNames[opcode], &token->chars[0],
  ------------------
  |  Branch (1192:8): [True: 611, False: 3.59k]
  ------------------
 1193|  4.20k|						token->length)) {
 1194|    611|				lastOpcode = opcode;
 1195|    611|				return opcode;
 1196|    611|			}
 1197|  33.5k|		opcode++;
 1198|  33.5k|		if (opcode >= CTO_None) opcode = 0;
  ------------------
  |  Branch (1198:7): [True: 286, False: 33.2k]
  ------------------
 1199|  33.5k|	} while (opcode != lastOpcode);
  ------------------
  |  Branch (1199:11): [True: 33.5k, False: 4]
  ------------------
 1200|      4|	return CTO_None;
 1201|    615|}
compileTranslationTable.c:compileCharDef:
 2693|    155|		TranslationTableHeader **table, DisplayTableHeader **displayTable) {
 2694|    155|	CharsString ruleChars;
 2695|    155|	CharsString ruleDots;
 2696|    155|	if (!getRuleCharsText(file, &ruleChars)) return 0;
  ------------------
  |  Branch (2696:6): [True: 0, False: 155]
  ------------------
 2697|    155|	if (!getRuleDotsPattern(file, &ruleDots)) return 0;
  ------------------
  |  Branch (2697:6): [True: 0, False: 155]
  ------------------
 2698|    155|	if (ruleChars.length != 1) {
  ------------------
  |  Branch (2698:6): [True: 0, False: 155]
  ------------------
 2699|      0|		compileError(file, "Exactly one character is required.");
 2700|      0|		return 0;
 2701|      0|	}
 2702|    155|	if (ruleDots.length < 1) {
  ------------------
  |  Branch (2702:6): [True: 0, False: 155]
  ------------------
 2703|      0|		compileError(file, "At least one cell is required.");
 2704|      0|		return 0;
 2705|      0|	}
 2706|    155|	if (table) {
  ------------------
  |  Branch (2706:6): [True: 155, False: 0]
  ------------------
 2707|    155|		TranslationTableCharacter *character;
 2708|    155|		TranslationTableCharacter *cell = NULL;
 2709|    155|		int k;
 2710|    155|		if (attributes & (CTC_UpperCase | CTC_LowerCase)) attributes |= CTC_Letter;
  ------------------
  |  Branch (2710:7): [True: 3, False: 152]
  ------------------
 2711|    155|		character = putChar(file, ruleChars.chars[0], table, NULL, (*table)->ruleCounter);
 2712|    155|		character->attributes |= attributes;
 2713|    310|		for (k = ruleDots.length - 1; k >= 0; k -= 1) {
  ------------------
  |  Branch (2713:33): [True: 155, False: 155]
  ------------------
 2714|    155|			cell = getDots(ruleDots.chars[k], *table);
 2715|    155|			if (!cell)
  ------------------
  |  Branch (2715:8): [True: 145, False: 10]
  ------------------
 2716|    145|				cell = putDots(file, ruleDots.chars[k], table, (*table)->ruleCounter);
 2717|    155|		}
 2718|    155|		if (ruleDots.length == 1) cell->attributes |= attributes;
  ------------------
  |  Branch (2718:7): [True: 155, False: 0]
  ------------------
 2719|    155|	}
 2720|    155|	if (displayTable && ruleDots.length == 1)
  ------------------
  |  Branch (2720:6): [True: 155, False: 0]
  |  Branch (2720:22): [True: 155, False: 0]
  ------------------
 2721|    155|		putCharDotsMapping(file, ruleChars.chars[0], ruleDots.chars[0], displayTable);
 2722|    155|	if (table)
  ------------------
  |  Branch (2722:6): [True: 155, False: 0]
  ------------------
 2723|    155|		if (!addRule(file, opcode, &ruleChars, &ruleDots, 0, 0, NULL, NULL, noback, nofor,
  ------------------
  |  Branch (2723:7): [True: 0, False: 155]
  ------------------
 2724|    155|					table))
 2725|      0|			return 0;
 2726|    155|	return 1;
 2727|    155|}
compileTranslationTable.c:putDots:
  594|    362|putDots(const FileInfo *file, widechar d, TranslationTableHeader **table, int ruleIndex) {
  595|       |	/* See if a dot pattern is in the appropriate table. If not, insert it. In either
  596|       |	 * case, return a pointer to it. */
  597|    362|	TranslationTableCharacter *character;
  598|    362|	TranslationTableOffset offset;
  599|    362|	if ((character = getDots(d, *table))) return character;
  ------------------
  |  Branch (599:6): [True: 179, False: 183]
  ------------------
  600|    183|	if (!allocateSpaceInTranslationTable(file, &offset, sizeof(*character), table))
  ------------------
  |  Branch (600:6): [True: 0, False: 183]
  ------------------
  601|      0|		return NULL;
  602|    183|	character = (TranslationTableCharacter *)&(*table)->ruleArea[offset];
  603|    183|	memset(character, 0, sizeof(*character));
  604|    183|	character->sourceFile = file->sourceFile;
  605|    183|	character->sourceLine = file->lineNumber;
  606|    183|	character->ruleIndex = ruleIndex;
  607|    183|	character->value = d;
  608|    183|	const unsigned long int charHash = _lou_charHash(d);
  609|    183|	const TranslationTableOffset bucket = (*table)->dots[charHash];
  610|    183|	if (!bucket)
  ------------------
  |  Branch (610:6): [True: 183, False: 0]
  ------------------
  611|    183|		(*table)->dots[charHash] = offset;
  612|      0|	else {
  613|      0|		TranslationTableCharacter *oldchar =
  614|      0|				(TranslationTableCharacter *)&(*table)->ruleArea[bucket];
  615|      0|		while (oldchar->next)
  ------------------
  |  Branch (615:10): [True: 0, False: 0]
  ------------------
  616|      0|			oldchar = (TranslationTableCharacter *)&(*table)->ruleArea[oldchar->next];
  617|      0|		oldchar->next = offset;
  618|      0|	}
  619|    183|	return character;
  620|    183|}
compileTranslationTable.c:addRuleName:
 1577|     12|		TranslationTableHeader *table) {
 1578|     12|	int k;
 1579|     12|	RuleName *ruleName;
 1580|     12|	if (!(ruleName = malloc(sizeof(*ruleName) + CHARSIZE * (name->length - 1)))) {
  ------------------
  |  |   68|     12|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1580:6): [True: 0, False: 12]
  ------------------
 1581|      0|		compileError(file, "not enough memory");
 1582|      0|		_lou_outOfMemory();
 1583|      0|	}
 1584|     12|	memset(ruleName, 0, sizeof(*ruleName));
 1585|       |	// a name is a sequence of characters in the ranges 'a'..'z' and 'A'..'Z'
 1586|     40|	for (k = 0; k < name->length; k++) {
  ------------------
  |  Branch (1586:14): [True: 28, False: 12]
  ------------------
 1587|     28|		widechar c = name->chars[k];
 1588|     28|		if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
  ------------------
  |  Branch (1588:8): [True: 28, False: 0]
  |  Branch (1588:20): [True: 28, False: 0]
  |  Branch (1588:34): [True: 0, False: 0]
  |  Branch (1588:46): [True: 0, False: 0]
  ------------------
 1589|     28|			ruleName->name[k] = c;
 1590|      0|		else {
 1591|      0|			compileError(file, "a name may contain only letters");
 1592|      0|			free(ruleName);
 1593|      0|			return 0;
 1594|      0|		}
 1595|     28|	}
 1596|     12|	ruleName->length = name->length;
 1597|     12|	ruleName->ruleOffset = ruleOffset;
 1598|     12|	ruleName->next = table->ruleNames;
 1599|     12|	table->ruleNames = ruleName;
 1600|     12|	return 1;
 1601|     12|}
compileTranslationTable.c:getRuleCharsText:
 1534|    316|getRuleCharsText(FileInfo *file, CharsString *ruleChars) {
 1535|    316|	CharsString token;
 1536|    316|	if (!getToken(file, &token, "Characters operand")) return 0;
  ------------------
  |  Branch (1536:6): [True: 0, False: 316]
  ------------------
 1537|    316|	return parseChars(file, ruleChars, &token);
 1538|    316|}
compileTranslationTable.c:getRuleDotsPattern:
 1548|    202|getRuleDotsPattern(FileInfo *file, CharsString *ruleDots) {
 1549|       |	/* Interpret the dets operand */
 1550|    202|	CharsString token;
 1551|    202|	if (!getToken(file, &token, "Dots operand")) return 0;
  ------------------
  |  Branch (1551:6): [True: 1, False: 201]
  ------------------
 1552|    201|	if (token.length == 1 && token.chars[0] == '=') {
  ------------------
  |  Branch (1552:6): [True: 43, False: 158]
  |  Branch (1552:27): [True: 0, False: 43]
  ------------------
 1553|      0|		ruleDots->length = 0;
 1554|      0|		return 1;
 1555|      0|	} else
 1556|    201|		return parseDots(file, ruleDots, &token);
 1557|    201|}
compileTranslationTable.c:putCharDotsMapping:
  668|    155|		const FileInfo *file, widechar c, widechar d, DisplayTableHeader **table) {
  669|    155|	if (!getDotsForChar(c, *table)) {
  ------------------
  |  Branch (669:6): [True: 151, False: 4]
  ------------------
  670|    151|		CharDotsMapping *cdPtr;
  671|    151|		TranslationTableOffset offset;
  672|    151|		if (!allocateSpaceInDisplayTable(file, &offset, sizeof(*cdPtr), table)) return 0;
  ------------------
  |  Branch (672:7): [True: 0, False: 151]
  ------------------
  673|    151|		cdPtr = (CharDotsMapping *)&(*table)->ruleArea[offset];
  674|    151|		cdPtr->next = 0;
  675|    151|		cdPtr->lookFor = c;
  676|    151|		cdPtr->found = d;
  677|    151|		const unsigned long int charHash = _lou_charHash(c);
  678|    151|		const TranslationTableOffset bucket = (*table)->charToDots[charHash];
  679|    151|		if (!bucket)
  ------------------
  |  Branch (679:7): [True: 150, False: 1]
  ------------------
  680|    150|			(*table)->charToDots[charHash] = offset;
  681|      1|		else {
  682|      1|			CharDotsMapping *oldcdPtr = (CharDotsMapping *)&(*table)->ruleArea[bucket];
  683|      1|			while (oldcdPtr->next)
  ------------------
  |  Branch (683:11): [True: 0, False: 1]
  ------------------
  684|      0|				oldcdPtr = (CharDotsMapping *)&(*table)->ruleArea[oldcdPtr->next];
  685|      1|			oldcdPtr->next = offset;
  686|      1|		}
  687|    151|	}
  688|    155|	if (!getCharForDots(d, *table)) {
  ------------------
  |  Branch (688:6): [True: 151, False: 4]
  ------------------
  689|    151|		CharDotsMapping *cdPtr;
  690|    151|		TranslationTableOffset offset;
  691|    151|		if (!allocateSpaceInDisplayTable(file, &offset, sizeof(*cdPtr), table)) return 0;
  ------------------
  |  Branch (691:7): [True: 0, False: 151]
  ------------------
  692|    151|		cdPtr = (CharDotsMapping *)&(*table)->ruleArea[offset];
  693|    151|		cdPtr->next = 0;
  694|    151|		cdPtr->lookFor = d;
  695|    151|		cdPtr->found = c;
  696|    151|		const unsigned long int charHash = _lou_charHash(d);
  697|    151|		const TranslationTableOffset bucket = (*table)->dotsToChar[charHash];
  698|    151|		if (!bucket)
  ------------------
  |  Branch (698:7): [True: 151, False: 0]
  ------------------
  699|    151|			(*table)->dotsToChar[charHash] = offset;
  700|      0|		else {
  701|      0|			CharDotsMapping *oldcdPtr = (CharDotsMapping *)&(*table)->ruleArea[bucket];
  702|      0|			while (oldcdPtr->next)
  ------------------
  |  Branch (702:11): [True: 0, False: 0]
  ------------------
  703|      0|				oldcdPtr = (CharDotsMapping *)&(*table)->ruleArea[oldcdPtr->next];
  704|      0|			oldcdPtr->next = offset;
  705|      0|		}
  706|    151|	}
  707|    155|	return 1;
  708|    155|}
compileTranslationTable.c:allocateSpaceInDisplayTable:
  460|    302|		int size, DisplayTableHeader **table) {
  461|       |	/* allocate memory for table and expand previously allocated memory if necessary */
  462|    302|	int spaceNeeded = ((size + OFFSETSIZE - 1) / OFFSETSIZE) * OFFSETSIZE;
  ------------------
  |  |   93|    302|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
              	int spaceNeeded = ((size + OFFSETSIZE - 1) / OFFSETSIZE) * OFFSETSIZE;
  ------------------
  |  |   93|    302|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
              	int spaceNeeded = ((size + OFFSETSIZE - 1) / OFFSETSIZE) * OFFSETSIZE;
  ------------------
  |  |   93|    302|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  463|    302|	TranslationTableOffset newTableSize = (*table)->bytesUsed + spaceNeeded;
  464|    302|	TranslationTableOffset tableSize = (*table)->tableSize;
  465|    302|	if (newTableSize > tableSize) {
  ------------------
  |  Branch (465:6): [True: 0, False: 302]
  ------------------
  466|      0|		DisplayTableHeader *newTable;
  467|      0|		newTableSize += (newTableSize / OFFSETSIZE);
  ------------------
  |  |   93|      0|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  468|      0|		newTable = realloc(*table, newTableSize);
  469|      0|		if (!newTable) {
  ------------------
  |  Branch (469:7): [True: 0, False: 0]
  ------------------
  470|      0|			compileError(file, "Not enough memory for display table.");
  471|      0|			_lou_outOfMemory();
  472|      0|		}
  473|      0|		memset(((unsigned char *)newTable) + tableSize, 0, newTableSize - tableSize);
  474|       |		/* update references to the old table */
  475|      0|		{
  476|      0|			DisplayTableChainEntry *entry;
  477|      0|			for (entry = displayTableChain; entry != NULL; entry = entry->next)
  ------------------
  |  Branch (477:36): [True: 0, False: 0]
  ------------------
  478|      0|				if (entry->table == *table) entry->table = (DisplayTableHeader *)newTable;
  ------------------
  |  Branch (478:9): [True: 0, False: 0]
  ------------------
  479|      0|		}
  480|      0|		newTable->tableSize = newTableSize;
  481|      0|		*table = newTable;
  482|      0|	}
  483|    302|	if (offset != NULL) {
  ------------------
  |  Branch (483:6): [True: 302, False: 0]
  ------------------
  484|    302|		*offset = ((*table)->bytesUsed - sizeof(**table)) / OFFSETSIZE;
  ------------------
  |  |   93|    302|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  485|    302|		(*table)->bytesUsed += spaceNeeded;
  486|    302|	}
  487|    302|	return 1;
  488|    302|}
compileTranslationTable.c:compileBrailleIndicator:
 2374|     19|		TranslationTableHeader **table) {
 2375|     19|	CharsString token;
 2376|     19|	CharsString cells;
 2377|     19|	if (!getToken(file, &token, ermsg)) return 0;
  ------------------
  |  Branch (2377:6): [True: 0, False: 19]
  ------------------
 2378|     19|	if (!parseDots(file, &cells, &token)) return 0;
  ------------------
  |  Branch (2378:6): [True: 0, False: 19]
  ------------------
 2379|     19|	return addRule(
 2380|     19|			file, opcode, NULL, &cells, 0, 0, ruleOffset, NULL, noback, nofor, table);
 2381|     19|}
compileTranslationTable.c:getMatchPatternCharacters:
 1526|     20|getMatchPatternCharacters(FileInfo *file, CharsString *characters) {
 1527|       |	/* Get match pattern string */
 1528|     20|	CharsString token;
 1529|     20|	if (!getToken(file, &token, "characters")) return 0;
  ------------------
  |  Branch (1529:6): [True: 1, False: 19]
  ------------------
 1530|     19|	return parseMatchPatternChars(file, characters, &token);
 1531|     20|}
compileTranslationTable.c:parseMatchPatternChars:
 1376|     19|parseMatchPatternChars(const FileInfo *file, CharsString *result, CharsString *token) {
 1377|       |	return parseCharsInternal(file, result, token, true);
 1378|     19|}
compileTranslationTable.c:addRule:
 1005|    420|		TranslationTableHeader **table) {
 1006|       |	/* Add a rule to the table, using the hash function to find the start of
 1007|       |	 * chains and chaining both the chars and dots strings */
 1008|    420|	TranslationTableOffset offset;
 1009|    420|	int ruleSize = sizeof(TranslationTableRule) - (DEFAULTRULESIZE * CHARSIZE);
  ------------------
  |  |   69|    420|#define DEFAULTRULESIZE 50
  ------------------
              	int ruleSize = sizeof(TranslationTableRule) - (DEFAULTRULESIZE * CHARSIZE);
  ------------------
  |  |   68|    420|#define CHARSIZE sizeof(widechar)
  ------------------
 1010|    420|	if (ruleChars) ruleSize += CHARSIZE * ruleChars->length;
  ------------------
  |  |   68|    401|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1010:6): [True: 401, False: 19]
  ------------------
 1011|    420|	if (ruleDots) ruleSize += CHARSIZE * ruleDots->length;
  ------------------
  |  |   68|    417|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1011:6): [True: 417, False: 3]
  ------------------
 1012|    420|	if (!allocateSpaceInTranslationTable(file, &offset, ruleSize, table)) return 0;
  ------------------
  |  Branch (1012:6): [True: 0, False: 420]
  ------------------
 1013|    420|	TranslationTableRule *r = (TranslationTableRule *)&(*table)->ruleArea[offset];
 1014|    420|	if (rule) *rule = r;
  ------------------
  |  Branch (1014:6): [True: 47, False: 373]
  ------------------
 1015|    420|	if (ruleOffset) *ruleOffset = offset;
  ------------------
  |  Branch (1015:6): [True: 41, False: 379]
  ------------------
 1016|    420|	r->sourceFile = file->sourceFile;
 1017|    420|	r->sourceLine = file->lineNumber;
 1018|    420|	r->index = (*table)->ruleCounter++;
 1019|    420|	r->opcode = opcode;
 1020|    420|	r->after = after;
 1021|    420|	r->before = before;
 1022|    420|	r->nocross = 0;
 1023|    420|	if (ruleChars)
  ------------------
  |  Branch (1023:6): [True: 401, False: 19]
  ------------------
 1024|    401|		memcpy(&r->charsdots[0], &ruleChars->chars[0],
 1025|    401|				CHARSIZE * (r->charslen = ruleChars->length));
  ------------------
  |  |   68|    401|#define CHARSIZE sizeof(widechar)
  ------------------
 1026|     19|	else
 1027|     19|		r->charslen = 0;
 1028|    420|	if (ruleDots)
  ------------------
  |  Branch (1028:6): [True: 417, False: 3]
  ------------------
 1029|    417|		memcpy(&r->charsdots[r->charslen], &ruleDots->chars[0],
 1030|    417|				CHARSIZE * (r->dotslen = ruleDots->length));
  ------------------
  |  |   68|    417|#define CHARSIZE sizeof(widechar)
  ------------------
 1031|      3|	else
 1032|      3|		r->dotslen = 0;
 1033|       |
 1034|       |	/* link new rule into table. */
 1035|    420|	if (opcode == CTO_SwapCc || opcode == CTO_SwapCd || opcode == CTO_SwapDd) return 1;
  ------------------
  |  Branch (1035:6): [True: 5, False: 415]
  |  Branch (1035:30): [True: 7, False: 408]
  |  Branch (1035:54): [True: 0, False: 408]
  ------------------
 1036|    408|	if (opcode >= CTO_Context && opcode <= CTO_Pass4)
  ------------------
  |  Branch (1036:6): [True: 176, False: 232]
  |  Branch (1036:31): [True: 124, False: 52]
  ------------------
 1037|    124|		if (!(opcode == CTO_Context && r->charslen > 0)) {
  ------------------
  |  Branch (1037:9): [True: 21, False: 103]
  |  Branch (1037:34): [True: 1, False: 20]
  ------------------
 1038|    123|			if (!nofor)
  ------------------
  |  Branch (1038:8): [True: 0, False: 123]
  ------------------
 1039|      0|				if (!addForwardPassRule(offset, r, *table)) return 0;
  ------------------
  |  Branch (1039:9): [True: 0, False: 0]
  ------------------
 1040|    123|			if (!noback)
  ------------------
  |  Branch (1040:8): [True: 123, False: 0]
  ------------------
 1041|    123|				if (!addBackwardPassRule(offset, r, *table)) return 0;
  ------------------
  |  Branch (1041:9): [True: 0, False: 123]
  ------------------
 1042|    123|			return 1;
 1043|    123|		}
 1044|    285|	if (!nofor) {
  ------------------
  |  Branch (1044:6): [True: 274, False: 11]
  ------------------
 1045|    274|		if (r->charslen == 1)
  ------------------
  |  Branch (1045:7): [True: 176, False: 98]
  ------------------
 1046|    176|			addForwardRuleWithSingleChar(file, offset, &r, table);
 1047|     98|		else if (r->charslen > 1)
  ------------------
  |  Branch (1047:12): [True: 80, False: 18]
  ------------------
 1048|     80|			addForwardRuleWithMultipleChars(offset, r, *table);
 1049|    274|	}
 1050|    285|	if (!noback) {
  ------------------
  |  Branch (1050:6): [True: 284, False: 1]
  ------------------
 1051|    284|		widechar *cells;
 1052|    284|		int dotslen;
 1053|       |
 1054|    284|		if (r->opcode == CTO_Context) {
  ------------------
  |  Branch (1054:7): [True: 1, False: 283]
  ------------------
 1055|      1|			cells = &r->charsdots[0];
 1056|      1|			dotslen = r->charslen;
 1057|    283|		} else {
 1058|    283|			cells = &r->charsdots[r->charslen];
 1059|    283|			dotslen = r->dotslen;
 1060|    283|		}
 1061|    284|		if (dotslen == 1) {
  ------------------
  |  Branch (1061:7): [True: 217, False: 67]
  ------------------
 1062|    217|			addBackwardRuleWithSingleCell(file, *cells, offset, &r, table);
 1063|    217|		} else if (dotslen > 1)
  ------------------
  |  Branch (1063:14): [True: 62, False: 5]
  ------------------
 1064|     62|			addBackwardRuleWithMultipleCells(cells, dotslen, offset, r, *table);
 1065|    284|	}
 1066|    285|	return 1;
 1067|    408|}
compileTranslationTable.c:addBackwardPassRule:
  969|    123|		TranslationTableHeader *table) {
  970|    123|	TranslationTableOffset *backPassRule;
  971|    123|	switch (rule->opcode) {
  972|     25|	case CTO_Correct:
  ------------------
  |  Branch (972:2): [True: 25, False: 98]
  ------------------
  973|     25|		backPassRule = &table->backPassRules[0];
  974|     25|		break;
  975|     20|	case CTO_Context:
  ------------------
  |  Branch (975:2): [True: 20, False: 103]
  ------------------
  976|     20|		backPassRule = &table->backPassRules[1];
  977|     20|		break;
  978|     14|	case CTO_Pass2:
  ------------------
  |  Branch (978:2): [True: 14, False: 109]
  ------------------
  979|     14|		backPassRule = &table->backPassRules[2];
  980|     14|		break;
  981|     27|	case CTO_Pass3:
  ------------------
  |  Branch (981:2): [True: 27, False: 96]
  ------------------
  982|     27|		backPassRule = &table->backPassRules[3];
  983|     27|		break;
  984|     37|	case CTO_Pass4:
  ------------------
  |  Branch (984:2): [True: 37, False: 86]
  ------------------
  985|     37|		backPassRule = &table->backPassRules[4];
  986|     37|		break;
  987|      0|	default:
  ------------------
  |  Branch (987:2): [True: 0, False: 123]
  ------------------
  988|      0|		return 0;
  989|    123|	}
  990|    133|	while (*backPassRule) {
  ------------------
  |  Branch (990:9): [True: 10, False: 123]
  ------------------
  991|     10|		TranslationTableRule *r = (TranslationTableRule *)&table->ruleArea[*backPassRule];
  992|     10|		if (rule->charslen > r->charslen) break;
  ------------------
  |  Branch (992:7): [True: 0, False: 10]
  ------------------
  993|     10|		backPassRule = &r->dotsnext;
  994|     10|	}
  995|    123|	rule->dotsnext = *backPassRule;
  996|    123|	*backPassRule = ruleOffset;
  997|    123|	return 1;
  998|    123|}
compileTranslationTable.c:addForwardRuleWithSingleChar:
  816|    176|		TranslationTableRule **rule, TranslationTableHeader **table) {
  817|       |	/* direction = 0, rule->charslen = 1 */
  818|    176|	TranslationTableCharacter *character;
  819|       |	// get the character from the table, or if the character is not defined yet, define it
  820|       |	// (without adding attributes)
  821|    176|	character = putChar(file, (*rule)->charsdots[0], table, NULL, (*rule)->index);
  822|       |	// putChar may have moved table, so make sure rule is still valid
  823|    176|	*rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
  824|    176|	if ((*rule)->opcode == CTO_CompDots || (*rule)->opcode == CTO_Comp6) {
  ------------------
  |  Branch (824:6): [True: 0, False: 176]
  |  Branch (824:41): [True: 0, False: 176]
  ------------------
  825|      0|		character->compRule = ruleOffset;
  826|      0|		return;
  827|    176|	} else {
  828|       |		// if the new rule is a character definition rule, set the main definition rule of
  829|       |		// this character to it, but don't override existing character definitions rules
  830|       |		// or base rules
  831|       |		// adding the attributes to the character has already been done elsewhere
  832|    176|		if ((*rule)->opcode >= CTO_Space && (*rule)->opcode < CTO_UpLow) {
  ------------------
  |  Branch (832:7): [True: 176, False: 0]
  |  Branch (832:39): [True: 153, False: 23]
  ------------------
  833|    153|			if (character->definitionRule) {
  ------------------
  |  Branch (833:8): [True: 4, False: 149]
  ------------------
  834|      4|				TranslationTableRule *prevRule =
  835|      4|						(TranslationTableRule *)&(*table)
  836|      4|								->ruleArea[character->definitionRule];
  837|      4|				char *prevOpcodeName = strdup(_lou_findOpcodeName(prevRule->opcode));
  838|      4|				char *newOpcodeName = strdup(_lou_findOpcodeName((*rule)->opcode));
  839|      4|				_lou_logMessage(LOU_LOG_DEBUG,
  840|      4|						"%s:%d: Character already defined (%s). The existing %s rule "
  841|      4|						"will take precedence over the new %s rule.",
  842|      4|						file->fileName, file->lineNumber,
  843|      4|						printSource(file->sourceFile, prevRule->sourceFile,
  844|      4|								prevRule->sourceLine),
  845|      4|						prevOpcodeName, newOpcodeName);
  846|      4|				free(prevOpcodeName);
  847|      4|				free(newOpcodeName);
  848|    149|			} else {
  849|    149|				character->definitionRule = ruleOffset;
  850|    149|			}
  851|    153|		}
  852|    176|	}
  853|       |	// add the new rule to the list of rules associated with this character
  854|       |	// if the new rule is a character definition rule, it is inserted at the end of the
  855|       |	// list, otherwise it is inserted before the first character definition rule
  856|       |	// in other words, rules are considered in the order in which they are defined in the
  857|       |	// table
  858|    176|	TranslationTableOffset *otherRule = &character->otherRules;
  859|    187|	while (*otherRule) {
  ------------------
  |  Branch (859:9): [True: 11, False: 176]
  ------------------
  860|     11|		TranslationTableRule *r = (TranslationTableRule *)&(*table)->ruleArea[*otherRule];
  861|     11|		if (r->charslen == 0) break;
  ------------------
  |  Branch (861:7): [True: 0, False: 11]
  ------------------
  862|     11|		if (r->opcode >= CTO_Space && r->opcode < CTO_UpLow)
  ------------------
  |  Branch (862:7): [True: 11, False: 0]
  |  Branch (862:33): [True: 7, False: 4]
  ------------------
  863|      7|			if (!((*rule)->opcode >= CTO_Space && (*rule)->opcode < CTO_UpLow)) break;
  ------------------
  |  Branch (863:10): [True: 7, False: 0]
  |  Branch (863:42): [True: 7, False: 0]
  ------------------
  864|     11|		otherRule = &r->charsnext;
  865|     11|	}
  866|    176|	(*rule)->charsnext = *otherRule;
  867|    176|	*otherRule = ruleOffset;
  868|    176|}
compileTranslationTable.c:addForwardRuleWithMultipleChars:
  872|     80|		TranslationTableRule *rule, TranslationTableHeader *table) {
  873|       |	/* direction = 0 rule->charslen > 1 */
  874|     80|	TranslationTableOffset *forRule =
  875|     80|			&table->forRules[_lou_stringHash(&rule->charsdots[0], 0, NULL)];
  876|    130|	while (*forRule) {
  ------------------
  |  Branch (876:9): [True: 57, False: 73]
  ------------------
  877|     57|		TranslationTableRule *r = (TranslationTableRule *)&table->ruleArea[*forRule];
  878|     57|		if (rule->charslen > r->charslen) break;
  ------------------
  |  Branch (878:7): [True: 2, False: 55]
  ------------------
  879|     55|		if (rule->charslen == r->charslen)
  ------------------
  |  Branch (879:7): [True: 51, False: 4]
  ------------------
  880|     51|			if ((r->opcode == CTO_Always) && (rule->opcode != CTO_Always)) break;
  ------------------
  |  Branch (880:8): [True: 22, False: 29]
  |  Branch (880:37): [True: 5, False: 17]
  ------------------
  881|     50|		forRule = &r->charsnext;
  882|     50|	}
  883|     80|	rule->charsnext = *forRule;
  884|     80|	*forRule = ruleOffset;
  885|     80|}
compileTranslationTable.c:addBackwardRuleWithSingleCell:
  890|    217|		TranslationTableHeader **table) {
  891|       |	/* direction = 1, rule->dotslen = 1 */
  892|    217|	TranslationTableCharacter *dots;
  893|    217|	if ((*rule)->opcode == CTO_SwapCc || (*rule)->opcode == CTO_Repeated)
  ------------------
  |  Branch (893:6): [True: 0, False: 217]
  |  Branch (893:39): [True: 0, False: 217]
  ------------------
  894|      0|		return; /* too ambiguous */
  895|       |	// get the cell from the table, or if the cell is not defined yet, define it (without
  896|       |	// adding attributes)
  897|    217|	dots = putDots(file, cell, table, (*rule)->index);
  898|       |	// putDots may have moved table, so make sure rule is still valid
  899|    217|	*rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
  900|    217|	if ((*rule)->opcode >= CTO_Space && (*rule)->opcode < CTO_UpLow)
  ------------------
  |  Branch (900:6): [True: 200, False: 17]
  |  Branch (900:38): [True: 153, False: 47]
  ------------------
  901|    153|		dots->definitionRule = ruleOffset;
  902|    217|	TranslationTableOffset *otherRule = &dots->otherRules;
  903|    267|	while (*otherRule) {
  ------------------
  |  Branch (903:9): [True: 61, False: 206]
  ------------------
  904|     61|		TranslationTableRule *r = (TranslationTableRule *)&(*table)->ruleArea[*otherRule];
  905|     61|		if ((*rule)->charslen > r->charslen || r->dotslen == 0) break;
  ------------------
  |  Branch (905:7): [True: 9, False: 52]
  |  Branch (905:42): [True: 0, False: 52]
  ------------------
  906|     52|		if (r->opcode >= CTO_Space && r->opcode < CTO_UpLow)
  ------------------
  |  Branch (906:7): [True: 47, False: 5]
  |  Branch (906:33): [True: 6, False: 41]
  ------------------
  907|      6|			if (!((*rule)->opcode >= CTO_Space && (*rule)->opcode < CTO_UpLow)) break;
  ------------------
  |  Branch (907:10): [True: 5, False: 1]
  |  Branch (907:42): [True: 4, False: 1]
  ------------------
  908|     50|		otherRule = &r->dotsnext;
  909|     50|	}
  910|    217|	(*rule)->dotsnext = *otherRule;
  911|    217|	*otherRule = ruleOffset;
  912|    217|}
compileTranslationTable.c:addBackwardRuleWithMultipleCells:
  917|     62|		TranslationTableHeader *table) {
  918|       |	/* direction = 1, dotslen > 1 */
  919|     62|	TranslationTableOffset *backRule = &table->backRules[_lou_stringHash(cells, 0, NULL)];
  920|     62|	if (rule->opcode == CTO_SwapCc) return;
  ------------------
  |  Branch (920:6): [True: 0, False: 62]
  ------------------
  921|     62|	int ruleLength = dotslen + rule->charslen;
  922|    118|	while (*backRule) {
  ------------------
  |  Branch (922:9): [True: 68, False: 50]
  ------------------
  923|     68|		TranslationTableRule *r = (TranslationTableRule *)&table->ruleArea[*backRule];
  924|     68|		int rLength = r->dotslen + r->charslen;
  925|     68|		if (ruleLength > rLength) break;
  ------------------
  |  Branch (925:7): [True: 8, False: 60]
  ------------------
  926|     60|		if (rLength == ruleLength)
  ------------------
  |  Branch (926:7): [True: 53, False: 7]
  ------------------
  927|     53|			if ((r->opcode == CTO_Always) && (rule->opcode != CTO_Always)) break;
  ------------------
  |  Branch (927:8): [True: 29, False: 24]
  |  Branch (927:37): [True: 4, False: 25]
  ------------------
  928|     56|		backRule = &r->dotsnext;
  929|     56|	}
  930|     62|	rule->dotsnext = *backRule;
  931|     62|	*backRule = ruleOffset;
  932|     62|}
compileTranslationTable.c:allocateSpaceInTranslationTable:
  427|  3.49k|		int size, TranslationTableHeader **table) {
  428|       |	/* allocate memory for table and expand previously allocated memory if necessary */
  429|  3.49k|	int spaceNeeded = ((size + OFFSETSIZE - 1) / OFFSETSIZE) * OFFSETSIZE;
  ------------------
  |  |   93|  3.49k|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
              	int spaceNeeded = ((size + OFFSETSIZE - 1) / OFFSETSIZE) * OFFSETSIZE;
  ------------------
  |  |   93|  3.49k|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
              	int spaceNeeded = ((size + OFFSETSIZE - 1) / OFFSETSIZE) * OFFSETSIZE;
  ------------------
  |  |   93|  3.49k|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  430|  3.49k|	TranslationTableOffset newTableSize = (*table)->bytesUsed + spaceNeeded;
  431|  3.49k|	TranslationTableOffset tableSize = (*table)->tableSize;
  432|  3.49k|	if (newTableSize > tableSize) {
  ------------------
  |  Branch (432:6): [True: 16, False: 3.47k]
  ------------------
  433|     16|		TranslationTableHeader *newTable;
  434|     16|		newTableSize += (newTableSize / OFFSETSIZE);
  ------------------
  |  |   93|     16|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  435|     16|		newTable = realloc(*table, newTableSize);
  436|     16|		if (!newTable) {
  ------------------
  |  Branch (436:7): [True: 0, False: 16]
  ------------------
  437|      0|			compileError(file, "Not enough memory for translation table.");
  438|      0|			_lou_outOfMemory();
  439|      0|		}
  440|     16|		memset(((unsigned char *)newTable) + tableSize, 0, newTableSize - tableSize);
  441|       |		/* update references to the old table */
  442|     16|		{
  443|     16|			TranslationTableChainEntry *entry;
  444|     16|			for (entry = translationTableChain; entry != NULL; entry = entry->next)
  ------------------
  |  Branch (444:40): [True: 0, False: 16]
  ------------------
  445|      0|				if (entry->table == *table)
  ------------------
  |  Branch (445:9): [True: 0, False: 0]
  ------------------
  446|      0|					entry->table = (TranslationTableHeader *)newTable;
  447|     16|		}
  448|     16|		newTable->tableSize = newTableSize;
  449|     16|		*table = newTable;
  450|     16|	}
  451|  3.49k|	if (offset != NULL) {
  ------------------
  |  Branch (451:6): [True: 3.47k, False: 16]
  ------------------
  452|  3.47k|		*offset = ((*table)->bytesUsed - sizeof(**table)) / OFFSETSIZE;
  ------------------
  |  |   93|  3.47k|#define OFFSETSIZE sizeof(TranslationTableData)
  ------------------
  453|  3.47k|		(*table)->bytesUsed += spaceNeeded;
  454|  3.47k|	}
  455|  3.49k|	return 1;
  456|  3.49k|}
compileTranslationTable.c:allocateCharacterClasses:
 1165|      4|allocateCharacterClasses(TranslationTableHeader *table) {
 1166|       |	/* Allocate memory for predefined character classes */
 1167|      4|	int k = 0;
 1168|      4|	table->characterClasses = NULL;
 1169|      4|	table->nextCharacterClassAttribute = 1;	 // CTC_Space
 1170|      4|	table->nextNumberedCharacterClassAttribute = CTC_UserDefined1;
 1171|     40|	while (characterClassNames[k]) {
  ------------------
  |  Branch (1171:9): [True: 36, False: 4]
  ------------------
 1172|     36|		widechar wname[MAXSTRING];
 1173|     36|		int length = (int)strlen(characterClassNames[k]);
 1174|     36|		int kk;
 1175|    280|		for (kk = 0; kk < length; kk++) wname[kk] = (widechar)characterClassNames[k][kk];
  ------------------
  |  Branch (1175:16): [True: 244, False: 36]
  ------------------
 1176|     36|		if (!addCharacterClass(NULL, wname, length, table, 0)) {
  ------------------
  |  Branch (1176:7): [True: 0, False: 36]
  ------------------
 1177|      0|			deallocateCharacterClasses(table);
 1178|      0|			return 0;
 1179|      0|		}
 1180|     36|		k++;
 1181|     36|	}
 1182|      4|	return 1;
 1183|      4|}
compileTranslationTable.c:deallocateCharacterClasses:
 1155|      4|deallocateCharacterClasses(TranslationTableHeader *table) {
 1156|      4|	CharacterClass **classes = &table->characterClasses;
 1157|     43|	while (*classes) {
  ------------------
  |  Branch (1157:9): [True: 39, False: 4]
  ------------------
 1158|     39|		CharacterClass *class = *classes;
 1159|     39|		*classes = (*classes)->next;
 1160|     39|		if (class) free(class);
  ------------------
  |  Branch (1160:7): [True: 39, False: 0]
  ------------------
 1161|     39|	}
 1162|      4|}
compileTranslationTable.c:findCharacterClass:
 1070|     46|findCharacterClass(const CharsString *name, const TranslationTableHeader *table) {
 1071|       |	/* Find a character class, whether predefined or user-defined */
 1072|     46|	const CharacterClass *class = table->characterClasses;
 1073|    399|	while (class) {
  ------------------
  |  Branch (1073:9): [True: 373, False: 26]
  ------------------
 1074|    373|		if ((name->length == class->length) &&
  ------------------
  |  Branch (1074:7): [True: 29, False: 344]
  ------------------
 1075|     29|				(memcmp(&name->chars[0], class->name, CHARSIZE * name->length) == 0))
  ------------------
  |  |   68|     29|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1075:5): [True: 20, False: 9]
  ------------------
 1076|     20|			return class;
 1077|    353|		class = class->next;
 1078|    353|	}
 1079|     26|	return NULL;
 1080|     46|}
compileTranslationTable.c:addCharacterClass:
 1108|     39|		TranslationTableHeader *table, int validate) {
 1109|       |	/* Define a character class, Whether predefined or user-defined */
 1110|     39|	if (validate) {
  ------------------
  |  Branch (1110:6): [True: 3, False: 36]
  ------------------
 1111|     21|		for (int i = 0; i < length; i++) {
  ------------------
  |  Branch (1111:19): [True: 18, False: 3]
  ------------------
 1112|     18|			if (!((name[i] >= 'a' && name[i] <= 'z') ||
  ------------------
  |  Branch (1112:11): [True: 17, False: 1]
  |  Branch (1112:29): [True: 17, False: 0]
  ------------------
 1113|      1|						(name[i] >= 'A' && name[i] <= 'Z'))) {
  ------------------
  |  Branch (1113:8): [True: 1, False: 0]
  |  Branch (1113:26): [True: 1, False: 0]
  ------------------
 1114|      0|				compileError(file,
 1115|      0|						"Invalid attribute name: must be a digit between "
 1116|      0|						"0 and 7 or a word containing only letters");
 1117|      0|			}
 1118|     18|		}
 1119|       |		// check that name is not reserved
 1120|      3|		int k = 0;
 1121|     87|		while (reservedAttributeNames[k]) {
  ------------------
  |  Branch (1121:10): [True: 84, False: 3]
  ------------------
 1122|     84|			if (strlen(reservedAttributeNames[k]) == (size_t)length) {
  ------------------
  |  Branch (1122:8): [True: 1, False: 83]
  ------------------
 1123|      1|				int i;
 1124|      2|				for (i = 0; i < length; i++)
  ------------------
  |  Branch (1124:17): [True: 2, False: 0]
  ------------------
 1125|      2|					if (reservedAttributeNames[k][i] != name[i]) break;
  ------------------
  |  Branch (1125:10): [True: 1, False: 1]
  ------------------
 1126|      1|				if (i == length) {
  ------------------
  |  Branch (1126:9): [True: 0, False: 1]
  ------------------
 1127|      0|					compileError(file, "Attribute name is reserved: %s",
 1128|      0|							reservedAttributeNames[k]);
 1129|      0|					return NULL;
 1130|      0|				}
 1131|      1|			}
 1132|     84|			k++;
 1133|     84|		}
 1134|      3|	}
 1135|     39|	CharacterClass **classes = &table->characterClasses;
 1136|     39|	TranslationTableCharacterAttributes attribute = getNextAttribute(table);
 1137|     39|	CharacterClass *class;
 1138|     39|	if (attribute) {
  ------------------
  |  Branch (1138:6): [True: 39, False: 0]
  ------------------
 1139|     39|		if (!(class = malloc(sizeof(*class) + CHARSIZE * (length - 1))))
  ------------------
  |  |   68|     39|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1139:7): [True: 0, False: 39]
  ------------------
 1140|      0|			_lou_outOfMemory();
 1141|     39|		else {
 1142|     39|			memset(class, 0, sizeof(*class));
 1143|     39|			memcpy(class->name, name, CHARSIZE * (class->length = length));
  ------------------
  |  |   68|     39|#define CHARSIZE sizeof(widechar)
  ------------------
 1144|     39|			class->attribute = attribute;
 1145|     39|			class->next = *classes;
 1146|     39|			*classes = class;
 1147|     39|			return class;
 1148|     39|		}
 1149|     39|	}
 1150|      0|	compileError(file, "character class table overflow.");
 1151|       |	return NULL;
 1152|     39|}
compileTranslationTable.c:getNextAttribute:
 1093|     39|getNextAttribute(TranslationTableHeader *table) {
 1094|       |	/* Get the next attribute value, or 0 if there is no more space in the table. */
 1095|     39|	TranslationTableCharacterAttributes next = table->nextCharacterClassAttribute;
 1096|     39|	if (next) {
  ------------------
  |  Branch (1096:6): [True: 39, False: 0]
  ------------------
 1097|     39|		if (next == CTC_LitDigit)
  ------------------
  |  Branch (1097:7): [True: 4, False: 35]
  ------------------
 1098|      4|			table->nextCharacterClassAttribute = CTC_UserDefined9;
 1099|     35|		else
 1100|     35|			table->nextCharacterClassAttribute <<= 1;
 1101|     39|		return next;
 1102|     39|	} else
 1103|      0|		return getNextNumberedAttribute(table);
 1104|     39|}
compileTranslationTable.c:getChar:
  534|  3.70k|		TranslationTableOffset *characterOffset) {
  535|  3.70k|	const TranslationTableOffset bucket = table->characters[_lou_charHash(c)];
  536|  3.70k|	TranslationTableOffset offset = bucket;
  537|  3.71k|	while (offset) {
  ------------------
  |  Branch (537:9): [True: 3.12k, False: 596]
  ------------------
  538|  3.12k|		TranslationTableCharacter *character =
  539|  3.12k|				(TranslationTableCharacter *)&table->ruleArea[offset];
  540|  3.12k|		if (character->value == c) {
  ------------------
  |  Branch (540:7): [True: 3.10k, False: 14]
  ------------------
  541|  3.10k|			if (characterOffset) *characterOffset = offset;
  ------------------
  |  Branch (541:8): [True: 31, False: 3.07k]
  ------------------
  542|  3.10k|			return character;
  543|  3.10k|		}
  544|     14|		offset = character->next;
  545|     14|	}
  546|    596|	return NULL;
  547|  3.70k|}
compileTranslationTable.c:atEndOfLine:
  358|  26.9k|atEndOfLine(const FileInfo *file) {
  359|  26.9k|	return file->linepos >= file->linelen;
  360|  26.9k|}
compileTranslationTable.c:getRuleDotsText:
 1541|     54|getRuleDotsText(FileInfo *file, CharsString *ruleDots) {
 1542|     54|	CharsString token;
 1543|     54|	if (!getToken(file, &token, "characters")) return 0;
  ------------------
  |  Branch (1543:6): [True: 0, False: 54]
  ------------------
 1544|     54|	return parseChars(file, ruleDots, &token);
 1545|     54|}
compileTranslationTable.c:putChar:
  564|  3.70k|		TranslationTableOffset *characterOffset, int ruleIndex) {
  565|       |	/* See if a character is in the appropriate table. If not, insert it. In either case,
  566|       |	 * return a pointer to it. */
  567|  3.70k|	TranslationTableCharacter *character;
  568|  3.70k|	TranslationTableOffset offset;
  569|  3.70k|	if ((character = getChar(c, *table, characterOffset))) return character;
  ------------------
  |  Branch (569:6): [True: 3.10k, False: 596]
  ------------------
  570|    596|	if (!allocateSpaceInTranslationTable(file, &offset, sizeof(*character), table))
  ------------------
  |  Branch (570:6): [True: 0, False: 596]
  ------------------
  571|      0|		return NULL;
  572|    596|	character = (TranslationTableCharacter *)&(*table)->ruleArea[offset];
  573|    596|	memset(character, 0, sizeof(*character));
  574|    596|	character->sourceFile = file->sourceFile;
  575|    596|	character->sourceLine = file->lineNumber;
  576|    596|	character->ruleIndex = ruleIndex;
  577|    596|	character->value = c;
  578|    596|	const unsigned long int charHash = _lou_charHash(c);
  579|    596|	const TranslationTableOffset bucket = (*table)->characters[charHash];
  580|    596|	if (!bucket)
  ------------------
  |  Branch (580:6): [True: 594, False: 2]
  ------------------
  581|    594|		(*table)->characters[charHash] = offset;
  582|      2|	else {
  583|      2|		TranslationTableCharacter *oldchar =
  584|      2|				(TranslationTableCharacter *)&(*table)->ruleArea[bucket];
  585|      2|		while (oldchar->next)
  ------------------
  |  Branch (585:10): [True: 0, False: 2]
  ------------------
  586|      0|			oldchar = (TranslationTableCharacter *)&(*table)->ruleArea[oldchar->next];
  587|      2|		oldchar->next = offset;
  588|      2|	}
  589|    596|	if (characterOffset) *characterOffset = offset;
  ------------------
  |  Branch (589:6): [True: 5, False: 591]
  ------------------
  590|    596|	return character;
  591|    596|}
compileTranslationTable.c:compilePassOpcode:
 1897|    127|		int nofor, TranslationTableHeader **table) {
 1898|    127|	static CharsString passRuleChars;
 1899|    127|	static CharsString passRuleDots;
 1900|       |	/* Compile the operands of a pass opcode */
 1901|    127|	widechar passSubOp;
 1902|    127|	const CharacterClass *class;
 1903|    127|	TranslationTableRule *rule = NULL;
 1904|    127|	int k;
 1905|    127|	int kk = 0;
 1906|    127|	int endTest = 0;
 1907|    127|	widechar *passInstructions = passRuleDots.chars;
 1908|    127|	int passIC = 0; /* Instruction counter */
 1909|    127|	passRuleChars.length = 0;
 1910|    127|	CharsString passHoldString;
 1911|    127|	widechar passHoldNumber;
 1912|    127|	CharsString passLine;
 1913|    127|	int passLinepos = 0;
 1914|    127|	TranslationTableCharacterAttributes passAttributes;
 1915|    127|	int replacing = 0;
 1916|    127|	passHoldString.length = 0;
 1917|  20.1k|	for (k = file->linepos; k < file->linelen; k++)
  ------------------
  |  Branch (1917:26): [True: 20.0k, False: 127]
  ------------------
 1918|  20.0k|		passHoldString.chars[passHoldString.length++] = file->line[k];
 1919|    127|#define SEPCHAR 0x0001
 1920|       |	/* FIXME: The separation of the test and the action operand works by testing for a
 1921|       |	   space character. We can do this because the operands are not allowed to contain
 1922|       |	   spaces (as per the documentation). (We are doing this for consistency and
 1923|       |	   compatibility with louis-rs.) We are however not actually checking that the action
 1924|       |	   operand does not contain spaces. It is not trivial to implent because: We can not
 1925|       |	   simply check the remainder of `passHoldString` after the first space, since we need
 1926|       |	   to allow comments. We can also not simply adapt `passGetString`: it needs to handle
 1927|       |	   spaces as any escaped spaces (\s) have been expanded by `parseChars`. */
 1928|  1.26k|	for (k = 0; k < passHoldString.length && passHoldString.chars[k] > 32; k++);
  ------------------
  |  Branch (1928:14): [True: 1.26k, False: 0]
  |  Branch (1928:43): [True: 1.13k, False: 127]
  ------------------
 1929|    127|	if (k < passHoldString.length)
  ------------------
  |  Branch (1929:6): [True: 127, False: 0]
  ------------------
 1930|    127|		passHoldString.chars[k] = SEPCHAR;
  ------------------
  |  | 1919|    127|#define SEPCHAR 0x0001
  ------------------
 1931|      0|	else {
 1932|      0|		compileError(file, "Invalid multipass operands");
 1933|      0|		return 0;
 1934|      0|	}
 1935|    127|	parseChars(file, &passLine, &passHoldString);
 1936|       |	/* Compile test part */
 1937|  1.23k|	for (k = 0; k < passLine.length && passLine.chars[k] != SEPCHAR; k++);
  ------------------
  |  | 1919|  1.23k|#define SEPCHAR 0x0001
  ------------------
  |  Branch (1937:14): [True: 1.23k, False: 0]
  |  Branch (1937:37): [True: 1.10k, False: 127]
  ------------------
 1938|    127|	endTest = k;
 1939|    127|	passLine.chars[endTest] = pass_endTest;
 1940|    127|	passLinepos = 0;
 1941|    801|	while (passLinepos <= endTest) {
  ------------------
  |  Branch (1941:9): [True: 675, False: 126]
  ------------------
 1942|    675|		switch ((passSubOp = passLine.chars[passLinepos])) {
 1943|    325|		case pass_lookback:
  ------------------
  |  Branch (1943:3): [True: 325, False: 350]
  ------------------
 1944|    325|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_lookback))
  ------------------
  |  Branch (1944:8): [True: 0, False: 325]
  ------------------
 1945|      0|				return 0;
 1946|    325|			passLinepos++;
 1947|    325|			passGetNumber(&passLine, &passLinepos, &passHoldNumber);
 1948|    325|			if (passHoldNumber == 0) passHoldNumber = 1;
  ------------------
  |  Branch (1948:8): [True: 265, False: 60]
  ------------------
 1949|    325|			if (!appendInstructionChar(file, passInstructions, &passIC, passHoldNumber))
  ------------------
  |  Branch (1949:8): [True: 0, False: 325]
  ------------------
 1950|      0|				return 0;
 1951|    325|			break;
 1952|    325|		case pass_not:
  ------------------
  |  Branch (1952:3): [True: 40, False: 635]
  ------------------
 1953|     40|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_not))
  ------------------
  |  Branch (1953:8): [True: 0, False: 40]
  ------------------
 1954|      0|				return 0;
 1955|     40|			passLinepos++;
 1956|     40|			break;
 1957|     14|		case pass_first:
  ------------------
  |  Branch (1957:3): [True: 14, False: 661]
  ------------------
 1958|     14|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_first))
  ------------------
  |  Branch (1958:8): [True: 0, False: 14]
  ------------------
 1959|      0|				return 0;
 1960|     14|			passLinepos++;
 1961|     14|			break;
 1962|     15|		case pass_last:
  ------------------
  |  Branch (1962:3): [True: 15, False: 660]
  ------------------
 1963|     15|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_last))
  ------------------
  |  Branch (1963:8): [True: 0, False: 15]
  ------------------
 1964|      0|				return 0;
 1965|     15|			passLinepos++;
 1966|     15|			break;
 1967|      3|		case pass_search:
  ------------------
  |  Branch (1967:3): [True: 3, False: 672]
  ------------------
 1968|      3|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_search))
  ------------------
  |  Branch (1968:8): [True: 0, False: 3]
  ------------------
 1969|      0|				return 0;
 1970|      3|			passLinepos++;
 1971|      3|			break;
 1972|      0|		case pass_string:
  ------------------
  |  Branch (1972:3): [True: 0, False: 675]
  ------------------
 1973|      0|			if (!verifyStringOrDots(file, opcode, 1, 0, nofor)) {
  ------------------
  |  Branch (1973:8): [True: 0, False: 0]
  ------------------
 1974|      0|				return 0;
 1975|      0|			}
 1976|      0|			passLinepos++;
 1977|      0|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_string))
  ------------------
  |  Branch (1977:8): [True: 0, False: 0]
  ------------------
 1978|      0|				return 0;
 1979|      0|			passGetString(&passLine, &passLinepos, &passHoldString, file);
 1980|      0|			if (passHoldString.length == 0) {
  ------------------
  |  Branch (1980:8): [True: 0, False: 0]
  ------------------
 1981|      0|				compileError(file, "empty string in test part");
 1982|      0|				return 0;
 1983|      0|			}
 1984|      0|			goto testDoCharsDots;
 1985|     12|		case pass_dots:
  ------------------
  |  Branch (1985:3): [True: 12, False: 663]
  ------------------
 1986|     12|			if (!verifyStringOrDots(file, opcode, 0, 0, nofor)) {
  ------------------
  |  Branch (1986:8): [True: 0, False: 12]
  ------------------
 1987|      0|				return 0;
 1988|      0|			}
 1989|     12|			passLinepos++;
 1990|     12|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_dots))
  ------------------
  |  Branch (1990:8): [True: 0, False: 12]
  ------------------
 1991|      0|				return 0;
 1992|     12|			passGetDots(&passLine, &passLinepos, &passHoldString, file);
 1993|     12|			if (passHoldString.length == 0) {
  ------------------
  |  Branch (1993:8): [True: 0, False: 12]
  ------------------
 1994|      0|				compileError(file, "expected dot pattern after @ operand in test part");
 1995|      0|				return 0;
 1996|      0|			}
 1997|     12|		testDoCharsDots:
 1998|     12|			if (passIC >= MAXSTRING) {
  ------------------
  |  |   80|     12|#define MAXSTRING 2048
  ------------------
  |  Branch (1998:8): [True: 0, False: 12]
  ------------------
 1999|      0|				compileError(
 2000|      0|						file, "@ operand in test part of multipass operand too long");
 2001|      0|				return 0;
 2002|      0|			}
 2003|     12|			if (!appendInstructionChar(
  ------------------
  |  Branch (2003:8): [True: 0, False: 12]
  ------------------
 2004|     12|						file, passInstructions, &passIC, passHoldString.length))
 2005|      0|				return 0;
 2006|     24|			for (kk = 0; kk < passHoldString.length; kk++) {
  ------------------
  |  Branch (2006:17): [True: 12, False: 12]
  ------------------
 2007|     12|				if (passIC >= MAXSTRING) {
  ------------------
  |  |   80|     12|#define MAXSTRING 2048
  ------------------
  |  Branch (2007:9): [True: 0, False: 12]
  ------------------
 2008|      0|					compileError(
 2009|      0|							file, "@ operand in test part of multipass operand too long");
 2010|      0|					return 0;
 2011|      0|				}
 2012|     12|				if (!appendInstructionChar(
  ------------------
  |  Branch (2012:9): [True: 0, False: 12]
  ------------------
 2013|     12|							file, passInstructions, &passIC, passHoldString.chars[kk]))
 2014|      0|					return 0;
 2015|     12|			}
 2016|     12|			break;
 2017|     31|		case pass_startReplace:
  ------------------
  |  Branch (2017:3): [True: 31, False: 644]
  ------------------
 2018|     31|			if (replacing) {
  ------------------
  |  Branch (2018:8): [True: 0, False: 31]
  ------------------
 2019|      0|				compileError(file, "nested replacement statements");
 2020|      0|				return 0;
 2021|      0|			}
 2022|     31|			if (!appendInstructionChar(
  ------------------
  |  Branch (2022:8): [True: 0, False: 31]
  ------------------
 2023|     31|						file, passInstructions, &passIC, pass_startReplace))
 2024|      0|				return 0;
 2025|     31|			replacing = 1;
 2026|     31|			passLinepos++;
 2027|     31|			break;
 2028|     30|		case pass_endReplace:
  ------------------
  |  Branch (2028:3): [True: 30, False: 645]
  ------------------
 2029|     30|			if (!replacing) {
  ------------------
  |  Branch (2029:8): [True: 0, False: 30]
  ------------------
 2030|      0|				compileError(file, "unexpected end of replacement");
 2031|      0|				return 0;
 2032|      0|			}
 2033|     30|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_endReplace))
  ------------------
  |  Branch (2033:8): [True: 0, False: 30]
  ------------------
 2034|      0|				return 0;
 2035|     30|			replacing = 0;
 2036|     30|			passLinepos++;
 2037|     30|			break;
 2038|      2|		case pass_variable:
  ------------------
  |  Branch (2038:3): [True: 2, False: 673]
  ------------------
 2039|      2|			passLinepos++;
 2040|      2|			if (!passGetVariableNumber(file, &passLine, &passLinepos, &passHoldNumber))
  ------------------
  |  Branch (2040:8): [True: 0, False: 2]
  ------------------
 2041|      0|				return 0;
 2042|      2|			switch (passLine.chars[passLinepos]) {
 2043|      0|			case pass_eq:
  ------------------
  |  Branch (2043:4): [True: 0, False: 2]
  ------------------
 2044|      0|				if (!appendInstructionChar(file, passInstructions, &passIC, pass_eq))
  ------------------
  |  Branch (2044:9): [True: 0, False: 0]
  ------------------
 2045|      0|					return 0;
 2046|      0|				goto doComp;
 2047|      1|			case pass_lt:
  ------------------
  |  Branch (2047:4): [True: 1, False: 1]
  ------------------
 2048|      1|				if (passLine.chars[passLinepos + 1] == pass_eq) {
  ------------------
  |  Branch (2048:9): [True: 1, False: 0]
  ------------------
 2049|      1|					passLinepos++;
 2050|      1|					if (!appendInstructionChar(
  ------------------
  |  Branch (2050:10): [True: 0, False: 1]
  ------------------
 2051|      1|								file, passInstructions, &passIC, pass_lteq))
 2052|      0|						return 0;
 2053|      1|				} else if (!appendInstructionChar(
  ------------------
  |  Branch (2053:16): [True: 0, False: 0]
  ------------------
 2054|      0|								   file, passInstructions, &passIC, pass_lt))
 2055|      0|					return 0;
 2056|      1|				goto doComp;
 2057|      1|			case pass_gt:
  ------------------
  |  Branch (2057:4): [True: 1, False: 1]
  ------------------
 2058|      1|				if (passLine.chars[passLinepos + 1] == pass_eq) {
  ------------------
  |  Branch (2058:9): [True: 1, False: 0]
  ------------------
 2059|      1|					passLinepos++;
 2060|      1|					if (!appendInstructionChar(
  ------------------
  |  Branch (2060:10): [True: 0, False: 1]
  ------------------
 2061|      1|								file, passInstructions, &passIC, pass_gteq))
 2062|      0|						return 0;
 2063|      1|				} else if (!appendInstructionChar(
  ------------------
  |  Branch (2063:16): [True: 0, False: 0]
  ------------------
 2064|      0|								   file, passInstructions, &passIC, pass_gt))
 2065|      0|					return 0;
 2066|      2|			doComp:
 2067|      2|				if (!appendInstructionChar(
  ------------------
  |  Branch (2067:9): [True: 0, False: 2]
  ------------------
 2068|      2|							file, passInstructions, &passIC, passHoldNumber))
 2069|      0|					return 0;
 2070|      2|				passLinepos++;
 2071|      2|				if (!passGetVariableValue(file, &passLine, &passLinepos, &passHoldNumber))
  ------------------
  |  Branch (2071:9): [True: 1, False: 1]
  ------------------
 2072|      1|					return 0;
 2073|      1|				if (!appendInstructionChar(
  ------------------
  |  Branch (2073:9): [True: 0, False: 1]
  ------------------
 2074|      1|							file, passInstructions, &passIC, passHoldNumber))
 2075|      0|					return 0;
 2076|      1|				break;
 2077|      1|			default:
  ------------------
  |  Branch (2077:4): [True: 0, False: 2]
  ------------------
 2078|      0|				compileError(file, "incorrect comparison operator");
 2079|      0|				return 0;
 2080|      2|			}
 2081|      1|			break;
 2082|     43|		case pass_attributes:
  ------------------
  |  Branch (2082:3): [True: 43, False: 632]
  ------------------
 2083|     43|			passLinepos++;
 2084|     43|			if (!passGetAttributes(&passLine, &passLinepos, &passAttributes, file))
  ------------------
  |  Branch (2084:8): [True: 0, False: 43]
  ------------------
 2085|      0|				return 0;
 2086|     47|		insertAttributes:
 2087|     47|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_attributes))
  ------------------
  |  Branch (2087:8): [True: 0, False: 47]
  ------------------
 2088|      0|				return 0;
 2089|     47|			if (!appendInstructionChar(
  ------------------
  |  Branch (2089:8): [True: 0, False: 47]
  ------------------
 2090|     47|						file, passInstructions, &passIC, (passAttributes >> 48) & 0xffff))
 2091|      0|				return 0;
 2092|     47|			if (!appendInstructionChar(
  ------------------
  |  Branch (2092:8): [True: 0, False: 47]
  ------------------
 2093|     47|						file, passInstructions, &passIC, (passAttributes >> 32) & 0xffff))
 2094|      0|				return 0;
 2095|     47|			if (!appendInstructionChar(
  ------------------
  |  Branch (2095:8): [True: 0, False: 47]
  ------------------
 2096|     47|						file, passInstructions, &passIC, (passAttributes >> 16) & 0xffff))
 2097|      0|				return 0;
 2098|     47|			if (!appendInstructionChar(
  ------------------
  |  Branch (2098:8): [True: 0, False: 47]
  ------------------
 2099|     47|						file, passInstructions, &passIC, passAttributes & 0xffff))
 2100|      0|				return 0;
 2101|     70|		getRange:
 2102|     70|			if (passLine.chars[passLinepos] == pass_until) {
  ------------------
  |  Branch (2102:8): [True: 22, False: 48]
  ------------------
 2103|     22|				passLinepos++;
 2104|     22|				if (!appendInstructionChar(file, passInstructions, &passIC, 1)) return 0;
  ------------------
  |  Branch (2104:9): [True: 0, False: 22]
  ------------------
 2105|     22|				if (!appendInstructionChar(file, passInstructions, &passIC, 0xffff))
  ------------------
  |  Branch (2105:9): [True: 0, False: 22]
  ------------------
 2106|      0|					return 0;
 2107|     22|				break;
 2108|     22|			}
 2109|     48|			passGetNumber(&passLine, &passLinepos, &passHoldNumber);
 2110|     48|			if (passHoldNumber == 0) {
  ------------------
  |  Branch (2110:8): [True: 41, False: 7]
  ------------------
 2111|     41|				if (!appendInstructionChar(file, passInstructions, &passIC, 1)) return 0;
  ------------------
  |  Branch (2111:9): [True: 0, False: 41]
  ------------------
 2112|     41|				if (!appendInstructionChar(file, passInstructions, &passIC, 1)) return 0;
  ------------------
  |  Branch (2112:9): [True: 0, False: 41]
  ------------------
 2113|     41|				break;
 2114|     41|			}
 2115|      7|			if (!appendInstructionChar(file, passInstructions, &passIC, passHoldNumber))
  ------------------
  |  Branch (2115:8): [True: 0, False: 7]
  ------------------
 2116|      0|				return 0;
 2117|      7|			if (passLine.chars[passLinepos] != pass_hyphen) {
  ------------------
  |  Branch (2117:8): [True: 5, False: 2]
  ------------------
 2118|      5|				if (!appendInstructionChar(
  ------------------
  |  Branch (2118:9): [True: 0, False: 5]
  ------------------
 2119|      5|							file, passInstructions, &passIC, passHoldNumber))
 2120|      0|					return 0;
 2121|      5|				break;
 2122|      5|			}
 2123|      2|			passLinepos++;
 2124|      2|			passGetNumber(&passLine, &passLinepos, &passHoldNumber);
 2125|      2|			if (passHoldNumber == 0) {
  ------------------
  |  Branch (2125:8): [True: 0, False: 2]
  ------------------
 2126|      0|				compileError(file, "invalid range");
 2127|      0|				return 0;
 2128|      0|			}
 2129|      2|			if (!appendInstructionChar(file, passInstructions, &passIC, passHoldNumber))
  ------------------
  |  Branch (2129:8): [True: 0, False: 2]
  ------------------
 2130|      0|				return 0;
 2131|      2|			break;
 2132|      2|		case pass_groupstart:
  ------------------
  |  Branch (2132:3): [True: 0, False: 675]
  ------------------
 2133|      0|		case pass_groupend: {
  ------------------
  |  Branch (2133:3): [True: 0, False: 675]
  ------------------
 2134|      0|			passLinepos++;
 2135|      0|			passGetName(&passLine, &passLinepos, &passHoldString);
 2136|      0|			TranslationTableOffset ruleOffset = findRuleName(&passHoldString, *table);
 2137|      0|			if (ruleOffset)
  ------------------
  |  Branch (2137:8): [True: 0, False: 0]
  ------------------
 2138|      0|				rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
 2139|      0|			if (rule && rule->opcode == CTO_Grouping) {
  ------------------
  |  Branch (2139:8): [True: 0, False: 0]
  |  Branch (2139:16): [True: 0, False: 0]
  ------------------
 2140|      0|				if (!appendInstructionChar(file, passInstructions, &passIC, passSubOp))
  ------------------
  |  Branch (2140:9): [True: 0, False: 0]
  ------------------
 2141|      0|					return 0;
 2142|      0|				if (!appendInstructionChar(
  ------------------
  |  Branch (2142:9): [True: 0, False: 0]
  ------------------
 2143|      0|							file, passInstructions, &passIC, ruleOffset >> 16))
 2144|      0|					return 0;
 2145|      0|				if (!appendInstructionChar(
  ------------------
  |  Branch (2145:9): [True: 0, False: 0]
  ------------------
 2146|      0|							file, passInstructions, &passIC, ruleOffset & 0xffff))
 2147|      0|					return 0;
 2148|      0|				break;
 2149|      0|			} else {
 2150|      0|				compileError(file, "%s is not a grouping name",
 2151|      0|						_lou_showString(
 2152|      0|								&passHoldString.chars[0], passHoldString.length, 0));
 2153|      0|				return 0;
 2154|      0|			}
 2155|      0|			break;
 2156|      0|		}
 2157|     27|		case pass_swap: {
  ------------------
  |  Branch (2157:3): [True: 27, False: 648]
  ------------------
 2158|     27|			passLinepos++;
 2159|     27|			passGetName(&passLine, &passLinepos, &passHoldString);
 2160|     27|			if ((class = findCharacterClass(&passHoldString, *table))) {
  ------------------
  |  Branch (2160:8): [True: 4, False: 23]
  ------------------
 2161|      4|				passAttributes = class->attribute;
 2162|      4|				goto insertAttributes;
 2163|      4|			}
 2164|     23|			TranslationTableOffset ruleOffset = findRuleName(&passHoldString, *table);
 2165|     23|			if (ruleOffset)
  ------------------
  |  Branch (2165:8): [True: 4, False: 19]
  ------------------
 2166|      4|				rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
 2167|     23|			if (rule &&
  ------------------
  |  Branch (2167:8): [True: 23, False: 0]
  ------------------
 2168|     23|					(rule->opcode == CTO_SwapCc || rule->opcode == CTO_SwapCd ||
  ------------------
  |  Branch (2168:7): [True: 23, False: 0]
  |  Branch (2168:37): [True: 0, False: 0]
  ------------------
 2169|     23|							rule->opcode == CTO_SwapDd)) {
  ------------------
  |  Branch (2169:8): [True: 0, False: 0]
  ------------------
 2170|     23|				if (!appendInstructionChar(file, passInstructions, &passIC, pass_swap))
  ------------------
  |  Branch (2170:9): [True: 0, False: 23]
  ------------------
 2171|      0|					return 0;
 2172|     23|				if (!appendInstructionChar(
  ------------------
  |  Branch (2172:9): [True: 0, False: 23]
  ------------------
 2173|     23|							file, passInstructions, &passIC, ruleOffset >> 16))
 2174|      0|					return 0;
 2175|     23|				if (!appendInstructionChar(
  ------------------
  |  Branch (2175:9): [True: 0, False: 23]
  ------------------
 2176|     23|							file, passInstructions, &passIC, ruleOffset & 0xffff))
 2177|      0|					return 0;
 2178|     23|				goto getRange;
 2179|     23|			}
 2180|      0|			compileError(file, "%s is neither a class name nor a swap name.",
 2181|      0|					_lou_showString(&passHoldString.chars[0], passHoldString.length, 0));
 2182|      0|			return 0;
 2183|     23|		}
 2184|    133|		case pass_endTest:
  ------------------
  |  Branch (2184:3): [True: 133, False: 542]
  ------------------
 2185|    133|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_endTest))
  ------------------
  |  Branch (2185:8): [True: 0, False: 133]
  ------------------
 2186|      0|				return 0;
 2187|    133|			if (replacing) {
  ------------------
  |  Branch (2187:8): [True: 0, False: 133]
  ------------------
 2188|      0|				compileError(file, "expected end of replacement");
 2189|      0|				return 0;
 2190|      0|			}
 2191|    133|			passLinepos++;
 2192|    133|			break;
 2193|      0|		default:
  ------------------
  |  Branch (2193:3): [True: 0, False: 675]
  ------------------
 2194|      0|			compileError(file, "incorrect operator '%c ' in test part",
 2195|      0|					passLine.chars[passLinepos]);
 2196|      0|			return 0;
 2197|    675|		}
 2198|       |
 2199|    675|	} /* Compile action part */
 2200|       |
 2201|       |	/* Compile action part */
 2202|    727|	while (passLinepos < passLine.length && passLine.chars[passLinepos] <= 32)
  ------------------
  |  Branch (2202:9): [True: 713, False: 14]
  |  Branch (2202:42): [True: 601, False: 112]
  ------------------
 2203|    601|		passLinepos++;
 2204|    347|	while (passLinepos < passLine.length && passLine.chars[passLinepos] > 32) {
  ------------------
  |  Branch (2204:9): [True: 332, False: 15]
  |  Branch (2204:42): [True: 223, False: 109]
  ------------------
 2205|    223|		if (passIC >= MAXSTRING) {
  ------------------
  |  |   80|    223|#define MAXSTRING 2048
  ------------------
  |  Branch (2205:7): [True: 0, False: 223]
  ------------------
 2206|      0|			compileError(file, "Action part in multipass operand too long");
 2207|      0|			return 0;
 2208|      0|		}
 2209|    223|		switch ((passSubOp = passLine.chars[passLinepos])) {
 2210|      9|		case pass_string:
  ------------------
  |  Branch (2210:3): [True: 9, False: 214]
  ------------------
 2211|      9|			if (!verifyStringOrDots(file, opcode, 1, 1, nofor)) {
  ------------------
  |  Branch (2211:8): [True: 0, False: 9]
  ------------------
 2212|      0|				return 0;
 2213|      0|			}
 2214|      9|			passLinepos++;
 2215|      9|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_string))
  ------------------
  |  Branch (2215:8): [True: 0, False: 9]
  ------------------
 2216|      0|				return 0;
 2217|      9|			passGetString(&passLine, &passLinepos, &passHoldString, file);
 2218|      9|			goto actionDoCharsDots;
 2219|     52|		case pass_dots:
  ------------------
  |  Branch (2219:3): [True: 52, False: 171]
  ------------------
 2220|     52|			if (!verifyStringOrDots(file, opcode, 0, 1, nofor)) {
  ------------------
  |  Branch (2220:8): [True: 0, False: 52]
  ------------------
 2221|      0|				return 0;
 2222|      0|			}
 2223|     52|			passLinepos++;
 2224|     52|			passGetDots(&passLine, &passLinepos, &passHoldString, file);
 2225|     52|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_dots))
  ------------------
  |  Branch (2225:8): [True: 0, False: 52]
  ------------------
 2226|      0|				return 0;
 2227|     52|			if (passHoldString.length == 0) {
  ------------------
  |  Branch (2227:8): [True: 0, False: 52]
  ------------------
 2228|      0|				compileError(file, "expected dot pattern after @ operand in action part");
 2229|      0|				return 0;
 2230|      0|			}
 2231|     61|		actionDoCharsDots:
 2232|     61|			if (passIC >= MAXSTRING) {
  ------------------
  |  |   80|     61|#define MAXSTRING 2048
  ------------------
  |  Branch (2232:8): [True: 0, False: 61]
  ------------------
 2233|      0|				compileError(
 2234|      0|						file, "@ operand in action part of multipass operand too long");
 2235|      0|				return 0;
 2236|      0|			}
 2237|     61|			if (!appendInstructionChar(
  ------------------
  |  Branch (2237:8): [True: 0, False: 61]
  ------------------
 2238|     61|						file, passInstructions, &passIC, passHoldString.length))
 2239|      0|				return 0;
 2240|    418|			for (kk = 0; kk < passHoldString.length; kk++) {
  ------------------
  |  Branch (2240:17): [True: 357, False: 61]
  ------------------
 2241|    357|				if (passIC >= MAXSTRING) {
  ------------------
  |  |   80|    357|#define MAXSTRING 2048
  ------------------
  |  Branch (2241:9): [True: 0, False: 357]
  ------------------
 2242|      0|					compileError(file,
 2243|      0|							"@ operand in action part of multipass operand too long");
 2244|      0|					return 0;
 2245|      0|				}
 2246|    357|				if (!appendInstructionChar(
  ------------------
  |  Branch (2246:9): [True: 0, False: 357]
  ------------------
 2247|    357|							file, passInstructions, &passIC, passHoldString.chars[kk]))
 2248|      0|					return 0;
 2249|    357|			}
 2250|     61|			break;
 2251|     61|		case pass_variable:
  ------------------
  |  Branch (2251:3): [True: 23, False: 200]
  ------------------
 2252|     23|			passLinepos++;
 2253|     23|			if (!passGetVariableNumber(file, &passLine, &passLinepos, &passHoldNumber))
  ------------------
  |  Branch (2253:8): [True: 0, False: 23]
  ------------------
 2254|      0|				return 0;
 2255|     23|			switch (passLine.chars[passLinepos]) {
 2256|      3|			case pass_eq:
  ------------------
  |  Branch (2256:4): [True: 3, False: 20]
  ------------------
 2257|      3|				if (!appendInstructionChar(file, passInstructions, &passIC, pass_eq))
  ------------------
  |  Branch (2257:9): [True: 0, False: 3]
  ------------------
 2258|      0|					return 0;
 2259|      3|				if (!appendInstructionChar(
  ------------------
  |  Branch (2259:9): [True: 0, False: 3]
  ------------------
 2260|      3|							file, passInstructions, &passIC, passHoldNumber))
 2261|      0|					return 0;
 2262|      3|				passLinepos++;
 2263|      3|				if (!passGetVariableValue(file, &passLine, &passLinepos, &passHoldNumber))
  ------------------
  |  Branch (2263:9): [True: 0, False: 3]
  ------------------
 2264|      0|					return 0;
 2265|      3|				if (!appendInstructionChar(
  ------------------
  |  Branch (2265:9): [True: 0, False: 3]
  ------------------
 2266|      3|							file, passInstructions, &passIC, passHoldNumber))
 2267|      0|					return 0;
 2268|      3|				break;
 2269|     20|			case pass_plus:
  ------------------
  |  Branch (2269:4): [True: 20, False: 3]
  ------------------
 2270|     20|			case pass_hyphen:
  ------------------
  |  Branch (2270:4): [True: 0, False: 23]
  ------------------
 2271|     20|				if (!appendInstructionChar(file, passInstructions, &passIC,
  ------------------
  |  Branch (2271:9): [True: 0, False: 20]
  ------------------
 2272|     20|							passLine.chars[passLinepos++]))
 2273|      0|					return 0;
 2274|     20|				if (!appendInstructionChar(
  ------------------
  |  Branch (2274:9): [True: 0, False: 20]
  ------------------
 2275|     20|							file, passInstructions, &passIC, passHoldNumber))
 2276|      0|					return 0;
 2277|     20|				break;
 2278|     20|			default:
  ------------------
  |  Branch (2278:4): [True: 0, False: 23]
  ------------------
 2279|      0|				compileError(file, "incorrect variable operator in action part");
 2280|      0|				return 0;
 2281|     23|			}
 2282|     23|			break;
 2283|    107|		case pass_copy:
  ------------------
  |  Branch (2283:3): [True: 107, False: 116]
  ------------------
 2284|    107|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_copy))
  ------------------
  |  Branch (2284:8): [True: 0, False: 107]
  ------------------
 2285|      0|				return 0;
 2286|    107|			passLinepos++;
 2287|    107|			break;
 2288|     24|		case pass_omit:
  ------------------
  |  Branch (2288:3): [True: 24, False: 199]
  ------------------
 2289|     24|			if (!appendInstructionChar(file, passInstructions, &passIC, pass_omit))
  ------------------
  |  Branch (2289:8): [True: 0, False: 24]
  ------------------
 2290|      0|				return 0;
 2291|     24|			passLinepos++;
 2292|     24|			break;
 2293|      0|		case pass_groupreplace:
  ------------------
  |  Branch (2293:3): [True: 0, False: 223]
  ------------------
 2294|      0|		case pass_groupstart:
  ------------------
  |  Branch (2294:3): [True: 0, False: 223]
  ------------------
 2295|      0|		case pass_groupend: {
  ------------------
  |  Branch (2295:3): [True: 0, False: 223]
  ------------------
 2296|      0|			passLinepos++;
 2297|      0|			passGetName(&passLine, &passLinepos, &passHoldString);
 2298|      0|			TranslationTableOffset ruleOffset = findRuleName(&passHoldString, *table);
 2299|      0|			if (ruleOffset)
  ------------------
  |  Branch (2299:8): [True: 0, False: 0]
  ------------------
 2300|      0|				rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
 2301|      0|			if (rule && rule->opcode == CTO_Grouping) {
  ------------------
  |  Branch (2301:8): [True: 0, False: 0]
  |  Branch (2301:16): [True: 0, False: 0]
  ------------------
 2302|      0|				if (!appendInstructionChar(file, passInstructions, &passIC, passSubOp))
  ------------------
  |  Branch (2302:9): [True: 0, False: 0]
  ------------------
 2303|      0|					return 0;
 2304|      0|				if (!appendInstructionChar(
  ------------------
  |  Branch (2304:9): [True: 0, False: 0]
  ------------------
 2305|      0|							file, passInstructions, &passIC, ruleOffset >> 16))
 2306|      0|					return 0;
 2307|      0|				if (!appendInstructionChar(
  ------------------
  |  Branch (2307:9): [True: 0, False: 0]
  ------------------
 2308|      0|							file, passInstructions, &passIC, ruleOffset & 0xffff))
 2309|      0|					return 0;
 2310|      0|				break;
 2311|      0|			}
 2312|      0|			compileError(file, "%s is not a grouping name",
 2313|      0|					_lou_showString(&passHoldString.chars[0], passHoldString.length, 0));
 2314|      0|			return 0;
 2315|      0|		}
 2316|      6|		case pass_swap: {
  ------------------
  |  Branch (2316:3): [True: 6, False: 217]
  ------------------
 2317|      6|			passLinepos++;
 2318|      6|			passGetName(&passLine, &passLinepos, &passHoldString);
 2319|      6|			TranslationTableOffset ruleOffset = findRuleName(&passHoldString, *table);
 2320|      6|			if (ruleOffset)
  ------------------
  |  Branch (2320:8): [True: 4, False: 2]
  ------------------
 2321|      4|				rule = (TranslationTableRule *)&(*table)->ruleArea[ruleOffset];
 2322|      6|			if (rule &&
  ------------------
  |  Branch (2322:8): [True: 6, False: 0]
  ------------------
 2323|      6|					(rule->opcode == CTO_SwapCc || rule->opcode == CTO_SwapCd ||
  ------------------
  |  Branch (2323:7): [True: 6, False: 0]
  |  Branch (2323:37): [True: 0, False: 0]
  ------------------
 2324|      6|							rule->opcode == CTO_SwapDd)) {
  ------------------
  |  Branch (2324:8): [True: 0, False: 0]
  ------------------
 2325|      6|				if (!appendInstructionChar(file, passInstructions, &passIC, pass_swap))
  ------------------
  |  Branch (2325:9): [True: 0, False: 6]
  ------------------
 2326|      0|					return 0;
 2327|      6|				if (!appendInstructionChar(
  ------------------
  |  Branch (2327:9): [True: 0, False: 6]
  ------------------
 2328|      6|							file, passInstructions, &passIC, ruleOffset >> 16))
 2329|      0|					return 0;
 2330|      6|				if (!appendInstructionChar(
  ------------------
  |  Branch (2330:9): [True: 0, False: 6]
  ------------------
 2331|      6|							file, passInstructions, &passIC, ruleOffset & 0xffff))
 2332|      0|					return 0;
 2333|      6|				break;
 2334|      6|			}
 2335|      0|			compileError(file, "%s is not a swap name.",
 2336|      0|					_lou_showString(&passHoldString.chars[0], passHoldString.length, 0));
 2337|      0|			return 0;
 2338|      0|			break;
 2339|      6|		}
 2340|      2|		default:
  ------------------
  |  Branch (2340:3): [True: 2, False: 221]
  ------------------
 2341|      2|			compileError(file, "incorrect operator in action part");
 2342|      2|			return 0;
 2343|    223|		}
 2344|    223|	}
 2345|       |
 2346|       |	/* Analyze and add rule */
 2347|    124|	passRuleDots.length = passIC;
 2348|       |
 2349|    124|	{
 2350|    124|		widechar *characters;
 2351|    124|		int length;
 2352|    124|		int found = passFindCharacters(
 2353|    124|				file, passInstructions, passRuleDots.length, &characters, &length);
 2354|       |
 2355|    124|		if (!found) return 0;
  ------------------
  |  Branch (2355:7): [True: 0, False: 124]
  ------------------
 2356|       |
 2357|    124|		if (characters) {
  ------------------
  |  Branch (2357:7): [True: 11, False: 113]
  ------------------
 2358|     22|			for (k = 0; k < length; k += 1) passRuleChars.chars[k] = characters[k];
  ------------------
  |  Branch (2358:16): [True: 11, False: 11]
  ------------------
 2359|     11|			passRuleChars.length = k;
 2360|     11|		}
 2361|    124|	}
 2362|       |
 2363|    124|	if (!addRule(file, opcode, &passRuleChars, &passRuleDots, 0, 0, NULL, NULL, noback,
  ------------------
  |  Branch (2363:6): [True: 0, False: 124]
  ------------------
 2364|    124|				nofor, table))
 2365|      0|		return 0;
 2366|    124|	return 1;
 2367|    124|}
compileTranslationTable.c:appendInstructionChar:
 1886|  2.07k|		const FileInfo *file, widechar *passInstructions, int *passIC, widechar ch) {
 1887|  2.07k|	if (*passIC >= MAXSTRING) {
  ------------------
  |  |   80|  2.07k|#define MAXSTRING 2048
  ------------------
  |  Branch (1887:6): [True: 0, False: 2.07k]
  ------------------
 1888|      0|		compileError(file, "multipass operand too long");
 1889|      0|		return 0;
 1890|      0|	}
 1891|  2.07k|	passInstructions[(*passIC)++] = ch;
 1892|  2.07k|	return 1;
 1893|  2.07k|}
compileTranslationTable.c:passGetNumber:
 1811|    400|passGetNumber(CharsString *passLine, int *passLinepos, widechar *number) {
 1812|       |	/* Convert a string of wide character digits to an integer */
 1813|    400|	*number = 0;
 1814|    694|	while ((*passLinepos < passLine->length) && (passLine->chars[*passLinepos] >= '0') &&
  ------------------
  |  Branch (1814:9): [True: 694, False: 0]
  |  Branch (1814:46): [True: 566, False: 128]
  ------------------
 1815|    566|			(passLine->chars[*passLinepos] <= '9'))
  ------------------
  |  Branch (1815:4): [True: 294, False: 272]
  ------------------
 1816|    294|		*number = 10 * (*number) + (passLine->chars[(*passLinepos)++] - '0');
 1817|    400|	return 1;
 1818|    400|}
compileTranslationTable.c:verifyStringOrDots:
 1874|     73|		int actionPart, int nofor) {
 1875|     73|	if (!wantsString(opcode, actionPart, nofor) == !isString) return 1;
  ------------------
  |  Branch (1875:6): [True: 73, False: 0]
  ------------------
 1876|       |
 1877|      0|	compileError(file, "%s are not allowed in the %s part of a %s translation %s rule.",
 1878|      0|			isString ? "strings" : "dots", getPartName(actionPart),
  ------------------
  |  Branch (1878:4): [True: 0, False: 0]
  ------------------
 1879|      0|			nofor ? "backward" : "forward", _lou_findOpcodeName(opcode));
  ------------------
  |  Branch (1879:4): [True: 0, False: 0]
  ------------------
 1880|       |
 1881|      0|	return 0;
 1882|     73|}
compileTranslationTable.c:wantsString:
 1866|     73|wantsString(TranslationTableOpcode opcode, int actionPart, int nofor) {
 1867|     73|	if (opcode == CTO_Correct) return 1;
  ------------------
  |  Branch (1867:6): [True: 8, False: 65]
  ------------------
 1868|     65|	if (opcode != CTO_Context) return 0;
  ------------------
  |  Branch (1868:6): [True: 63, False: 2]
  ------------------
 1869|      2|	return !nofor == !actionPart;
 1870|     65|}
compileTranslationTable.c:passGetString:
 1791|      9|		const FileInfo *file) {
 1792|      9|	string->length = 0;
 1793|    213|	while (1) {
  ------------------
  |  Branch (1793:9): [True: 213, Folded]
  ------------------
 1794|    213|		if ((*passLinepos >= passLine->length) || !passLine->chars[*passLinepos]) {
  ------------------
  |  Branch (1794:7): [True: 0, False: 213]
  |  Branch (1794:45): [True: 0, False: 213]
  ------------------
 1795|      0|			compileError(file, "unterminated string");
 1796|      0|			return 0;
 1797|      0|		}
 1798|    213|		if (passLine->chars[*passLinepos] == 34) break;
  ------------------
  |  Branch (1798:7): [True: 9, False: 204]
  ------------------
 1799|    204|		if (passLine->chars[*passLinepos] == QUOTESUB)
  ------------------
  |  |   44|    204|#define QUOTESUB 28 /* Stand-in for double quotes in strings */
  ------------------
  |  Branch (1799:7): [True: 0, False: 204]
  ------------------
 1800|      0|			string->chars[string->length++] = 34;
 1801|    204|		else
 1802|    204|			string->chars[string->length++] = passLine->chars[*passLinepos];
 1803|    204|		(*passLinepos)++;
 1804|    204|	}
 1805|      9|	string->chars[string->length] = 0;
 1806|      9|	(*passLinepos)++;
 1807|      9|	return 1;
 1808|      9|}
compileTranslationTable.c:passGetDots:
 1775|     64|		const FileInfo *file) {
 1776|     64|	CharsString collectDots;
 1777|     64|	collectDots.length = 0;
 1778|    155|	while (*passLinepos < passLine->length &&
  ------------------
  |  Branch (1778:9): [True: 155, False: 0]
  ------------------
 1779|    155|			(passLine->chars[*passLinepos] == '-' ||
  ------------------
  |  Branch (1779:5): [True: 5, False: 150]
  ------------------
 1780|    150|					(passLine->chars[*passLinepos] >= '0' &&
  ------------------
  |  Branch (1780:7): [True: 88, False: 62]
  ------------------
 1781|     88|							passLine->chars[*passLinepos] <= '9') ||
  ------------------
  |  Branch (1781:8): [True: 78, False: 10]
  ------------------
 1782|     72|					((passLine->chars[*passLinepos] | 32) >= 'a' &&
  ------------------
  |  Branch (1782:7): [True: 10, False: 62]
  ------------------
 1783|     10|							(passLine->chars[*passLinepos] | 32) <= 'f')))
  ------------------
  |  Branch (1783:8): [True: 8, False: 2]
  ------------------
 1784|     91|		collectDots.chars[collectDots.length++] = passLine->chars[(*passLinepos)++];
 1785|     64|	if (!parseDots(file, dots, &collectDots)) return 0;
  ------------------
  |  Branch (1785:6): [True: 2, False: 62]
  ------------------
 1786|     62|	return 1;
 1787|     64|}
compileTranslationTable.c:passGetVariableNumber:
 1839|     25|		const FileInfo *file, CharsString *passLine, int *passLinepos, widechar *number) {
 1840|     25|	if (!passGetNumber(passLine, passLinepos, number)) {
  ------------------
  |  Branch (1840:6): [True: 0, False: 25]
  ------------------
 1841|      0|		compileError(file, "missing variable number");
 1842|      0|		return 0;
 1843|      0|	}
 1844|     25|	if ((*number >= 0) && (*number < NUMVAR)) return 1;
  ------------------
  |  |   58|     25|#define NUMVAR 50
  ------------------
  |  Branch (1844:6): [True: 25, False: 0]
  |  Branch (1844:24): [True: 25, False: 0]
  ------------------
 1845|      0|	compileError(file, "variable number out of range");
 1846|      0|	return 0;
 1847|     25|}
compileTranslationTable.c:passGetVariableValue:
 1822|      5|		const FileInfo *file, CharsString *passLine, int *passLinepos, widechar *number) {
 1823|       |	/* Read the value a variable is compared with or set to */
 1824|      5|	int value = 0;
 1825|     13|	while ((*passLinepos < passLine->length) && (passLine->chars[*passLinepos] >= '0') &&
  ------------------
  |  Branch (1825:9): [True: 12, False: 1]
  |  Branch (1825:46): [True: 10, False: 2]
  ------------------
 1826|     10|			(passLine->chars[*passLinepos] <= '9')) {
  ------------------
  |  Branch (1826:4): [True: 9, False: 1]
  ------------------
 1827|      9|		value = 10 * value + (passLine->chars[(*passLinepos)++] - '0');
 1828|      9|		if (value > MAXVARVALUE) {
  ------------------
  |  |   59|      9|#define MAXVARVALUE 255
  ------------------
  |  Branch (1828:7): [True: 1, False: 8]
  ------------------
 1829|      1|			compileError(file, "variable value out of range");
 1830|      1|			return 0;
 1831|      1|		}
 1832|      9|	}
 1833|      4|	*number = value;
 1834|      4|	return 1;
 1835|      5|}
compileTranslationTable.c:passGetAttributes:
 1712|     43|		TranslationTableCharacterAttributes *attributes, const FileInfo *file) {
 1713|     43|	int more = 1;
 1714|     43|	*attributes = 0;
 1715|    251|	while (more) {
  ------------------
  |  Branch (1715:9): [True: 208, False: 43]
  ------------------
 1716|    208|		switch (passLine->chars[*passLinepos]) {
 1717|     44|		case pass_any:
  ------------------
  |  Branch (1717:3): [True: 44, False: 164]
  ------------------
 1718|     44|			*attributes = 0xffffffff;
 1719|     44|			break;
 1720|      4|		case pass_digit:
  ------------------
  |  Branch (1720:3): [True: 4, False: 204]
  ------------------
 1721|      4|			*attributes |= CTC_Digit;
 1722|      4|			break;
 1723|      0|		case pass_litDigit:
  ------------------
  |  Branch (1723:3): [True: 0, False: 208]
  ------------------
 1724|      0|			*attributes |= CTC_LitDigit;
 1725|      0|			break;
 1726|      2|		case pass_letter:
  ------------------
  |  Branch (1726:3): [True: 2, False: 206]
  ------------------
 1727|      2|			*attributes |= CTC_Letter;
 1728|      2|			break;
 1729|      5|		case pass_math:
  ------------------
  |  Branch (1729:3): [True: 5, False: 203]
  ------------------
 1730|      5|			*attributes |= CTC_Math;
 1731|      5|			break;
 1732|     37|		case pass_punctuation:
  ------------------
  |  Branch (1732:3): [True: 37, False: 171]
  ------------------
 1733|     37|			*attributes |= CTC_Punctuation;
 1734|     37|			break;
 1735|      0|		case pass_sign:
  ------------------
  |  Branch (1735:3): [True: 0, False: 208]
  ------------------
 1736|      0|			*attributes |= CTC_Sign;
 1737|      0|			break;
 1738|     36|		case pass_space:
  ------------------
  |  Branch (1738:3): [True: 36, False: 172]
  ------------------
 1739|     36|			*attributes |= CTC_Space;
 1740|     36|			break;
 1741|      0|		case pass_uppercase:
  ------------------
  |  Branch (1741:3): [True: 0, False: 208]
  ------------------
 1742|      0|			*attributes |= CTC_UpperCase;
 1743|      0|			break;
 1744|      0|		case pass_lowercase:
  ------------------
  |  Branch (1744:3): [True: 0, False: 208]
  ------------------
 1745|      0|			*attributes |= CTC_LowerCase;
 1746|      0|			break;
 1747|     31|		case pass_class1:
  ------------------
  |  Branch (1747:3): [True: 31, False: 177]
  ------------------
 1748|     31|			*attributes |= CTC_UserDefined9;
 1749|     31|			break;
 1750|      0|		case pass_class2:
  ------------------
  |  Branch (1750:3): [True: 0, False: 208]
  ------------------
 1751|      0|			*attributes |= CTC_UserDefined10;
 1752|      0|			break;
 1753|      2|		case pass_class3:
  ------------------
  |  Branch (1753:3): [True: 2, False: 206]
  ------------------
 1754|      2|			*attributes |= CTC_UserDefined11;
 1755|      2|			break;
 1756|      4|		case pass_class4:
  ------------------
  |  Branch (1756:3): [True: 4, False: 204]
  ------------------
 1757|      4|			*attributes |= CTC_UserDefined12;
 1758|      4|			break;
 1759|     43|		default:
  ------------------
  |  Branch (1759:3): [True: 43, False: 165]
  ------------------
 1760|     43|			more = 0;
 1761|     43|			break;
 1762|    208|		}
 1763|    208|		if (more) (*passLinepos)++;
  ------------------
  |  Branch (1763:7): [True: 165, False: 43]
  ------------------
 1764|    208|	}
 1765|     43|	if (!*attributes) {
  ------------------
  |  Branch (1765:6): [True: 0, False: 43]
  ------------------
 1766|      0|		compileError(file, "missing attribute");
 1767|      0|		(*passLinepos)--;
 1768|      0|		return 0;
 1769|      0|	}
 1770|     43|	return 1;
 1771|     43|}
compileTranslationTable.c:passGetName:
 1850|     33|passGetName(CharsString *passLine, int *passLinepos, CharsString *name) {
 1851|     33|	name->length = 0;
 1852|       |	// a name is a sequence of characters in the ranges 'a'..'z' and 'A'..'Z'
 1853|     89|	do {
 1854|     89|		widechar c = passLine->chars[*passLinepos];
 1855|     89|		if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
  ------------------
  |  Branch (1855:8): [True: 59, False: 30]
  |  Branch (1855:20): [True: 54, False: 5]
  |  Branch (1855:34): [True: 7, False: 28]
  |  Branch (1855:46): [True: 2, False: 5]
  ------------------
 1856|     56|			name->chars[name->length++] = c;
 1857|     56|			(*passLinepos)++;
 1858|     56|		} else {
 1859|     33|			break;
 1860|     33|		}
 1861|     89|	} while (*passLinepos < passLine->length);
  ------------------
  |  Branch (1861:11): [True: 56, False: 0]
  ------------------
 1862|     33|	return 1;
 1863|     33|}
compileTranslationTable.c:findRuleName:
 1564|     29|findRuleName(const CharsString *name, const TranslationTableHeader *table) {
 1565|     29|	const RuleName *ruleName = table->ruleNames;
 1566|     50|	while (ruleName) {
  ------------------
  |  Branch (1566:9): [True: 29, False: 21]
  ------------------
 1567|     29|		if ((name->length == ruleName->length) &&
  ------------------
  |  Branch (1567:7): [True: 10, False: 19]
  ------------------
 1568|     10|				(memcmp(&name->chars[0], ruleName->name, CHARSIZE * name->length) == 0))
  ------------------
  |  |   68|     10|#define CHARSIZE sizeof(widechar)
  ------------------
  |  Branch (1568:5): [True: 8, False: 2]
  ------------------
 1569|      8|			return ruleName->ruleOffset;
 1570|     21|		ruleName = ruleName->next;
 1571|     21|	}
 1572|     21|	return 0;
 1573|     29|}
compileTranslationTable.c:passFindCharacters:
  717|    124|		widechar **characters, int *length) {
  718|    124|	int IC = 0;
  719|    124|	int lookback = 0;
  720|       |
  721|    124|	*characters = NULL;
  722|    124|	*length = 0;
  723|       |
  724|    360|	while (IC < end) {
  ------------------
  |  Branch (724:9): [True: 360, False: 0]
  ------------------
  725|    360|		widechar instruction = instructions[IC];
  726|       |
  727|    360|		switch (instruction) {
  728|      0|		case pass_string:
  ------------------
  |  Branch (728:3): [True: 0, False: 360]
  ------------------
  729|     12|		case pass_dots: {
  ------------------
  |  Branch (729:3): [True: 12, False: 348]
  ------------------
  730|     12|			int count = instructions[IC + 1];
  731|     12|			IC += 2;
  732|     12|			if (count > lookback) {
  ------------------
  |  Branch (732:8): [True: 11, False: 1]
  ------------------
  733|     11|				*characters = &instructions[IC + lookback];
  734|     11|				*length = count - lookback;
  735|     11|				return 1;
  736|     11|			} else {
  737|      1|				lookback -= count;
  738|      1|			}
  739|      1|			IC += count;
  740|      1|			continue;
  741|     12|		}
  742|       |
  743|     39|		case pass_attributes:
  ------------------
  |  Branch (743:3): [True: 39, False: 321]
  ------------------
  744|     39|			IC += 7;
  745|     39|			if (instructions[IC - 2] == instructions[IC - 1] &&
  ------------------
  |  Branch (745:8): [True: 15, False: 24]
  ------------------
  746|     15|					instructions[IC - 1] <= lookback) {
  ------------------
  |  Branch (746:6): [True: 0, False: 15]
  ------------------
  747|      0|				lookback -= instructions[IC - 1];
  748|      0|				continue;
  749|      0|			}
  750|     39|			goto NO_CHARACTERS;
  751|       |
  752|     39|		case pass_swap:
  ------------------
  |  Branch (752:3): [True: 0, False: 360]
  ------------------
  753|      0|			IC += 2;
  754|       |			/* fall through */
  755|       |
  756|      0|		case pass_groupstart:
  ------------------
  |  Branch (756:3): [True: 0, False: 360]
  ------------------
  757|      0|		case pass_groupend:
  ------------------
  |  Branch (757:3): [True: 0, False: 360]
  ------------------
  758|      0|		case pass_groupreplace:
  ------------------
  |  Branch (758:3): [True: 0, False: 360]
  ------------------
  759|      0|			IC += 3;
  760|       |
  761|    113|		NO_CHARACTERS: { return 1; }
  762|       |
  763|      0|		case pass_eq:
  ------------------
  |  Branch (763:3): [True: 0, False: 360]
  ------------------
  764|      0|		case pass_lt:
  ------------------
  |  Branch (764:3): [True: 0, False: 360]
  ------------------
  765|      0|		case pass_gt:
  ------------------
  |  Branch (765:3): [True: 0, False: 360]
  ------------------
  766|      1|		case pass_lteq:
  ------------------
  |  Branch (766:3): [True: 1, False: 359]
  ------------------
  767|      1|		case pass_gteq:
  ------------------
  |  Branch (767:3): [True: 0, False: 360]
  ------------------
  768|      1|			IC += 3;
  769|      1|			continue;
  770|       |
  771|    166|		case pass_lookback:
  ------------------
  |  Branch (771:3): [True: 166, False: 194]
  ------------------
  772|    166|			lookback += instructions[IC + 1];
  773|    166|			IC += 2;
  774|    166|			continue;
  775|       |
  776|     34|		case pass_not:
  ------------------
  |  Branch (776:3): [True: 34, False: 326]
  ------------------
  777|     41|		case pass_startReplace:
  ------------------
  |  Branch (777:3): [True: 7, False: 353]
  ------------------
  778|     48|		case pass_endReplace:
  ------------------
  |  Branch (778:3): [True: 7, False: 353]
  ------------------
  779|     62|		case pass_first:
  ------------------
  |  Branch (779:3): [True: 14, False: 346]
  ------------------
  780|     68|		case pass_last:
  ------------------
  |  Branch (780:3): [True: 6, False: 354]
  ------------------
  781|     68|		case pass_copy:
  ------------------
  |  Branch (781:3): [True: 0, False: 360]
  ------------------
  782|     68|		case pass_omit:
  ------------------
  |  Branch (782:3): [True: 0, False: 360]
  ------------------
  783|     68|		case pass_plus:
  ------------------
  |  Branch (783:3): [True: 0, False: 360]
  ------------------
  784|     68|		case pass_hyphen:
  ------------------
  |  Branch (784:3): [True: 0, False: 360]
  ------------------
  785|     68|			IC += 1;
  786|     68|			continue;
  787|       |
  788|     74|		case pass_endTest:
  ------------------
  |  Branch (788:3): [True: 74, False: 286]
  ------------------
  789|     74|			goto NO_CHARACTERS;
  790|       |
  791|      0|		default:
  ------------------
  |  Branch (791:3): [True: 0, False: 360]
  ------------------
  792|      0|			compileError(file, "unhandled test suboperand: \\x%02x", instruction);
  793|      0|			return 0;
  794|    360|		}
  795|    360|	}
  796|      0|	goto NO_CHARACTERS;
  797|    124|}
compileTranslationTable.c:compileSwap:
 1657|     13|		TranslationTableHeader **table) {
 1658|     13|	CharsString ruleChars;
 1659|     13|	CharsString ruleDots;
 1660|     13|	CharsString name;
 1661|     13|	CharsString matches;
 1662|     13|	CharsString replacements;
 1663|     13|	TranslationTableOffset ruleOffset;
 1664|     13|	int matchCount;
 1665|     13|	int swapCount;
 1666|     13|	if (!getToken(file, &name, "name operand")) return 0;
  ------------------
  |  Branch (1666:6): [True: 0, False: 13]
  ------------------
 1667|     13|	if (!getToken(file, &matches, "matches operand")) return 0;
  ------------------
  |  Branch (1667:6): [True: 1, False: 12]
  ------------------
 1668|     12|	if (!getToken(file, &replacements, "replacements operand")) return 0;
  ------------------
  |  Branch (1668:6): [True: 0, False: 12]
  ------------------
 1669|     12|	if (opcode == CTO_SwapCc || opcode == CTO_SwapCd) {
  ------------------
  |  Branch (1669:6): [True: 5, False: 7]
  |  Branch (1669:30): [True: 7, False: 0]
  ------------------
 1670|     12|		if (!parseChars(file, &ruleChars, &matches)) return 0;
  ------------------
  |  Branch (1670:7): [True: 0, False: 12]
  ------------------
 1671|     12|	} else {
 1672|      0|		if (!compileSwapDots(file, &matches, &ruleChars, 1)) return 0;
  ------------------
  |  Branch (1672:7): [True: 0, False: 0]
  ------------------
 1673|      0|	}
 1674|     12|	if (opcode == CTO_SwapCc) {
  ------------------
  |  Branch (1674:6): [True: 5, False: 7]
  ------------------
 1675|      5|		if (!parseChars(file, &ruleDots, &replacements)) return 0;
  ------------------
  |  Branch (1675:7): [True: 0, False: 5]
  ------------------
 1676|      7|	} else {
 1677|      7|		if (!compileSwapDots(file, &replacements, &ruleDots, 0)) return 0;
  ------------------
  |  Branch (1677:7): [True: 0, False: 7]
  ------------------
 1678|      7|	}
 1679|       |	/* A swap opcode substitutes each item of its second operand for the item in
 1680|       |	 * the corresponding place in its third operand, so the two operands must
 1681|       |	 * contain the same number of items. */
 1682|     12|	matchCount = (opcode == CTO_SwapDd) ? countSwapDots(&ruleChars) : ruleChars.length;
  ------------------
  |  Branch (1682:15): [True: 0, False: 12]
  ------------------
 1683|     12|	swapCount = (opcode == CTO_SwapCc) ? ruleDots.length : countSwapDots(&ruleDots);
  ------------------
  |  Branch (1683:14): [True: 5, False: 7]
  ------------------
 1684|     12|	if (matchCount != swapCount) {
  ------------------
  |  Branch (1684:6): [True: 0, False: 12]
  ------------------
 1685|      0|		compileError(file,
 1686|      0|				"%d items in the second operand but %d in the third: the operands of a "
 1687|      0|				"swap opcode must contain the same number of items",
 1688|      0|				matchCount, swapCount);
 1689|      0|		return 0;
 1690|      0|	}
 1691|     12|	if (!addRule(file, opcode, &ruleChars, &ruleDots, 0, 0, &ruleOffset, NULL, noback,
  ------------------
  |  Branch (1691:6): [True: 0, False: 12]
  ------------------
 1692|     12|				nofor, table))
 1693|      0|		return 0;
 1694|     12|	if (!addRuleName(file, &name, ruleOffset, *table)) return 0;
  ------------------
  |  Branch (1694:6): [True: 0, False: 12]
  ------------------
 1695|     12|	return 1;
 1696|     12|}
compileTranslationTable.c:compileSwapDots:
 1615|      7|		const FileInfo *file, CharsString *source, CharsString *dest, int singleCell) {
 1616|      7|	int k = 0;
 1617|      7|	int kk = 0;
 1618|      7|	CharsString dotsSource;
 1619|      7|	CharsString dotsDest;
 1620|      7|	dest->length = 0;
 1621|      7|	dotsSource.length = 0;
 1622|     21|	while (k <= source->length) {
  ------------------
  |  Branch (1622:9): [True: 14, False: 7]
  ------------------
 1623|     14|		if (source->chars[k] != ',' && k != source->length)
  ------------------
  |  Branch (1623:7): [True: 14, False: 0]
  |  Branch (1623:34): [True: 7, False: 7]
  ------------------
 1624|      7|			dotsSource.chars[dotsSource.length++] = source->chars[k];
 1625|      7|		else {
 1626|      7|			if (!parseDots(file, &dotsDest, &dotsSource)) return 0;
  ------------------
  |  Branch (1626:8): [True: 0, False: 7]
  ------------------
 1627|      7|			if (singleCell && dotsDest.length != 1) {
  ------------------
  |  Branch (1627:8): [True: 0, False: 7]
  |  Branch (1627:22): [True: 0, False: 0]
  ------------------
 1628|      0|				compileError(file,
 1629|      0|						"The second operand of swapdd must contain only single cells");
 1630|      0|				return 0;
 1631|      0|			}
 1632|      7|			dest->chars[dest->length++] = dotsDest.length + 1;
 1633|     14|			for (kk = 0; kk < dotsDest.length; kk++)
  ------------------
  |  Branch (1633:17): [True: 7, False: 7]
  ------------------
 1634|      7|				dest->chars[dest->length++] = dotsDest.chars[kk];
 1635|      7|			dotsSource.length = 0;
 1636|      7|		}
 1637|     14|		k++;
 1638|     14|	}
 1639|      7|	return 1;
 1640|      7|}
compileTranslationTable.c:countSwapDots:
 1645|      7|countSwapDots(const CharsString *dots) {
 1646|      7|	int k = 0;
 1647|      7|	int count = 0;
 1648|     14|	while (k < dots->length) {
  ------------------
  |  Branch (1648:9): [True: 7, False: 7]
  ------------------
 1649|      7|		k += dots->chars[k];
 1650|      7|		count++;
 1651|      7|	}
 1652|      7|	return count;
 1653|      7|}
compileTranslationTable.c:free_macro_list:
 2812|    138|free_macro_list(const MacroList *list) {
 2813|    138|	if (list) {
  ------------------
  |  Branch (2813:6): [True: 0, False: 138]
  ------------------
 2814|      0|		free_macro((Macro *)list->head);
 2815|      0|		free_macro_list((MacroList *)list->tail);
 2816|      0|		free((MacroList *)list);
 2817|      0|	}
 2818|    138|}
compileTranslationTable.c:setDefaults:
 4656|    125|setDefaults(TranslationTableHeader *table) {
 4657|    500|	for (int i = 0; i < 3; i++)
  ------------------
  |  Branch (4657:18): [True: 375, False: 125]
  ------------------
 4658|    375|		if (!table->emphRules[i][lenPhraseOffset])
  ------------------
  |  Branch (4658:7): [True: 375, False: 0]
  ------------------
 4659|    375|			table->emphRules[i][lenPhraseOffset] = 4;
 4660|    125|	if (table->numPasses == 0) table->numPasses = 1;
  ------------------
  |  Branch (4660:6): [True: 65, False: 60]
  ------------------
 4661|    125|	return 1;
 4662|    125|}
compileTranslationTable.c:freeTranslationTable:
 5013|    138|freeTranslationTable(TranslationTableHeader *t) {
 5014|    139|	for (int i = 0; i < MAX_EMPH_CLASSES && t->emphClassNames[i]; i++)
  ------------------
  |  |   82|    278|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  |  Branch (5014:18): [True: 139, False: 0]
  |  Branch (5014:42): [True: 1, False: 138]
  ------------------
 5015|      1|		free(t->emphClassNames[i]);
 5016|    276|	for (int i = 0; t->sourceFiles[i]; i++) free(t->sourceFiles[i]);
  ------------------
  |  Branch (5016:18): [True: 138, False: 138]
  ------------------
 5017|    138|	if (t->characterClasses) deallocateCharacterClasses(t);
  ------------------
  |  Branch (5017:6): [True: 4, False: 134]
  ------------------
 5018|    138|	if (t->ruleNames) deallocateRuleNames(t);
  ------------------
  |  Branch (5018:6): [True: 6, False: 132]
  ------------------
 5019|    138|	free(t);
 5020|    138|}
compileTranslationTable.c:deallocateRuleNames:
 1604|      6|deallocateRuleNames(TranslationTableHeader *table) {
 1605|      6|	RuleName **ruleName = &table->ruleNames;
 1606|     18|	while (*ruleName) {
  ------------------
  |  Branch (1606:9): [True: 12, False: 6]
  ------------------
 1607|     12|		RuleName *rn = *ruleName;
 1608|     12|		*ruleName = rn->next;
 1609|     12|		free(rn);
 1610|     12|	}
 1611|      6|}
compileTranslationTable.c:freeDisplayTable:
 5023|    138|freeDisplayTable(DisplayTableHeader *t) {
 5024|    138|	free(t);
 5025|    138|}
compileTranslationTable.c:compileString:
 4634|    138|		DisplayTableHeader **displayTable) {
 4635|       |	/* This function can be used to make changes to tables on the fly. */
 4636|    138|	int k;
 4637|    138|	FileInfo file;
 4638|    138|	if (inString == NULL) return 0;
  ------------------
  |  Branch (4638:6): [True: 0, False: 138]
  ------------------
 4639|    138|	memset(&file, 0, sizeof(file));
 4640|    138|	file.fileName = inString;
 4641|    138|	file.encoding = noEncoding;
 4642|    138|	file.lineNumber = 1;
 4643|    138|	file.status = 0;
 4644|    138|	file.linepos = 0;
 4645|  6.07k|	for (k = 0; k < MAXSTRING - 1 && inString[k]; k++) file.line[k] = inString[k];
  ------------------
  |  |   80|  6.07k|#define MAXSTRING 2048
  ------------------
  |  Branch (4645:14): [True: 6.07k, False: 0]
  |  Branch (4645:35): [True: 5.93k, False: 138]
  ------------------
 4646|    138|	file.line[k] = 0;
 4647|    138|	file.linelen = k;
 4648|    138|	if (table && *table && (*table)->finalized) {
  ------------------
  |  Branch (4648:6): [True: 138, False: 0]
  |  Branch (4648:15): [True: 138, False: 0]
  |  Branch (4648:25): [True: 0, False: 138]
  ------------------
 4649|      0|		compileError(&file, "Table is finalized");
 4650|      0|		return 0;
 4651|      0|	}
 4652|    138|	return compileRule(&file, table, displayTable, NULL, NULL);
 4653|    138|}

utils.c:isASCII:
  766|     18|isASCII(widechar c) {
  767|     18|	return (c >= 0X20) && (c < 0X7F);
  ------------------
  |  Branch (767:9): [True: 18, False: 0]
  |  Branch (767:24): [True: 18, False: 0]
  ------------------
  768|     18|}

lou_registerLogCallback:
   87|      1|lou_registerLogCallback(logcallback callback) {
   88|      1|	if (callback == NULL)
  ------------------
  |  Branch (88:6): [True: 0, False: 1]
  ------------------
   89|      0|		logCallbackFunction = defaultLogCallback;
   90|      1|	else
   91|      1|		logCallbackFunction = callback;
   92|      1|}
_lou_logMessage:
  168|   105k|_lou_logMessage(logLevels level, const char *format, ...) {
  169|   105k|	if (format == NULL) return;
  ------------------
  |  Branch (169:6): [True: 0, False: 105k]
  ------------------
  170|   105k|	if (level < getLogLevel()) return;
  ------------------
  |  Branch (170:6): [True: 157, False: 105k]
  ------------------
  171|   105k|	if (logCallbackFunction != NULL) {
  ------------------
  |  Branch (171:6): [True: 105k, False: 0]
  ------------------
  172|       |#ifdef _WIN32
  173|       |		double f = 2.3;	 // Needed to force VC++ runtime floating point support
  174|       |#endif
  175|   105k|		char *s;
  176|   105k|		size_t len;
  177|   105k|		va_list argp;
  178|   105k|		va_start(argp, format);
  179|   105k|		len = vsnprintf(0, 0, format, argp);
  180|   105k|		va_end(argp);
  181|   105k|		if ((s = malloc(len + 1)) != 0) {
  ------------------
  |  Branch (181:7): [True: 105k, False: 0]
  ------------------
  182|   105k|			va_start(argp, format);
  183|   105k|			vsnprintf(s, len + 1, format, argp);
  184|       |			va_end(argp);
  185|   105k|			logCallbackFunction(level, s);
  186|   105k|			free(s);
  187|   105k|		}
  188|   105k|	}
  189|   105k|}
lou_logEnd:
  230|    138|lou_logEnd(void) {
  231|    138|	if (logFile != NULL && logFile != stderr) fclose(logFile);
  ------------------
  |  Branch (231:6): [True: 0, False: 138]
  |  Branch (231:25): [True: 0, False: 0]
  ------------------
  232|       |	logFile = NULL;
  233|    138|}
logging.c:getLogLevel:
  157|   105k|getLogLevel() {
  158|       |	// if the loglevel was set before via an explicit API call or by querying the
  159|       |	// environment just use the cached value.
  160|   105k|	if (!logLevelSet) {
  ------------------
  |  Branch (160:6): [True: 1, False: 105k]
  ------------------
  161|      1|		getLogLevelFromEnvironment();
  162|      1|	}
  163|       |
  164|   105k|	return logLevel;
  165|   105k|}
logging.c:getLogLevelFromEnvironment:
  104|      1|getLogLevelFromEnvironment() {
  105|      1|	char *log_level_str = getenv("LOUIS_LOGLEVEL");
  106|      1|	if (log_level_str != NULL && log_level_str[0] != '\0') {
  ------------------
  |  Branch (106:6): [True: 0, False: 1]
  |  Branch (106:31): [True: 0, False: 0]
  ------------------
  107|       |		/* Log levels names are unique by their first character */
  108|      0|		switch (tolower(log_level_str[0])) {
  ------------------
  |  Branch (108:11): [True: 0, False: 0]
  |  Branch (108:11): [True: 0, False: 0]
  |  Branch (108:11): [Folded, False: 0]
  ------------------
  109|      0|		case 'a':
  ------------------
  |  Branch (109:3): [True: 0, False: 0]
  ------------------
  110|      0|			lou_setLogLevel(LOU_LOG_ALL);
  111|      0|			break;
  112|      0|		case 'd':
  ------------------
  |  Branch (112:3): [True: 0, False: 0]
  ------------------
  113|      0|			lou_setLogLevel(LOU_LOG_DEBUG);
  114|      0|			break;
  115|      0|		case 'i':
  ------------------
  |  Branch (115:3): [True: 0, False: 0]
  ------------------
  116|      0|			lou_setLogLevel(LOU_LOG_INFO);
  117|      0|			break;
  118|      0|		case 'w':
  ------------------
  |  Branch (118:3): [True: 0, False: 0]
  ------------------
  119|      0|			lou_setLogLevel(LOU_LOG_WARN);
  120|      0|			break;
  121|      0|		case 'e':
  ------------------
  |  Branch (121:3): [True: 0, False: 0]
  ------------------
  122|      0|			lou_setLogLevel(LOU_LOG_ERROR);
  123|      0|			break;
  124|      0|		case 'f':
  ------------------
  |  Branch (124:3): [True: 0, False: 0]
  ------------------
  125|      0|			lou_setLogLevel(LOU_LOG_FATAL);
  126|      0|			break;
  127|      0|		case 'o':
  ------------------
  |  Branch (127:3): [True: 0, False: 0]
  ------------------
  128|      0|			lou_setLogLevel(LOU_LOG_OFF);
  129|      0|			break;
  130|      0|		default:
  ------------------
  |  Branch (130:3): [True: 0, False: 0]
  ------------------
  131|      0|			lou_setLogLevel(LOU_LOG_INFO);
  132|      0|			_lou_logMessage(LOU_LOG_WARN,
  133|      0|					"Unknown log level set by LOUIS_LOGLEVEL environment variable: %s",
  134|      0|					log_level_str);
  135|      0|			break;
  136|      0|		}
  137|      0|	}
  138|      1|	logLevelSet = 1;  // set the flag even if the LOUIS_LOGLEVEL variable does not exist,
  139|       |					  // so that we don't check it again (we assume the variable does not
  140|       |					  // change during the process)
  141|      1|}

lou_backTranslateString:
  170|    116|		widechar *outbuf, int *outlen, formtype *typeform, char *spacing, int modex) {
  171|    116|	return lou_backTranslate(tableList, inbuf, inlen, outbuf, outlen, typeform, spacing,
  172|    116|			NULL, NULL, NULL, modex);
  173|    116|}
lou_backTranslate:
  178|    116|		int *inputPos, int *cursorPos, int modex) {
  179|    116|	return _lou_backTranslate(tableList, tableList, inbuf, inlen, outbuf, outlen,
  180|    116|			typeform, spacing, outputPos, inputPos, cursorPos, modex, NULL, NULL);
  181|    116|}
_lou_backTranslate:
  187|    116|		int mode, const TranslationTableRule **rules, int *rulesLen) {
  188|    116|	const TranslationTableHeader *table;
  189|    116|	const DisplayTableHeader *displayTable;
  190|    116|	InString input;
  191|    116|	OutString output;
  192|    116|	unsigned char *typebuf = NULL;
  193|       |	// posMapping contains position mapping info between the output of the current pass
  194|       |	// and the initial input. It is 1 longer than the (consumed) input. The values are
  195|       |	// monotonically increasing and can range between -1 and the output length. At the end
  196|       |	// the position info is passed to the user as an inputPos and outputPos array.
  197|       |	// inputPos has the length of the final output and has values ranging from 0 to
  198|       |	// inlen-1. outputPos has the length of the (consumed) initial input and has values
  199|       |	// ranging from 0 to outlen-1.
  200|    116|	int *posMapping = NULL;
  201|    116|	int *posMapping1;
  202|    116|	int *posMapping2;
  203|    116|	int *posMapping3;
  204|    116|	int cursorPosition;
  205|    116|	int cursorStatus;
  206|    116|	const TranslationTableRule **appliedRules;
  207|    116|	int maxAppliedRules;
  208|    116|	int appliedRulesCount;
  209|    116|	int k;
  210|    116|	int idx;
  211|    116|	if (tableList == NULL || inbuf == NULL || inlen == NULL || outbuf == NULL ||
  ------------------
  |  Branch (211:6): [True: 0, False: 116]
  |  Branch (211:27): [True: 0, False: 116]
  |  Branch (211:44): [True: 0, False: 116]
  |  Branch (211:61): [True: 0, False: 116]
  ------------------
  212|    116|			outlen == NULL)
  ------------------
  |  Branch (212:4): [True: 0, False: 116]
  ------------------
  213|      0|		return 0;
  214|    116|	if (displayTableList == NULL) displayTableList = tableList;
  ------------------
  |  Branch (214:6): [True: 0, False: 116]
  ------------------
  215|    116|	_lou_getTable(tableList, displayTableList, &table, &displayTable);
  216|    116|	if (table == NULL) return 0;
  ------------------
  |  Branch (216:6): [True: 0, False: 116]
  ------------------
  217|    116|	if (*inlen < 0 || *outlen < 0) return 0;
  ------------------
  |  Branch (217:6): [True: 0, False: 116]
  |  Branch (217:20): [True: 0, False: 116]
  ------------------
  218|       |
  219|    116|	if (!_lou_isValidMode(mode))
  ------------------
  |  Branch (219:6): [True: 0, False: 116]
  ------------------
  220|      0|		_lou_logMessage(LOU_LOG_ERROR, "Invalid mode parameter: %d", mode);
  221|       |
  222|    116|	if (!stringBufferPool) initStringBufferPool();
  ------------------
  |  Branch (222:6): [True: 1, False: 115]
  ------------------
  223|    464|	for (idx = 0; idx < stringBufferPool->size; idx++) releaseStringBuffer(idx);
  ------------------
  |  Branch (223:16): [True: 348, False: 116]
  ------------------
  224|    116|	{
  225|    116|		widechar *passbuf1;
  226|    116|		int srcmax;
  227|    116|		k = 0;
  228|   108k|		while (k < *inlen && inbuf[k]) k++;
  ------------------
  |  Branch (228:10): [True: 108k, False: 85]
  |  Branch (228:24): [True: 108k, False: 31]
  ------------------
  229|    116|		srcmax = k;
  230|    116|		idx = getStringBuffer(srcmax);
  231|    116|		passbuf1 = stringBufferPool->buffers[idx];
  232|   108k|		for (k = 0; k < srcmax; k++)
  ------------------
  |  Branch (232:15): [True: 108k, False: 116]
  ------------------
  233|   108k|			if ((mode & dotsIO))
  ------------------
  |  Branch (233:8): [True: 0, False: 108k]
  ------------------
  234|      0|				if ((mode & ucBrl))
  ------------------
  |  Branch (234:9): [True: 0, False: 0]
  ------------------
  235|      0|					passbuf1[k] = (inbuf[k] & 0xff) | LOU_DOTS;
  236|      0|				else
  237|      0|					passbuf1[k] = inbuf[k] | LOU_DOTS;
  238|   108k|			else
  239|   108k|				passbuf1[k] = _lou_getDotsForChar(inbuf[k], displayTable);
  240|    116|		passbuf1[srcmax] = _lou_getDotsForChar(' ', displayTable);
  241|    116|		input = (InString){ .chars = passbuf1, .length = srcmax, .bufferIndex = idx };
  242|    116|	}
  243|    116|	idx = getStringBuffer(*outlen);
  244|    116|	output = (OutString){ .chars = stringBufferPool->buffers[idx],
  245|    116|		.maxlength = *outlen,
  246|    116|		.length = 0,
  247|    116|		.bufferIndex = idx };
  248|    116|	typebuf = (unsigned char *)typeform;
  249|    116|	if (spacing != NULL)
  ------------------
  |  Branch (249:6): [True: 0, False: 116]
  ------------------
  250|      0|		_lou_logMessage(LOU_LOG_WARN,
  251|      0|				"warning: the spacing parameter is deprecated and ignored; pass NULL");
  252|    116|	if (outputPos != NULL)
  ------------------
  |  Branch (252:6): [True: 0, False: 116]
  ------------------
  253|      0|		for (k = 0; k < input.length; k++) outputPos[k] = -1;
  ------------------
  |  Branch (253:15): [True: 0, False: 0]
  ------------------
  254|    116|	if (cursorPos != NULL)
  ------------------
  |  Branch (254:6): [True: 0, False: 116]
  ------------------
  255|      0|		cursorPosition = *cursorPos;
  256|    116|	else
  257|    116|		cursorPosition = -1;
  258|    116|	cursorStatus = 0;
  259|    116|	if (typebuf != NULL) memset(typebuf, 0, *outlen * sizeof(formtype));
  ------------------
  |  Branch (259:6): [True: 0, False: 116]
  ------------------
  260|    116|	if (!(posMapping1 = _lou_allocMem(alloc_posMapping1, 0, input.length, *outlen)))
  ------------------
  |  Branch (260:6): [True: 0, False: 116]
  ------------------
  261|      0|		return 0;
  262|    116|	if (table->numPasses > 1 || table->corrections) {
  ------------------
  |  Branch (262:6): [True: 57, False: 59]
  |  Branch (262:30): [True: 11, False: 48]
  ------------------
  263|     68|		if (!(posMapping2 = _lou_allocMem(alloc_posMapping2, 0, input.length, *outlen)))
  ------------------
  |  Branch (263:7): [True: 0, False: 68]
  ------------------
  264|      0|			return 0;
  265|     68|		if (!(posMapping3 = _lou_allocMem(alloc_posMapping3, 0, input.length, *outlen)))
  ------------------
  |  Branch (265:7): [True: 0, False: 68]
  ------------------
  266|      0|			return 0;
  267|     68|	}
  268|    116|	appliedRulesCount = 0;
  269|    116|	if (rules != NULL && rulesLen != NULL) {
  ------------------
  |  Branch (269:6): [True: 0, False: 116]
  |  Branch (269:23): [True: 0, False: 0]
  ------------------
  270|      0|		appliedRules = rules;
  271|      0|		maxAppliedRules = *rulesLen;
  272|    116|	} else {
  273|    116|		appliedRules = NULL;
  274|    116|		maxAppliedRules = 0;
  275|    116|	}
  276|       |
  277|    116|	posMapping = posMapping1;
  278|    116|	int currentPass = table->numPasses;
  279|    116|	int lastPass = table->corrections ? 0 : 1;
  ------------------
  |  Branch (279:17): [True: 20, False: 96]
  ------------------
  280|    116|	int *passPosMapping = posMapping;
  281|    275|	while (1) {
  ------------------
  |  Branch (281:9): [True: 275, Folded]
  ------------------
  282|    275|		int realInlen;
  283|    275|		switch (currentPass) {
  284|    116|		case 1:
  ------------------
  |  Branch (284:3): [True: 116, False: 159]
  ------------------
  285|    116|			if (!backTranslateString(table, mode, currentPass, &input, &output, typebuf,
  ------------------
  |  Branch (285:8): [True: 0, False: 116]
  ------------------
  286|    116|						passPosMapping, &realInlen, &cursorPosition, &cursorStatus,
  287|    116|						appliedRules, &appliedRulesCount, maxAppliedRules))
  288|      0|				return 0;
  289|    116|			break;
  290|    116|		case 0:
  ------------------
  |  Branch (290:3): [True: 20, False: 255]
  ------------------
  291|     20|			if (!makeCorrections(table, mode, currentPass, &input, &output,
  ------------------
  |  Branch (291:8): [True: 0, False: 20]
  ------------------
  292|     20|						passPosMapping, &realInlen, &cursorPosition, &cursorStatus,
  293|     20|						appliedRules, &appliedRulesCount, maxAppliedRules))
  294|      0|				return 0;
  295|     20|			break;
  296|    139|		default:
  ------------------
  |  Branch (296:3): [True: 139, False: 136]
  ------------------
  297|    139|			if (!translatePass(table, mode, currentPass, &input, &output, passPosMapping,
  ------------------
  |  Branch (297:8): [True: 0, False: 139]
  ------------------
  298|    139|						&realInlen, &cursorPosition, &cursorStatus, appliedRules,
  299|    139|						&appliedRulesCount, maxAppliedRules))
  300|      0|				return 0;
  301|    139|			break;
  302|    275|		}
  303|       |
  304|    275|		currentPass--;
  305|    275|		passPosMapping[realInlen] = output.length;
  306|    275|		if (passPosMapping == posMapping) {
  ------------------
  |  Branch (306:7): [True: 116, False: 159]
  ------------------
  307|    116|			passPosMapping = posMapping2;
  308|    116|			if (realInlen < input.length) *inlen = realInlen;
  ------------------
  |  Branch (308:8): [True: 16, False: 100]
  ------------------
  309|    159|		} else {
  310|    159|			int *prevPosMapping = posMapping3;
  311|    159|			memcpy((int *)prevPosMapping, posMapping, (*inlen + 1) * sizeof(int));
  312|  81.9k|			for (k = 0; k <= *inlen; k++) {
  ------------------
  |  Branch (312:16): [True: 81.8k, False: 120]
  ------------------
  313|  81.8k|				if (prevPosMapping[k] < 0)
  ------------------
  |  Branch (313:9): [True: 1.35k, False: 80.4k]
  ------------------
  314|  1.35k|					posMapping[k] = passPosMapping[0];
  315|  80.4k|				else if (prevPosMapping[k] < realInlen)
  ------------------
  |  Branch (315:14): [True: 80.3k, False: 166]
  ------------------
  316|  80.3k|					posMapping[k] = passPosMapping[prevPosMapping[k]];
  317|    166|				else if (prevPosMapping[k] == realInlen) {
  ------------------
  |  Branch (317:14): [True: 131, False: 35]
  ------------------
  318|       |					// outputPos is allowed to point to right after the last output
  319|       |					// character if the input character was deleted
  320|    131|					if (realInlen < input.length) {
  ------------------
  |  Branch (320:10): [True: 4, False: 127]
  ------------------
  321|       |						// however if there was back-tracking, we know that this is not
  322|       |						// the case
  323|      4|						*inlen = k;
  324|      4|						posMapping[k] = output.length;
  325|      4|						break;
  326|      4|					} else
  327|    127|						posMapping[k] = passPosMapping[prevPosMapping[k]];
  328|    131|				} else {
  329|       |					// this means there has been back-tracking to a point within a segment
  330|       |					// that was atomic in the previous pass
  331|       |					// it is not clear what should happen in this case
  332|     35|					*inlen = k;
  333|     35|					posMapping[k] = output.length;
  334|     35|					break;
  335|     35|				}
  336|  81.8k|			}
  337|    159|		}
  338|    275|		if (currentPass >= lastPass) {
  ------------------
  |  Branch (338:7): [True: 159, False: 116]
  ------------------
  339|    159|			releaseStringBuffer(input.bufferIndex);
  340|    159|			input = (InString){ .chars = output.chars,
  341|    159|				.length = output.length,
  342|    159|				.bufferIndex = output.bufferIndex };
  343|    159|			idx = getStringBuffer(*outlen);
  344|    159|			output = (OutString){ .chars = stringBufferPool->buffers[idx],
  345|    159|				.maxlength = *outlen,
  346|    159|				.length = 0,
  347|    159|				.bufferIndex = idx };
  348|    159|			continue;
  349|    159|		}
  350|    116|		break;
  351|    275|	}
  352|  1.30M|	for (k = 0; k < output.length; k++) outbuf[k] = output.chars[k];
  ------------------
  |  Branch (352:14): [True: 1.30M, False: 116]
  ------------------
  353|    116|	*outlen = output.length;
  354|    116|	if (inputPos != NULL) {
  ------------------
  |  Branch (354:6): [True: 0, False: 116]
  ------------------
  355|      0|		int inpos = -1;
  356|      0|		int outpos = -1;
  357|      0|		for (k = 0; k < *inlen; k++)
  ------------------
  |  Branch (357:15): [True: 0, False: 0]
  ------------------
  358|      0|			if (posMapping[k] > outpos) {
  ------------------
  |  Branch (358:8): [True: 0, False: 0]
  ------------------
  359|      0|				while (outpos < posMapping[k]) {
  ------------------
  |  Branch (359:12): [True: 0, False: 0]
  ------------------
  360|      0|					if (outpos >= 0 && outpos < *outlen)
  ------------------
  |  Branch (360:10): [True: 0, False: 0]
  |  Branch (360:25): [True: 0, False: 0]
  ------------------
  361|      0|						inputPos[outpos] = inpos < 0 ? 0 : inpos;
  ------------------
  |  Branch (361:26): [True: 0, False: 0]
  ------------------
  362|      0|					outpos++;
  363|      0|				}
  364|      0|				inpos = k;
  365|      0|			}
  366|      0|		if (outpos < 0) outpos = 0;
  ------------------
  |  Branch (366:7): [True: 0, False: 0]
  ------------------
  367|      0|		while (outpos < *outlen) inputPos[outpos++] = inpos;
  ------------------
  |  Branch (367:10): [True: 0, False: 0]
  ------------------
  368|      0|	}
  369|    116|	if (outputPos != NULL) {
  ------------------
  |  Branch (369:6): [True: 0, False: 116]
  ------------------
  370|      0|		for (k = 0; k < *inlen; k++)
  ------------------
  |  Branch (370:15): [True: 0, False: 0]
  ------------------
  371|      0|			if (posMapping[k] < 0)
  ------------------
  |  Branch (371:8): [True: 0, False: 0]
  ------------------
  372|      0|				outputPos[k] = 0;
  373|      0|			else if (posMapping[k] > *outlen - 1)
  ------------------
  |  Branch (373:13): [True: 0, False: 0]
  ------------------
  374|      0|				outputPos[k] = *outlen - 1;
  375|      0|			else
  376|      0|				outputPos[k] = posMapping[k];
  377|      0|	}
  378|    116|	if (cursorPos != NULL && *cursorPos != -1) {
  ------------------
  |  Branch (378:6): [True: 0, False: 116]
  |  Branch (378:27): [True: 0, False: 0]
  ------------------
  379|      0|		if (outputPos != NULL)
  ------------------
  |  Branch (379:7): [True: 0, False: 0]
  ------------------
  380|      0|			*cursorPos = outputPos[*cursorPos];
  381|      0|		else
  382|      0|			*cursorPos = cursorPosition;
  383|      0|	}
  384|    116|	if (rulesLen != NULL) *rulesLen = appliedRulesCount;
  ------------------
  |  Branch (384:6): [True: 0, False: 116]
  ------------------
  385|    116|	return 1;
  386|    116|}
lou_backTranslateString.c:initStringBufferPool:
   79|      1|initStringBufferPool() {
   80|      1|	static widechar *stringBuffers[MAXPASSBUF] = { NULL };
   81|      1|	static int stringBuffersInUse[MAXPASSBUF] = { 0 };
   82|      1|	StringBufferPool *pool = malloc(sizeof(StringBufferPool));
   83|      1|	pool->size = MAXPASSBUF;
  ------------------
  |  |  507|      1|#define MAXPASSBUF 3
  ------------------
   84|      1|	pool->buffers = stringBuffers;
   85|      1|	pool->inUse = stringBuffersInUse;
   86|      1|	pool->alloc = &allocStringBuffer;
   87|       |	pool->free = NULL;
   88|      1|	stringBufferPool = pool;
   89|      1|}
lou_backTranslateString.c:allocStringBuffer:
   72|    391|allocStringBuffer(int index, int length) {
   73|    391|	return _lou_allocMem(alloc_passbuf, index, 0, length);
   74|    391|}
lou_backTranslateString.c:releaseStringBuffer:
  109|    507|releaseStringBuffer(int idx) {
  110|    507|	if (!stringBufferPool) {
  ------------------
  |  Branch (110:6): [True: 0, False: 507]
  ------------------
  111|      0|		_lou_logMessage(LOU_LOG_ERROR,
  112|      0|				"Attempt to free string buffer prior to initialization of pool");
  113|      0|		return 0;
  114|      0|	}
  115|       |
  116|    507|	if (idx >= 0 && idx < stringBufferPool->size) {
  ------------------
  |  Branch (116:6): [True: 507, False: 0]
  |  Branch (116:18): [True: 507, False: 0]
  ------------------
  117|    507|		int inUse = stringBufferPool->inUse[idx];
  118|    507|		if (inUse && stringBufferPool->free)
  ------------------
  |  Branch (118:7): [True: 389, False: 118]
  |  Branch (118:16): [True: 0, False: 389]
  ------------------
  119|      0|			stringBufferPool->free(stringBufferPool->buffers[idx]);
  120|    507|		stringBufferPool->inUse[idx] = 0;
  121|    507|		return inUse;
  122|    507|	}
  123|      0|	return 0;
  124|    507|}
lou_backTranslateString.c:getStringBuffer:
   92|    391|getStringBuffer(int length) {
   93|    391|	int i;
   94|       |
   95|    391|	if (!stringBufferPool) initStringBufferPool();
  ------------------
  |  Branch (95:6): [True: 0, False: 391]
  ------------------
   96|       |
   97|    564|	for (i = 0; i < stringBufferPool->size; i++) {
  ------------------
  |  Branch (97:14): [True: 564, False: 0]
  ------------------
   98|    564|		if (!stringBufferPool->inUse[i]) {
  ------------------
  |  Branch (98:7): [True: 391, False: 173]
  ------------------
   99|    391|			stringBufferPool->buffers[i] = stringBufferPool->alloc(i, length);
  100|    391|			stringBufferPool->inUse[i] = 1;
  101|    391|			return i;
  102|    391|		}
  103|    564|	}
  104|      0|	_lou_outOfMemory();
  105|      0|	return -1;
  106|    391|}
lou_backTranslateString.c:makeCorrections:
 1151|     20|		int *appliedRulesCount, int maxAppliedRules) {
 1152|     20|	int pos;
 1153|     20|	int posIncremented = 1;
 1154|     20|	TranslationContext ctx = { .nextUpper = 0,
 1155|     20|		.allUpper = 0,
 1156|     20|		.allUpperPhrase = 0,
 1157|     20|		.itsANumber = 0,
 1158|     20|		.noContractMode = NO_CONTRACT_OFF };
  ------------------
  |  |   54|     20|#define NO_CONTRACT_OFF 0	 /* not in nocontractsign scope */
  ------------------
 1159|     20|	if (!table->corrections) return 1;
  ------------------
  |  Branch (1159:6): [True: 0, False: 20]
  ------------------
 1160|     20|	pos = 0;
 1161|     20|	output->length = 0;
 1162|     20|	_lou_resetPassVariables();
 1163|   147k|	while (pos < input->length) {
  ------------------
  |  Branch (1163:9): [True: 147k, False: 6]
  ------------------
 1164|   147k|		int posBefore = pos;
 1165|   147k|		TranslationTableOpcode currentOpcode;
 1166|   147k|		const TranslationTableRule *currentRule; /* pointer to current rule in table */
 1167|   147k|		const widechar *passInstructions;
 1168|   147k|		int passIC; /* Instruction counter */
 1169|   147k|		PassRuleMatch patternMatch;
 1170|   147k|		int length = input->length - pos;
 1171|   147k|		const TranslationTableCharacter *character = getChar(input->chars[pos], table);
 1172|   147k|		const TranslationTableCharacter *character2;
 1173|   147k|		int tryThis = 0;
 1174|   147k|		if (!(posIncremented &&
  ------------------
  |  Branch (1174:9): [True: 137k, False: 10.2k]
  ------------------
 1175|   137k|					findBackPassRule(table, pos, currentPass, input, &currentOpcode,
  ------------------
  |  Branch (1175:6): [True: 24.0k, False: 112k]
  ------------------
 1176|   137k|							&currentRule, &passInstructions, &passIC, &patternMatch)))
 1177|   493k|			while (tryThis < 3) {
  ------------------
  |  Branch (1177:11): [True: 369k, False: 123k]
  ------------------
 1178|   369k|				TranslationTableOffset ruleOffset = 0;
 1179|   369k|				unsigned long int makeHash = 0;
 1180|   369k|				switch (tryThis) {
  ------------------
  |  Branch (1180:13): [True: 369k, False: 0]
  ------------------
 1181|   123k|				case 0:
  ------------------
  |  Branch (1181:5): [True: 123k, False: 246k]
  ------------------
 1182|   123k|					if (!(length >= 2)) break;
  ------------------
  |  Branch (1182:10): [True: 6, False: 123k]
  ------------------
 1183|   123k|					makeHash = (unsigned long int)toLowercase(table, character) << 8;
 1184|   123k|					character2 = getChar(input->chars[pos + 1], table);
 1185|   123k|					makeHash += (unsigned long int)toLowercase(table, character2);
 1186|   123k|					makeHash %= HASHNUM;
  ------------------
  |  |   77|   123k|#define HASHNUM 1123
  ------------------
 1187|   123k|					ruleOffset = table->backRules[makeHash];
 1188|   123k|					break;
 1189|   123k|				case 1:
  ------------------
  |  Branch (1189:5): [True: 123k, False: 246k]
  ------------------
 1190|   123k|					if (!(length >= 1)) break;
  ------------------
  |  Branch (1190:10): [True: 0, False: 123k]
  ------------------
 1191|   123k|					length = 1;
 1192|   123k|					ruleOffset = character->otherRules;
 1193|   123k|					break;
 1194|   123k|				case 2: /* No rule found */
  ------------------
  |  Branch (1194:5): [True: 123k, False: 246k]
  ------------------
 1195|   123k|					currentOpcode = CTO_Always;
 1196|   123k|					ruleOffset = 0;
 1197|   123k|					break;
 1198|   369k|				}
 1199|   480k|				while (ruleOffset) {
  ------------------
  |  Branch (1199:12): [True: 110k, False: 369k]
  ------------------
 1200|   110k|					currentRule = (TranslationTableRule *)&table->ruleArea[ruleOffset];
 1201|   110k|					currentOpcode = currentRule->opcode;
 1202|   110k|					int currentCharslen = currentRule->charslen;
 1203|   110k|					if (tryThis == 1 ||
  ------------------
  |  Branch (1203:10): [True: 66.2k, False: 44.0k]
  ------------------
 1204|  44.0k|							(currentCharslen <= length &&
  ------------------
  |  Branch (1204:9): [True: 44.0k, False: 3]
  ------------------
 1205|  44.0k|									compareChars(&currentRule->charsdots[0],
  ------------------
  |  Branch (1205:10): [True: 0, False: 44.0k]
  ------------------
 1206|  44.0k|											&input->chars[pos], currentCharslen,
 1207|  66.2k|											table))) {
 1208|  66.2k|						if (currentOpcode == CTO_Correct &&
  ------------------
  |  Branch (1208:11): [True: 0, False: 66.2k]
  ------------------
 1209|      0|								back_passDoTest(table, pos, input, currentOpcode,
  ------------------
  |  Branch (1209:9): [True: 0, False: 0]
  ------------------
 1210|      0|										currentRule, &passInstructions, &passIC,
 1211|      0|										&patternMatch)) {
 1212|      0|							tryThis = 4;
 1213|      0|							break;
 1214|      0|						}
 1215|  66.2k|					}
 1216|   110k|					ruleOffset = currentRule->dotsnext;
 1217|   110k|				}
 1218|   369k|				tryThis++;
 1219|   369k|			}
 1220|   147k|		switch (currentOpcode) {
 1221|   123k|		case CTO_Always:
  ------------------
  |  Branch (1221:3): [True: 123k, False: 24.0k]
  ------------------
 1222|   123k|			if (output->length >= output->maxlength) goto failure;
  ------------------
  |  Branch (1222:8): [True: 3, False: 123k]
  ------------------
 1223|   123k|			posMapping[pos] = output->length;
 1224|   123k|			output->chars[(output->length)++] = input->chars[pos++];
 1225|   123k|			break;
 1226|  24.0k|		case CTO_Correct:
  ------------------
  |  Branch (1226:3): [True: 24.0k, False: 123k]
  ------------------
 1227|  24.0k|			if (appliedRules != NULL && *appliedRulesCount < maxAppliedRules)
  ------------------
  |  Branch (1227:8): [True: 0, False: 24.0k]
  |  Branch (1227:32): [True: 0, False: 0]
  ------------------
 1228|      0|				appliedRules[(*appliedRulesCount)++] = currentRule;
 1229|  24.0k|			if (!back_passDoAction(table, &pos, mode, input, output, posMapping,
  ------------------
  |  Branch (1229:8): [True: 11, False: 24.0k]
  ------------------
 1230|  24.0k|						cursorPosition, cursorStatus, &ctx, currentOpcode, currentRule,
 1231|  24.0k|						passInstructions, passIC, patternMatch))
 1232|     11|				goto failure;
 1233|  24.0k|			break;
 1234|  24.0k|		default:
  ------------------
  |  Branch (1234:3): [True: 0, False: 147k]
  ------------------
 1235|      0|			break;
 1236|   147k|		}
 1237|   147k|		posIncremented = pos > posBefore;
 1238|   147k|	}
 1239|     20|failure:
 1240|     20|	*realInlen = pos;
 1241|     20|	return 1;
 1242|     20|}
lou_backTranslateString.c:getChar:
  389|   141M|getChar(widechar c, const TranslationTableHeader *table) {
  390|   141M|	static TranslationTableCharacter notFound = { NULL, -1, 0, 0, 0, CTC_Space, 0, 0, 32,
  391|   141M|		0, 0 };
  392|   141M|	unsigned long int makeHash = _lou_charHash(c);
  393|   141M|	TranslationTableOffset bucket = table->characters[makeHash];
  394|   141M|	while (bucket) {
  ------------------
  |  Branch (394:9): [True: 140M, False: 416k]
  ------------------
  395|   140M|		TranslationTableCharacter *character =
  396|   140M|				(TranslationTableCharacter *)&table->ruleArea[bucket];
  397|   140M|		if (character->value == c) return character;
  ------------------
  |  Branch (397:7): [True: 140M, False: 0]
  ------------------
  398|      0|		bucket = character->next;
  399|      0|	}
  400|   416k|	notFound.value = c;
  401|   416k|	return &notFound;
  402|   141M|}
lou_backTranslateString.c:findBackPassRule:
  685|  2.92M|		int *passIC, PassRuleMatch *match) {
  686|  2.92M|	TranslationTableOffset ruleOffset;
  687|  2.92M|	ruleOffset = table->backPassRules[currentPass];
  688|       |
  689|  3.43M|	while (ruleOffset) {
  ------------------
  |  Branch (689:9): [True: 1.15M, False: 2.27M]
  ------------------
  690|  1.15M|		*currentRule = (TranslationTableRule *)&table->ruleArea[ruleOffset];
  691|  1.15M|		*currentOpcode = (*currentRule)->opcode;
  692|       |
  693|  1.15M|		switch (*currentOpcode) {
  694|   137k|		case CTO_Correct:
  ------------------
  |  Branch (694:3): [True: 137k, False: 1.01M]
  ------------------
  695|   137k|			if (currentPass != 0) goto NEXT_RULE;
  ------------------
  |  Branch (695:8): [True: 0, False: 137k]
  ------------------
  696|   137k|			break;
  697|   229k|		case CTO_Context:
  ------------------
  |  Branch (697:3): [True: 229k, False: 926k]
  ------------------
  698|   229k|			if (currentPass != 1) goto NEXT_RULE;
  ------------------
  |  Branch (698:8): [True: 0, False: 229k]
  ------------------
  699|   229k|			break;
  700|   229k|		case CTO_Pass2:
  ------------------
  |  Branch (700:3): [True: 109k, False: 1.04M]
  ------------------
  701|   109k|			if (currentPass != 2) goto NEXT_RULE;
  ------------------
  |  Branch (701:8): [True: 0, False: 109k]
  ------------------
  702|   109k|			break;
  703|   229k|		case CTO_Pass3:
  ------------------
  |  Branch (703:3): [True: 229k, False: 925k]
  ------------------
  704|   229k|			if (currentPass != 3) goto NEXT_RULE;
  ------------------
  |  Branch (704:8): [True: 0, False: 229k]
  ------------------
  705|   229k|			break;
  706|   449k|		case CTO_Pass4:
  ------------------
  |  Branch (706:3): [True: 449k, False: 705k]
  ------------------
  707|   449k|			if (currentPass != 4) goto NEXT_RULE;
  ------------------
  |  Branch (707:8): [True: 0, False: 449k]
  ------------------
  708|   449k|			break;
  709|   449k|		default:
  ------------------
  |  Branch (709:3): [True: 0, False: 1.15M]
  ------------------
  710|      0|			goto NEXT_RULE;
  711|  1.15M|		}
  712|       |
  713|  1.15M|		if (back_passDoTest(table, pos, input, *currentOpcode, *currentRule,
  ------------------
  |  Branch (713:7): [True: 651k, False: 504k]
  ------------------
  714|  1.15M|					passInstructions, passIC, match))
  715|   651k|			return 1;
  716|       |
  717|   504k|	NEXT_RULE:
  718|   504k|		ruleOffset = (*currentRule)->dotsnext;
  719|   504k|	}
  720|       |
  721|  2.27M|	return 0;
  722|  2.92M|}
lou_backTranslateString.c:toLowercase:
 1001|   334k|		const TranslationTableHeader *table, const TranslationTableCharacter *character) {
 1002|   334k|	if (character->mode & CTC_UpperCase) {
  ------------------
  |  Branch (1002:6): [True: 0, False: 334k]
  ------------------
 1003|      0|		const TranslationTableCharacter *c = character;
 1004|      0|		if (c->basechar) c = (TranslationTableCharacter *)&table->ruleArea[c->basechar];
  ------------------
  |  Branch (1004:7): [True: 0, False: 0]
  ------------------
 1005|      0|		while (1) {
  ------------------
  |  Branch (1005:10): [True: 0, Folded]
  ------------------
 1006|      0|			if ((c->mode & (character->mode & ~CTC_UpperCase)) ==
  ------------------
  |  Branch (1006:8): [True: 0, False: 0]
  ------------------
 1007|      0|					(character->mode & ~CTC_UpperCase))
 1008|      0|				return c->value;
 1009|      0|			if (!c->linked) break;
  ------------------
  |  Branch (1009:8): [True: 0, False: 0]
  ------------------
 1010|      0|			c = (TranslationTableCharacter *)&table->ruleArea[c->linked];
 1011|      0|		}
 1012|      0|	}
 1013|   334k|	return character->value;
 1014|   334k|}
lou_backTranslateString.c:compareChars:
 1137|  44.0k|		const TranslationTableHeader *table) {
 1138|  44.0k|	int k;
 1139|  44.0k|	if (!count) return 0;
  ------------------
  |  Branch (1139:6): [True: 14, False: 44.0k]
  ------------------
 1140|  44.0k|	for (k = 0; k < count; k++)
  ------------------
  |  Branch (1140:14): [True: 44.0k, False: 0]
  ------------------
 1141|  44.0k|		if (toLowercase(table, getChar(address1[k], table)) !=
  ------------------
  |  Branch (1141:7): [True: 44.0k, False: 0]
  ------------------
 1142|  44.0k|				toLowercase(table, getChar(address2[k], table)))
 1143|  44.0k|			return 0;
 1144|      0|	return 1;
 1145|  44.0k|}
lou_backTranslateString.c:back_passDoTest:
 1678|  1.15M|		const widechar **passInstructions, int *passIC, PassRuleMatch *match) {
 1679|  1.15M|	int k;
 1680|  1.15M|	int m;
 1681|  1.15M|	int notOperator = 0;
 1682|  1.15M|	TranslationTableCharacterAttributes attributes;
 1683|  1.15M|	*passInstructions = &currentRule->charsdots[currentRule->charslen];
 1684|  1.15M|	*passIC = 0;
 1685|  1.15M|	match->startMatch = match->endMatch = pos;
 1686|  1.15M|	match->startReplace = -1;
 1687|  1.15M|	if (currentOpcode == CTO_Correct)
  ------------------
  |  Branch (1687:6): [True: 137k, False: 1.01M]
  ------------------
 1688|   137k|		m = 0;
 1689|  1.01M|	else
 1690|  1.01M|		m = 1;
 1691|  4.30M|	while (*passIC < currentRule->dotslen) {
  ------------------
  |  Branch (1691:9): [True: 4.30M, False: 0]
  ------------------
 1692|  4.30M|		int itsTrue = 1;
 1693|  4.30M|		if (pos > input->length) return 0;
  ------------------
  |  Branch (1693:7): [True: 0, False: 4.30M]
  ------------------
 1694|  4.30M|		switch ((*passInstructions)[*passIC]) {
 1695|   131k|		case pass_first:
  ------------------
  |  Branch (1695:3): [True: 131k, False: 4.17M]
  ------------------
 1696|   131k|			if (pos != 0) itsTrue = 0;
  ------------------
  |  Branch (1696:8): [True: 98.7k, False: 32.7k]
  ------------------
 1697|   131k|			(*passIC)++;
 1698|   131k|			break;
 1699|   125k|		case pass_last:
  ------------------
  |  Branch (1699:3): [True: 125k, False: 4.18M]
  ------------------
 1700|   125k|			if (pos != input->length) itsTrue = 0;
  ------------------
  |  Branch (1700:8): [True: 77.3k, False: 48.4k]
  ------------------
 1701|   125k|			(*passIC)++;
 1702|   125k|			break;
 1703|  2.30M|		case pass_lookback:
  ------------------
  |  Branch (1703:3): [True: 2.30M, False: 2.00M]
  ------------------
 1704|  2.30M|			pos -= (*passInstructions)[*passIC + 1];
 1705|  2.30M|			if (pos < 0) {
  ------------------
  |  Branch (1705:8): [True: 595k, False: 1.70M]
  ------------------
 1706|   595k|				pos = 0;
 1707|   595k|				itsTrue = 0;
 1708|   595k|			}
 1709|  2.30M|			*passIC += 2;
 1710|  2.30M|			break;
 1711|   302k|		case pass_not:
  ------------------
  |  Branch (1711:3): [True: 302k, False: 4.00M]
  ------------------
 1712|   302k|			notOperator = !notOperator;
 1713|   302k|			(*passIC)++;
 1714|   302k|			continue;
 1715|      0|		case pass_string:
  ------------------
  |  Branch (1715:3): [True: 0, False: 4.30M]
  ------------------
 1716|  24.2k|		case pass_dots:
  ------------------
  |  Branch (1716:3): [True: 24.2k, False: 4.28M]
  ------------------
 1717|  24.2k|			itsTrue = matchCurrentInput(input, pos, *passInstructions, *passIC);
 1718|  24.2k|			pos += (*passInstructions)[*passIC + 1];
 1719|  24.2k|			*passIC += (*passInstructions)[*passIC + 1] + 2;
 1720|  24.2k|			break;
 1721|   249k|		case pass_startReplace:
  ------------------
  |  Branch (1721:3): [True: 249k, False: 4.05M]
  ------------------
 1722|   249k|			match->startReplace = pos;
 1723|   249k|			(*passIC)++;
 1724|   249k|			break;
 1725|   233k|		case pass_endReplace:
  ------------------
  |  Branch (1725:3): [True: 233k, False: 4.07M]
  ------------------
 1726|   233k|			match->endReplace = pos;
 1727|   233k|			(*passIC)++;
 1728|   233k|			break;
 1729|   285k|		case pass_attributes:
  ------------------
  |  Branch (1729:3): [True: 285k, False: 4.02M]
  ------------------
 1730|   285k|			attributes = (*passInstructions)[*passIC + 1];
 1731|   285k|			attributes <<= 16;
 1732|   285k|			attributes |= (*passInstructions)[*passIC + 2];
 1733|   285k|			attributes <<= 16;
 1734|   285k|			attributes |= (*passInstructions)[*passIC + 3];
 1735|   285k|			attributes <<= 16;
 1736|   285k|			attributes |= (*passInstructions)[*passIC + 4];
 1737|   583k|			for (k = 0; k < (*passInstructions)[*passIC + 5]; k++) {
  ------------------
  |  Branch (1737:16): [True: 314k, False: 268k]
  ------------------
 1738|   314k|				if (pos >= input->length) {
  ------------------
  |  Branch (1738:9): [True: 0, False: 314k]
  ------------------
 1739|      0|					itsTrue = 0;
 1740|      0|					break;
 1741|      0|				}
 1742|   314k|				if (!((m ? getDots(input->chars[pos], table)
  ------------------
  |  Branch (1742:9): [True: 16.3k, False: 298k]
  |  Branch (1742:12): [True: 211k, False: 102k]
  ------------------
 1743|   314k|						 : getChar(input->chars[pos], table))
 1744|   314k|									->attributes &
 1745|   314k|							attributes)) {
 1746|  16.3k|					itsTrue = 0;
 1747|  16.3k|					break;
 1748|  16.3k|				}
 1749|   298k|				pos++;
 1750|   298k|			}
 1751|   285k|			if (itsTrue) {
  ------------------
  |  Branch (1751:8): [True: 268k, False: 16.3k]
  ------------------
 1752|   268k|				for (k = (*passInstructions)[*passIC + 5];
 1753|   690k|						k < (*passInstructions)[*passIC + 6] && pos < input->length;
  ------------------
  |  Branch (1753:7): [True: 533k, False: 157k]
  |  Branch (1753:47): [True: 438k, False: 94.4k]
  ------------------
 1754|   438k|						k++) {
 1755|   438k|					if (!((m ? getDots(input->chars[pos], table)
  ------------------
  |  Branch (1755:10): [True: 16.4k, False: 422k]
  |  Branch (1755:13): [True: 338k, False: 99.9k]
  ------------------
 1756|   438k|							 : getChar(input->chars[pos], table))
 1757|   438k|										->attributes &
 1758|   438k|								attributes))
 1759|  16.4k|						break;
 1760|   422k|					pos++;
 1761|   422k|				}
 1762|   268k|			}
 1763|   285k|			*passIC += 7;
 1764|   285k|			break;
 1765|      0|		case pass_swap:
  ------------------
  |  Branch (1765:3): [True: 0, False: 4.30M]
  ------------------
 1766|      0|			itsTrue = back_swapTest(table, input, &pos, *passInstructions, *passIC);
 1767|      0|			*passIC += 5;
 1768|      0|			break;
 1769|   651k|		case pass_endTest: {
  ------------------
  |  Branch (1769:3): [True: 651k, False: 3.65M]
  ------------------
 1770|   651k|			(*passIC)++;
 1771|   651k|			match->endMatch = pos;
 1772|   651k|			if (match->startReplace == -1) {
  ------------------
  |  Branch (1772:8): [True: 418k, False: 232k]
  ------------------
 1773|   418k|				match->startReplace = match->startMatch;
 1774|   418k|				match->endReplace = match->endMatch;
 1775|   418k|			}
 1776|   651k|			return 1;
 1777|      0|			break;
 1778|      0|		}
 1779|    141|		default:
  ------------------
  |  Branch (1779:3): [True: 141, False: 4.30M]
  ------------------
 1780|    141|			if (_lou_handlePassVariableTest(*passInstructions, passIC, &itsTrue)) break;
  ------------------
  |  Branch (1780:8): [True: 31, False: 110]
  ------------------
 1781|    110|			return 0;
 1782|  4.30M|		}
 1783|  3.35M|		if ((!notOperator && !itsTrue) || (notOperator && itsTrue)) return 0;
  ------------------
  |  Branch (1783:8): [True: 3.05M, False: 293k]
  |  Branch (1783:24): [True: 503k, False: 2.55M]
  |  Branch (1783:38): [True: 293k, False: 2.55M]
  |  Branch (1783:53): [True: 904, False: 292k]
  ------------------
 1784|  2.84M|		notOperator = 0;
 1785|  2.84M|	}
 1786|      0|	return 0;
 1787|  1.15M|}
lou_backTranslateString.c:matchCurrentInput:
 1585|  24.2k|		const InString *input, int pos, const widechar *passInstructions, int passIC) {
 1586|  24.2k|	int k;
 1587|  24.2k|	int kk = pos;
 1588|  40.6k|	for (k = passIC + 2; k < passIC + 2 + passInstructions[passIC + 1]; k++)
  ------------------
  |  Branch (1588:23): [True: 24.2k, False: 16.3k]
  ------------------
 1589|  24.2k|		if (passInstructions[k] != input->chars[kk++]) return 0;
  ------------------
  |  Branch (1589:7): [True: 7.85k, False: 16.3k]
  ------------------
 1590|  16.3k|	return 1;
 1591|  24.2k|}
lou_backTranslateString.c:getDots:
  405|  3.59M|getDots(widechar c, const TranslationTableHeader *table) {
  406|  3.59M|	static TranslationTableCharacter notFound = { NULL, -1, 0, 0, 0, CTC_Space, 0, 0,
  407|  3.59M|		LOU_DOTS, 0, 0 };
  408|  3.59M|	unsigned long int makeHash = _lou_charHash(c);
  409|  3.59M|	TranslationTableOffset bucket = table->dots[makeHash];
  410|  3.59M|	while (bucket) {
  ------------------
  |  Branch (410:9): [True: 2.50M, False: 1.08M]
  ------------------
  411|  2.50M|		TranslationTableCharacter *character =
  412|  2.50M|				(TranslationTableCharacter *)&table->ruleArea[bucket];
  413|  2.50M|		if (character->value == c) return character;
  ------------------
  |  Branch (413:7): [True: 2.50M, False: 45]
  ------------------
  414|     45|		bucket = character->next;
  415|     45|	}
  416|  1.08M|	notFound.value = c;
  417|  1.08M|	return &notFound;
  418|  3.59M|}
lou_backTranslateString.c:back_passDoAction:
 1821|   651k|		int passIC, PassRuleMatch match) {
 1822|   651k|	int k;
 1823|   651k|	int destStartMatch = output->length;
 1824|   651k|	int destStartReplace;
 1825|   651k|	int newPos = match.endReplace;
 1826|       |
 1827|   651k|	if (!copyCharacters(match.startMatch, match.startReplace, table, mode, input, output,
  ------------------
  |  Branch (1827:6): [True: 19, False: 651k]
  ------------------
 1828|   651k|				posMapping, cursorPosition, cursorStatus, ctx, currentOpcode))
 1829|     19|		return 0;
 1830|   651k|	destStartReplace = output->length;
 1831|       |
 1832|   789k|	for (k = match.startReplace; k < match.endReplace; k++)
  ------------------
  |  Branch (1832:31): [True: 138k, False: 651k]
  ------------------
 1833|   138k|		posMapping[k] = output->length;
 1834|  1.47M|	while (passIC < currentRule->dotslen) switch (passInstructions[passIC]) {
  ------------------
  |  Branch (1834:9): [True: 863k, False: 613k]
  ------------------
 1835|  27.7k|		case pass_string:
  ------------------
  |  Branch (1835:3): [True: 27.7k, False: 836k]
  ------------------
 1836|   237k|		case pass_dots:
  ------------------
  |  Branch (1836:3): [True: 209k, False: 654k]
  ------------------
 1837|   237k|			if ((output->length + passInstructions[passIC + 1]) > output->maxlength)
  ------------------
  |  Branch (1837:8): [True: 137, False: 237k]
  ------------------
 1838|    137|				return 0;
 1839|   237k|			memcpy(&output->chars[output->length], &passInstructions[passIC + 2],
 1840|   237k|					passInstructions[passIC + 1] * sizeof(*output->chars));
 1841|   237k|			output->length += passInstructions[passIC + 1];
 1842|   237k|			passIC += passInstructions[passIC + 1] + 2;
 1843|   237k|			break;
 1844|  13.7k|		case pass_swap:
  ------------------
  |  Branch (1844:3): [True: 13.7k, False: 850k]
  ------------------
 1845|  13.7k|			if (!back_swapReplace(match.startReplace, match.endReplace, table, input,
  ------------------
  |  Branch (1845:8): [True: 4, False: 13.7k]
  ------------------
 1846|  13.7k|						output, posMapping, passInstructions, passIC))
 1847|      4|				return 0;
 1848|  13.7k|			passIC += 3;
 1849|  13.7k|			break;
 1850|   211k|		case pass_omit:
  ------------------
  |  Branch (1850:3): [True: 211k, False: 652k]
  ------------------
 1851|   211k|			passIC++;
 1852|   211k|			break;
 1853|   281k|		case pass_copy: {
  ------------------
  |  Branch (1853:3): [True: 281k, False: 582k]
  ------------------
 1854|   281k|			int count = destStartReplace - destStartMatch;
 1855|   281k|			if (count > 0) {
  ------------------
  |  Branch (1855:8): [True: 173k, False: 107k]
  ------------------
 1856|   173k|				memmove(&output->chars[destStartMatch], &output->chars[destStartReplace],
 1857|   173k|						(output->length - destStartReplace) * sizeof(*output->chars));
 1858|   173k|				output->length -= count;
 1859|   173k|				destStartReplace = destStartMatch;
 1860|   173k|			}
 1861|   281k|		}
 1862|       |
 1863|   281k|			if (!copyCharacters(match.startReplace, match.endReplace, table, mode, input,
  ------------------
  |  Branch (1863:8): [True: 6, False: 281k]
  ------------------
 1864|   281k|						output, posMapping, cursorPosition, cursorStatus, ctx,
 1865|   281k|						currentOpcode))
 1866|      6|				return 0;
 1867|   281k|			newPos = match.endMatch;
 1868|   281k|			passIC++;
 1869|   281k|			break;
 1870|   119k|		default:
  ------------------
  |  Branch (1870:3): [True: 119k, False: 743k]
  ------------------
 1871|   119k|			if (_lou_handlePassVariableAction(passInstructions, &passIC)) break;
  ------------------
  |  Branch (1871:8): [True: 82.2k, False: 37.6k]
  ------------------
 1872|  37.6k|			return 0;
 1873|   863k|		}
 1874|   613k|	*pos = newPos;
 1875|   613k|	return 1;
 1876|   651k|}
lou_backTranslateString.c:copyCharacters:
 1793|   932k|		TranslationTableOpcode currentOpcode) {
 1794|   932k|	if (currentOpcode == CTO_Context) {
  ------------------
  |  Branch (1794:6): [True: 227k, False: 705k]
  ------------------
 1795|   501k|		while (from < to) {
  ------------------
  |  Branch (1795:10): [True: 274k, False: 227k]
  ------------------
 1796|   274k|			if (!putCharacter(input->chars[from], table, from, mode, input, output,
  ------------------
  |  Branch (1796:8): [True: 5, False: 274k]
  ------------------
 1797|   274k|						posMapping, cursorPosition, cursorStatus, ctx))
 1798|      5|				return 0;
 1799|   274k|			from++;
 1800|   274k|		}
 1801|   705k|	} else {
 1802|   705k|		if (to > from) {
  ------------------
  |  Branch (1802:7): [True: 178k, False: 526k]
  ------------------
 1803|   178k|			if ((output->length + to - from) > output->maxlength) return 0;
  ------------------
  |  Branch (1803:8): [True: 20, False: 178k]
  ------------------
 1804|   547k|			while (to > from) {
  ------------------
  |  Branch (1804:11): [True: 369k, False: 178k]
  ------------------
 1805|   369k|				posMapping[from] = output->length;
 1806|   369k|				output->chars[output->length] = input->chars[from];
 1807|   369k|				output->length++;
 1808|   369k|				from++;
 1809|   369k|			}
 1810|   178k|		}
 1811|   705k|	}
 1812|       |
 1813|   932k|	return 1;
 1814|   932k|}
lou_backTranslateString.c:putCharacter:
 1100|   274k|		int *cursorStatus, TranslationContext *ctx) {
 1101|       |	/* Output character(s) corresponding to a Unicode braille Character */
 1102|   274k|	TranslationTableOffset offset = (getDots(dots, table))->definitionRule;
 1103|   274k|	if (offset) {
  ------------------
  |  Branch (1103:6): [True: 132k, False: 142k]
  ------------------
 1104|   132k|		const TranslationTableRule *rule =
 1105|   132k|				(TranslationTableRule *)&table->ruleArea[offset];
 1106|   132k|		return back_updatePositions(&rule->charsdots[0], rule->dotslen, rule->charslen,
 1107|   132k|				table, pos, input, output, posMapping, cursorPosition, cursorStatus, ctx);
 1108|   132k|	}
 1109|   142k|	return undefinedDots(dots, mode, output, pos, posMapping);
 1110|   274k|}
lou_backTranslateString.c:back_updatePositions:
 1067|   734k|		TranslationContext *ctx) {
 1068|   734k|	int k;
 1069|   734k|	if ((output->length + outLength) > output->maxlength ||
  ------------------
  |  Branch (1069:6): [True: 20, False: 734k]
  ------------------
 1070|   734k|			(pos + inLength) > input->length)
  ------------------
  |  Branch (1070:4): [True: 0, False: 734k]
  ------------------
 1071|     20|		return 0;
 1072|   734k|	if (!*cursorStatus && *cursorPosition >= pos && *cursorPosition < (pos + inLength)) {
  ------------------
  |  Branch (1072:6): [True: 734k, False: 0]
  |  Branch (1072:24): [True: 0, False: 734k]
  |  Branch (1072:50): [True: 0, False: 0]
  ------------------
 1073|      0|		*cursorPosition = output->length + outLength / 2;
 1074|      0|		*cursorStatus = 1;
 1075|      0|	}
 1076|  1.46M|	for (k = 0; k < inLength; k++) posMapping[pos + k] = output->length;
  ------------------
  |  Branch (1076:14): [True: 734k, False: 734k]
  ------------------
 1077|   734k|	return putchars(outChars, outLength, table, output, ctx);
 1078|   734k|}
lou_backTranslateString.c:putchars:
 1032|   734k|		OutString *output, TranslationContext *ctx) {
 1033|   734k|	int k = 0;
 1034|   734k|	if (!count || (output->length + count) > output->maxlength) return 0;
  ------------------
  |  Branch (1034:6): [True: 0, False: 734k]
  |  Branch (1034:16): [True: 0, False: 734k]
  ------------------
 1035|   734k|	if (ctx->nextUpper) {
  ------------------
  |  Branch (1035:6): [True: 0, False: 734k]
  ------------------
 1036|      0|		output->chars[(output->length)++] =
 1037|      0|				toUppercase(table, getChar(chars[k++], table));
 1038|      0|		ctx->nextUpper = 0;
 1039|      0|	}
 1040|   734k|	if (!ctx->allUpper && !ctx->allUpperPhrase) {
  ------------------
  |  Branch (1040:6): [True: 730k, False: 4.09k]
  |  Branch (1040:24): [True: 730k, False: 0]
  ------------------
 1041|   730k|		memcpy(&output->chars[output->length], &chars[k], CHARSIZE * (count - k));
  ------------------
  |  |   68|   730k|#define CHARSIZE sizeof(widechar)
  ------------------
 1042|   730k|		output->length += count - k;
 1043|   730k|	} else
 1044|  20.4k|		for (; k < count; k++) {
  ------------------
  |  Branch (1044:10): [True: 16.3k, False: 4.09k]
  ------------------
 1045|  16.3k|			const TranslationTableCharacter *c = getChar(chars[k], table);
 1046|       |			/* In capsword mode, a non-letter non-capsmode character terminates
 1047|       |			 * the capsword. This is needed here because multi-character rules
 1048|       |			 * (e.g. endword 's) output multiple chars in one putchars call,
 1049|       |			 * bypassing the main loop's per-iteration termination
 1050|       |			 * check. Capsphrase is not affected. */
 1051|  16.3k|			if (ctx->allUpper == 2 && !ctx->allUpperPhrase &&
  ------------------
  |  Branch (1051:8): [True: 0, False: 16.3k]
  |  Branch (1051:30): [True: 0, False: 0]
  ------------------
 1052|      0|					!(c->attributes & CTC_Letter) && !(c->attributes & CTC_CapsMode)) {
  ------------------
  |  Branch (1052:6): [True: 0, False: 0]
  |  Branch (1052:39): [True: 0, False: 0]
  ------------------
 1053|      0|				ctx->allUpper = 0;
 1054|      0|				memcpy(&output->chars[output->length], &chars[k], CHARSIZE * (count - k));
  ------------------
  |  |   68|      0|#define CHARSIZE sizeof(widechar)
  ------------------
 1055|      0|				output->length += count - k;
 1056|      0|				return 1;
 1057|      0|			}
 1058|  16.3k|			output->chars[(output->length)++] = toUppercase(table, c);
 1059|  16.3k|		}
 1060|   734k|	return 1;
 1061|   734k|}
lou_backTranslateString.c:toUppercase:
 1018|  16.3k|		const TranslationTableHeader *table, const TranslationTableCharacter *character) {
 1019|  16.3k|	const TranslationTableCharacter *c = character;
 1020|  16.3k|	if (c->basechar) c = (TranslationTableCharacter *)&table->ruleArea[c->basechar];
  ------------------
  |  Branch (1020:6): [True: 0, False: 16.3k]
  ------------------
 1021|  16.3k|	while (c->linked) {
  ------------------
  |  Branch (1021:9): [True: 0, False: 16.3k]
  ------------------
 1022|      0|		c = (TranslationTableCharacter *)&table->ruleArea[c->linked];
 1023|      0|		if ((c->mode & (character->mode | CTC_UpperCase)) ==
  ------------------
  |  Branch (1023:7): [True: 0, False: 0]
  ------------------
 1024|      0|				(character->mode | CTC_UpperCase))
 1025|      0|			return c->value;
 1026|      0|	}
 1027|  16.3k|	return character->value;
 1028|  16.3k|}
lou_backTranslateString.c:undefinedDots:
 1081|   319k|undefinedDots(widechar dots, int mode, OutString *output, int pos, int *posMapping) {
 1082|   319k|	posMapping[pos] = output->length;
 1083|   319k|	if (mode & noUndefined) return 1;
  ------------------
  |  Branch (1083:6): [True: 0, False: 319k]
  ------------------
 1084|       |
 1085|       |	/* Print out dot numbers */
 1086|   319k|	const char *buffer = _lou_unknownDots(dots);
 1087|   319k|	size_t buflen = strlen(buffer);
 1088|   319k|	if ((output->length + (int)buflen) > output->maxlength) return 0;
  ------------------
  |  Branch (1088:6): [True: 28, False: 319k]
  ------------------
 1089|       |
 1090|  1.29M|	for (unsigned int k = 0; k < buflen; k += 1) {
  ------------------
  |  Branch (1090:27): [True: 977k, False: 319k]
  ------------------
 1091|   977k|		output->chars[output->length++] = buffer[k];
 1092|   977k|	}
 1093|       |
 1094|   319k|	return 1;
 1095|   319k|}
lou_backTranslateString.c:back_swapReplace:
 1632|  13.7k|		const widechar *passInstructions, int passIC) {
 1633|  13.7k|	TranslationTableOffset swapRuleOffset;
 1634|  13.7k|	TranslationTableRule *swapRule;
 1635|  13.7k|	widechar *replacements;
 1636|  13.7k|	int p;
 1637|  13.7k|	int lastPos = 0;
 1638|  13.7k|	int lastRep = 0;
 1639|  13.7k|	swapRuleOffset = (passInstructions[passIC + 1] << 16) | passInstructions[passIC + 2];
 1640|  13.7k|	swapRule = (TranslationTableRule *)&table->ruleArea[swapRuleOffset];
 1641|  13.7k|	replacements = &swapRule->charsdots[swapRule->charslen];
 1642|  20.0k|	for (p = start; p < end; p++) {
  ------------------
  |  Branch (1642:18): [True: 19.8k, False: 250]
  ------------------
 1643|  19.8k|		int rep;
 1644|  19.8k|		int test;
 1645|  19.8k|		int k;
 1646|   130k|		for (test = 0; test < swapRule->charslen; test++)
  ------------------
  |  Branch (1646:18): [True: 117k, False: 13.4k]
  ------------------
 1647|   117k|			if (input->chars[p] == swapRule->charsdots[test]) break;
  ------------------
  |  Branch (1647:8): [True: 6.34k, False: 110k]
  ------------------
 1648|  19.8k|		if (test == swapRule->charslen) return p;
  ------------------
  |  Branch (1648:7): [True: 13.4k, False: 6.34k]
  ------------------
 1649|  6.34k|		if (test >= lastRep) {
  ------------------
  |  Branch (1649:7): [True: 6.34k, False: 0]
  ------------------
 1650|  6.34k|			k = lastPos;
 1651|  6.34k|			rep = lastRep;
 1652|  6.34k|		} else {
 1653|      0|			k = 0;
 1654|      0|			rep = 0;
 1655|      0|		}
 1656|  10.8k|		while (k < swapRule->dotslen) {
  ------------------
  |  Branch (1656:10): [True: 6.34k, False: 4.53k]
  ------------------
 1657|  6.34k|			if (rep == test) {
  ------------------
  |  Branch (1657:8): [True: 1.80k, False: 4.53k]
  ------------------
 1658|  1.80k|				int l = replacements[k] - 1;
 1659|  1.80k|				if (output->length + l >= output->maxlength) return 0;
  ------------------
  |  Branch (1659:9): [True: 4, False: 1.80k]
  ------------------
 1660|  1.80k|				posMapping[p] = output->length;
 1661|  1.80k|				memcpy(&output->chars[output->length], &replacements[k + 1],
 1662|  1.80k|						l * CHARSIZE);
  ------------------
  |  |   68|  1.80k|#define CHARSIZE sizeof(widechar)
  ------------------
 1663|  1.80k|				output->length += l;
 1664|  1.80k|				lastPos = k;
 1665|  1.80k|				lastRep = rep;
 1666|  1.80k|				break;
 1667|  1.80k|			}
 1668|  4.53k|			rep++;
 1669|  4.53k|			k += replacements[k];
 1670|  4.53k|		}
 1671|  6.34k|	}
 1672|    250|	return p;
 1673|  13.7k|}
lou_backTranslateString.c:backTranslateString:
 1249|    116|		int maxAppliedRules) {
 1250|    116|	int pos;
 1251|    116|	TranslationContext ctx = { .nextUpper = 0,
 1252|    116|		.allUpper = 0,
 1253|    116|		.allUpperPhrase = 0,
 1254|    116|		.itsANumber = 0,
 1255|    116|		.noContractMode = NO_CONTRACT_OFF,
  ------------------
  |  |   54|    116|#define NO_CONTRACT_OFF 0	 /* not in nocontractsign scope */
  ------------------
 1256|    116|		.activeWordEmphasis = 0,
 1257|    116|		.activePhraseEmphasis = 0,
 1258|    116|		.nextCharEmphasis = 0 };
 1259|       |	/* Back translation */
 1260|    116|	int srcword = 0;
 1261|    116|	int destword = 0; /* last word translated */
 1262|    116|	TranslationTableOpcode previousOpcode;
 1263|    116|	int doingMultind = 0;
 1264|    116|	const TranslationTableRule *multindRule;
 1265|    116|	_lou_resetPassVariables();
 1266|    116|	translation_direction = 0;
 1267|    116|	previousOpcode = CTO_None;
 1268|    116|	pos = output->length = 0;
 1269|    116|	int prevPos = -1;
 1270|   820k|	while (pos < input->length) {
  ------------------
  |  Branch (1270:9): [True: 819k, False: 73]
  ------------------
 1271|       |		/* the main translation loop */
 1272|   819k|		int currentDotslen; /* length of current find string */
 1273|   819k|		TranslationTableOpcode currentOpcode;
 1274|   819k|		const TranslationTableRule *currentRule; /* pointer to current rule in table */
 1275|   819k|		TranslationTableCharacterAttributes beforeAttributes;
 1276|   819k|		const widechar *passInstructions;
 1277|   819k|		int passIC; /* Instruction counter */
 1278|   819k|		PassRuleMatch patternMatch;
 1279|   819k|		int prevOutputLength = output->length; /* track output for typeform population */
 1280|       |		/* If the previous iteration did not advance the position (because a
 1281|       |		 * context rule consumed nothing), don't try context rules again at this
 1282|       |		 * position, to avoid an endless loop. */
 1283|   819k|		int posIncremented = pos > prevPos;
 1284|   819k|		prevPos = pos;
 1285|   819k|		back_setBefore(table, output, &beforeAttributes);
 1286|   819k|		if ((ctx.allUpper == 1) && (beforeAttributes & CTC_UpperCase))
  ------------------
  |  Branch (1286:7): [True: 54.2k, False: 765k]
  |  Branch (1286:30): [True: 0, False: 54.2k]
  ------------------
 1287|       |			// Capsword in progress
 1288|      0|			ctx.allUpper = 2;
 1289|   819k|		else if ((ctx.allUpper == 2) && !(beforeAttributes & CTC_UpperCase) &&
  ------------------
  |  Branch (1289:12): [True: 0, False: 819k]
  |  Branch (1289:35): [True: 0, False: 0]
  ------------------
 1290|      0|				!(beforeAttributes & CTC_CapsMode))
  ------------------
  |  Branch (1290:5): [True: 0, False: 0]
  ------------------
 1291|       |			// terminate capsword
 1292|      0|			ctx.allUpper = 0;
 1293|   819k|		if ((ctx.itsANumber == 2) && output->length > 0 &&
  ------------------
  |  Branch (1293:7): [True: 14.1k, False: 805k]
  |  Branch (1293:32): [True: 14.1k, False: 0]
  ------------------
 1294|  14.1k|				!(beforeAttributes & CTC_LitDigit) &&
  ------------------
  |  Branch (1294:5): [True: 1.00k, False: 13.1k]
  ------------------
 1295|  1.00k|				!(beforeAttributes & CTC_NumericMode) &&
  ------------------
  |  Branch (1295:5): [True: 1.00k, False: 0]
  ------------------
 1296|  1.00k|				!(beforeAttributes & CTC_MidEndNumericMode))
  ------------------
  |  Branch (1296:5): [True: 1.00k, False: 0]
  ------------------
 1297|  1.00k|			ctx.itsANumber = 0;
 1298|   819k|		back_selectRule(table, pos, mode, input, output, ctx, &currentDotslen,
 1299|   819k|				&currentOpcode, &currentRule, previousOpcode, &doingMultind, &multindRule,
 1300|   819k|				beforeAttributes, &passInstructions, &passIC, &patternMatch,
 1301|   819k|				typebuf != NULL, posIncremented);
 1302|   819k|		if (appliedRules != NULL && *appliedRulesCount < maxAppliedRules)
  ------------------
  |  Branch (1302:7): [True: 0, False: 819k]
  |  Branch (1302:31): [True: 0, False: 0]
  ------------------
 1303|      0|			appliedRules[(*appliedRulesCount)++] = currentRule;
 1304|       |		/* processing before replacement */
 1305|   819k|		switch (currentOpcode) {
 1306|  2.43k|		case CTO_LargeSign:
  ------------------
  |  Branch (1306:3): [True: 2.43k, False: 817k]
  ------------------
 1307|  2.43k|			if (previousOpcode == CTO_LargeSign)
  ------------------
  |  Branch (1307:8): [True: 0, False: 2.43k]
  ------------------
 1308|      0|				if (!insertSpace(table, pos, input, output, posMapping, cursorPosition,
  ------------------
  |  Branch (1308:9): [True: 0, False: 0]
  ------------------
 1309|      0|							cursorStatus, &ctx))
 1310|      0|					goto failure;
 1311|  2.43k|			break;
 1312|  2.43k|		case CTO_CapsLetter:
  ------------------
  |  Branch (1312:3): [True: 57, False: 819k]
  ------------------
 1313|     57|			ctx.nextUpper = 1;
 1314|     57|			ctx.allUpper = 0;
 1315|     57|			ctx.itsANumber = 0;
 1316|    114|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1316:11): [True: 57, False: 57]
  ------------------
 1317|     57|			continue;
 1318|      0|			break;
 1319|  37.4k|		case CTO_BegCapsWord:
  ------------------
  |  Branch (1319:3): [True: 37.4k, False: 782k]
  ------------------
 1320|  37.4k|			ctx.allUpper = 1;
 1321|  37.4k|			ctx.itsANumber = 0;
 1322|  74.8k|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1322:11): [True: 37.4k, False: 37.4k]
  ------------------
 1323|  37.4k|			continue;
 1324|      0|			break;
 1325|      0|		case CTO_BegCaps:
  ------------------
  |  Branch (1325:3): [True: 0, False: 819k]
  ------------------
 1326|      0|			ctx.allUpperPhrase = 1;
 1327|      0|			ctx.itsANumber = 0;
 1328|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1328:11): [True: 0, False: 0]
  ------------------
 1329|      0|			continue;
 1330|      0|			break;
 1331|      0|		case CTO_EndCapsWord:
  ------------------
  |  Branch (1331:3): [True: 0, False: 819k]
  ------------------
 1332|      0|			ctx.allUpper = 0;
 1333|      0|			ctx.itsANumber = 0;
 1334|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1334:11): [True: 0, False: 0]
  ------------------
 1335|      0|			continue;
 1336|      0|			break;
 1337|      0|		case CTO_EndCaps:
  ------------------
  |  Branch (1337:3): [True: 0, False: 819k]
  ------------------
 1338|      0|			ctx.allUpperPhrase = 0;
 1339|      0|			ctx.itsANumber = 0;
 1340|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1340:11): [True: 0, False: 0]
  ------------------
 1341|      0|			continue;
 1342|      0|			break;
 1343|      0|		case CTO_BegCapsPhrase:
  ------------------
  |  Branch (1343:3): [True: 0, False: 819k]
  ------------------
 1344|      0|			ctx.allUpperPhrase = 1;
 1345|      0|			ctx.allUpper = 0;
 1346|      0|			ctx.itsANumber = 0;
 1347|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1347:11): [True: 0, False: 0]
  ------------------
 1348|      0|			continue;
 1349|      0|			break;
 1350|      0|		case CTO_EndCapsPhraseAfter:
  ------------------
  |  Branch (1350:3): [True: 0, False: 819k]
  ------------------
 1351|      0|			ctx.allUpperPhrase = 0;
 1352|      0|			ctx.allUpper = 0;
 1353|      0|			ctx.itsANumber = 0;
 1354|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1354:11): [True: 0, False: 0]
  ------------------
 1355|      0|			continue;
 1356|      0|			break;
 1357|      0|		case CTO_EndCapsPhraseBefore:
  ------------------
  |  Branch (1357:3): [True: 0, False: 819k]
  ------------------
 1358|       |			/* The indicator precedes the last word of the passage, so that word
 1359|       |			 * is still capitalized: continue it as a capitalized word. */
 1360|      0|			ctx.allUpperPhrase = 0;
 1361|      0|			ctx.allUpper = 1;
 1362|      0|			ctx.itsANumber = 0;
 1363|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1363:11): [True: 0, False: 0]
  ------------------
 1364|      0|			continue;
 1365|      0|			break;
 1366|      0|		case CTO_LetterSign:
  ------------------
  |  Branch (1366:3): [True: 0, False: 819k]
  ------------------
 1367|      0|		case CTO_NoNumberSign:
  ------------------
  |  Branch (1367:3): [True: 0, False: 819k]
  ------------------
 1368|      0|		case CTO_NoContractSign:
  ------------------
  |  Branch (1368:3): [True: 0, False: 819k]
  ------------------
 1369|      0|			ctx.noContractMode = NO_CONTRACT_ACTIVE;
  ------------------
  |  |   55|      0|#define NO_CONTRACT_ACTIVE 1 /* after nocontractsign, contractions suppressed */
  ------------------
 1370|      0|			ctx.itsANumber = 0;
 1371|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1371:11): [True: 0, False: 0]
  ------------------
 1372|      0|			continue;
 1373|      0|			break;
 1374|  1.05k|		case CTO_NumberSign:
  ------------------
  |  Branch (1374:3): [True: 1.05k, False: 818k]
  ------------------
 1375|  1.05k|			ctx.itsANumber = 1;	 // Starting number
 1376|  1.05k|			ctx.allUpper = 0;
 1377|  2.10k|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1377:11): [True: 1.05k, False: 1.05k]
  ------------------
 1378|  1.05k|			continue;
 1379|      0|			break;
 1380|  13.1k|		case CTO_LitDigit:
  ------------------
  |  Branch (1380:3): [True: 13.1k, False: 806k]
  ------------------
 1381|  13.1k|			ctx.itsANumber = 2;	 // In the middle of a number
 1382|  13.1k|			break;
 1383|    147|		case CTO_BegComp:
  ------------------
  |  Branch (1383:3): [True: 147, False: 819k]
  ------------------
 1384|    147|			ctx.itsANumber = 0;
 1385|    147|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1385:11): [True: 0, False: 147]
  ------------------
 1386|    147|			continue;
 1387|      0|			break;
 1388|  1.50k|		case CTO_EndComp:
  ------------------
  |  Branch (1388:3): [True: 1.50k, False: 818k]
  ------------------
 1389|  3.01k|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1389:11): [True: 1.50k, False: 1.50k]
  ------------------
 1390|  1.50k|			continue;
 1391|      0|			break;
 1392|      0|		case CTO_EmphLetter:
  ------------------
  |  Branch (1392:3): [True: 0, False: 819k]
  ------------------
 1393|      0|		case CTO_BegEmphWord:
  ------------------
  |  Branch (1393:3): [True: 0, False: 819k]
  ------------------
 1394|      0|		case CTO_EndEmphWord:
  ------------------
  |  Branch (1394:3): [True: 0, False: 819k]
  ------------------
 1395|      0|		case CTO_BegEmph:
  ------------------
  |  Branch (1395:3): [True: 0, False: 819k]
  ------------------
 1396|      0|		case CTO_EndEmph:
  ------------------
  |  Branch (1396:3): [True: 0, False: 819k]
  ------------------
 1397|      0|		case CTO_BegEmphPhrase:
  ------------------
  |  Branch (1397:3): [True: 0, False: 819k]
  ------------------
 1398|      0|		case CTO_EndEmphPhrase: {
  ------------------
  |  Branch (1398:3): [True: 0, False: 819k]
  ------------------
 1399|      0|			int indicatorType = -1;
 1400|      0|			int emphClass = findEmphasisClass(table, currentRule, &indicatorType);
 1401|      0|			if (emphClass >= 0) {
  ------------------
  |  Branch (1401:8): [True: 0, False: 0]
  ------------------
 1402|      0|				formtype emphBit = table->emphClasses[emphClass].typeform;
 1403|      0|				switch (currentOpcode) {
 1404|      0|				case CTO_EmphLetter:
  ------------------
  |  Branch (1404:5): [True: 0, False: 0]
  ------------------
 1405|       |					/* Single letter emphasis - applies to next character only */
 1406|      0|					ctx.nextCharEmphasis |= emphBit;
 1407|      0|					break;
 1408|      0|				case CTO_BegEmphWord:
  ------------------
  |  Branch (1408:5): [True: 0, False: 0]
  ------------------
 1409|       |					/* Begin word emphasis */
 1410|      0|					ctx.activeWordEmphasis |= emphBit;
 1411|      0|					break;
 1412|      0|				case CTO_EndEmphWord:
  ------------------
  |  Branch (1412:5): [True: 0, False: 0]
  ------------------
 1413|       |					/* End word emphasis. In UEB, endemphword and endemphphrase
 1414|       |					 * share the same dot pattern (e.g., 45-3 for bold). If we
 1415|       |					 * match endemphword but there's no active word emphasis for
 1416|       |					 * this class, check if there's active phrase emphasis and
 1417|       |					 * end that instead - this handles the ambiguity correctly. */
 1418|      0|					if (ctx.activeWordEmphasis & emphBit) {
  ------------------
  |  Branch (1418:10): [True: 0, False: 0]
  ------------------
 1419|      0|						ctx.activeWordEmphasis &= ~emphBit;
 1420|      0|					} else if (ctx.activePhraseEmphasis & emphBit) {
  ------------------
  |  Branch (1420:17): [True: 0, False: 0]
  ------------------
 1421|      0|						ctx.activePhraseEmphasis &= ~emphBit;
 1422|      0|					}
 1423|      0|					break;
 1424|      0|				case CTO_BegEmphPhrase:
  ------------------
  |  Branch (1424:5): [True: 0, False: 0]
  ------------------
 1425|       |					/* Begin phrase emphasis */
 1426|      0|					ctx.activePhraseEmphasis |= emphBit;
 1427|      0|					break;
 1428|      0|				case CTO_EndEmphPhrase:
  ------------------
  |  Branch (1428:5): [True: 0, False: 0]
  ------------------
 1429|       |					/* End phrase emphasis */
 1430|      0|					ctx.activePhraseEmphasis &= ~emphBit;
 1431|      0|					break;
 1432|      0|				case CTO_BegEmph:
  ------------------
  |  Branch (1432:5): [True: 0, False: 0]
  ------------------
 1433|       |					/* Generic begin (firstletter style) - treat as word */
 1434|      0|					ctx.activeWordEmphasis |= emphBit;
 1435|      0|					break;
 1436|      0|				case CTO_EndEmph:
  ------------------
  |  Branch (1436:5): [True: 0, False: 0]
  ------------------
 1437|       |					/* Generic end (lastletter style). Like CTO_EndEmphWord,
 1438|       |					 * handle the ambiguity when endemph could mean either
 1439|       |					 * word or phrase termination. */
 1440|      0|					if (ctx.activeWordEmphasis & emphBit) {
  ------------------
  |  Branch (1440:10): [True: 0, False: 0]
  ------------------
 1441|      0|						ctx.activeWordEmphasis &= ~emphBit;
 1442|      0|					} else if (ctx.activePhraseEmphasis & emphBit) {
  ------------------
  |  Branch (1442:17): [True: 0, False: 0]
  ------------------
 1443|      0|						ctx.activePhraseEmphasis &= ~emphBit;
 1444|      0|					}
 1445|      0|					break;
 1446|      0|				default:
  ------------------
  |  Branch (1446:5): [True: 0, False: 0]
  ------------------
 1447|      0|					break;
 1448|      0|				}
 1449|      0|			}
 1450|      0|			while (currentDotslen-- > 0) posMapping[pos++] = output->length;
  ------------------
  |  Branch (1450:11): [True: 0, False: 0]
  ------------------
 1451|      0|			continue;
 1452|      0|			break;
 1453|      0|		}
 1454|       |
 1455|   764k|		default:
  ------------------
  |  Branch (1455:3): [True: 764k, False: 55.7k]
  ------------------
 1456|   764k|			break;
 1457|   819k|		}
 1458|       |
 1459|       |		/* replacement processing */
 1460|   779k|		switch (currentOpcode) {
 1461|      0|		case CTO_Context:
  ------------------
  |  Branch (1461:3): [True: 0, False: 779k]
  ------------------
 1462|      0|			if (!back_passDoAction(table, &pos, mode, input, output, posMapping,
  ------------------
  |  Branch (1462:8): [True: 0, False: 0]
  ------------------
 1463|      0|						cursorPosition, cursorStatus, &ctx, currentOpcode, currentRule,
 1464|      0|						passInstructions, passIC, patternMatch))
 1465|      0|				return 0;
 1466|      0|			break;
 1467|   177k|		case CTO_None:
  ------------------
  |  Branch (1467:3): [True: 177k, False: 602k]
  ------------------
 1468|   177k|			if (!undefinedDots(input->chars[pos], mode, output, pos, posMapping))
  ------------------
  |  Branch (1468:8): [True: 25, False: 177k]
  ------------------
 1469|     25|				goto failure;
 1470|   177k|			pos++;
 1471|   177k|			break;
 1472|      0|		case CTO_BegNum:
  ------------------
  |  Branch (1472:3): [True: 0, False: 779k]
  ------------------
 1473|      0|			ctx.itsANumber = 1;
 1474|      0|			goto insertChars;
 1475|      0|		case CTO_EndNum:
  ------------------
  |  Branch (1475:3): [True: 0, False: 779k]
  ------------------
 1476|      0|			ctx.itsANumber = 0;
 1477|      0|			goto insertChars;
 1478|   513k|		case CTO_Space:
  ------------------
  |  Branch (1478:3): [True: 513k, False: 265k]
  ------------------
 1479|   513k|			ctx.noContractMode = NO_CONTRACT_OFF;
  ------------------
  |  |   54|   513k|#define NO_CONTRACT_OFF 0	 /* not in nocontractsign scope */
  ------------------
 1480|   513k|			ctx.itsANumber = ctx.allUpper = ctx.nextUpper = 0;
 1481|   513k|			goto insertChars;
 1482|  88.5k|		default:
  ------------------
  |  Branch (1482:3): [True: 88.5k, False: 691k]
  ------------------
 1483|   602k|		insertChars:
 1484|   602k|			if (ctx.noContractMode == NO_CONTRACT_ACTIVE && currentOpcode != CTO_Letter &&
  ------------------
  |  |   55|  1.20M|#define NO_CONTRACT_ACTIVE 1 /* after nocontractsign, contractions suppressed */
  ------------------
  |  Branch (1484:8): [True: 0, False: 602k]
  |  Branch (1484:52): [True: 0, False: 0]
  ------------------
 1485|      0|					currentOpcode != CTO_UpperCase && currentOpcode != CTO_LowerCase)
  ------------------
  |  Branch (1485:6): [True: 0, False: 0]
  |  Branch (1485:40): [True: 0, False: 0]
  ------------------
 1486|      0|				ctx.noContractMode = NO_CONTRACT_LAPSED;
  ------------------
  |  |   56|      0|#define NO_CONTRACT_LAPSED 2 /* crossed non-letter, whole-word suppressed */
  ------------------
 1487|   602k|			if (currentRule->charslen) {
  ------------------
  |  Branch (1487:8): [True: 602k, False: 0]
  ------------------
 1488|   602k|				if (!back_updatePositions(&currentRule->charsdots[0],
  ------------------
  |  Branch (1488:9): [True: 18, False: 602k]
  ------------------
 1489|   602k|							currentRule->dotslen, currentRule->charslen, table, pos,
 1490|   602k|							input, output, posMapping, cursorPosition, cursorStatus,
 1491|   602k|							&ctx))
 1492|     18|					goto failure;
 1493|   602k|				pos += currentDotslen;
 1494|   602k|			} else {
 1495|      0|				int srclim = pos + currentDotslen;
 1496|      0|				while (1) {
  ------------------
  |  Branch (1496:12): [True: 0, Folded]
  ------------------
 1497|      0|					if (!putCharacter(input->chars[pos], table, pos, mode, input, output,
  ------------------
  |  Branch (1497:10): [True: 0, False: 0]
  ------------------
 1498|      0|								posMapping, cursorPosition, cursorStatus, &ctx))
 1499|      0|						goto failure;
 1500|      0|					if (++pos == srclim) break;
  ------------------
  |  Branch (1500:10): [True: 0, False: 0]
  ------------------
 1501|      0|				}
 1502|      0|			}
 1503|   779k|		}
 1504|       |
 1505|       |		/* Save opcode before passSelectRule may overwrite it.
 1506|       |		 * When processing space characters, passSelectRule() in the default
 1507|       |		 * switch case could overwrite currentOpcode before the word-emphasis
 1508|       |		 * clearing check. This would cause word emphasis to persist across
 1509|       |		 * space boundaries, affecting all subsequent text instead of just
 1510|       |		 * the emphasized word. */
 1511|   779k|		TranslationTableOpcode opcodeForEmphasis = currentOpcode;
 1512|       |
 1513|       |		/* processing after replacement */
 1514|   779k|		switch (currentOpcode) {
 1515|      0|		case CTO_JoinNum:
  ------------------
  |  Branch (1515:3): [True: 0, False: 779k]
  ------------------
 1516|      0|		case CTO_JoinableWord:
  ------------------
  |  Branch (1516:3): [True: 0, False: 779k]
  ------------------
 1517|      0|			if (!insertSpace(table, pos, input, output, posMapping, cursorPosition,
  ------------------
  |  Branch (1517:8): [True: 0, False: 0]
  ------------------
 1518|      0|						cursorStatus, &ctx))
 1519|      0|				goto failure;
 1520|      0|			break;
 1521|   779k|		default:
  ------------------
  |  Branch (1521:3): [True: 779k, False: 0]
  ------------------
 1522|   779k|			passSelectRule(table, pos, currentPass, input, &currentOpcode, &currentRule,
 1523|   779k|					&passInstructions, &passIC, &patternMatch);
 1524|   779k|			if (currentOpcode == CTO_Context) {
  ------------------
  |  Branch (1524:8): [True: 148k, False: 630k]
  ------------------
 1525|   148k|				if (appliedRules != NULL && *appliedRulesCount < maxAppliedRules)
  ------------------
  |  Branch (1525:9): [True: 0, False: 148k]
  |  Branch (1525:33): [True: 0, False: 0]
  ------------------
 1526|      0|					appliedRules[(*appliedRulesCount)++] = currentRule;
 1527|   148k|				back_passDoAction(table, &pos, mode, input, output, posMapping,
 1528|   148k|						cursorPosition, cursorStatus, &ctx, currentOpcode, currentRule,
 1529|   148k|						passInstructions, passIC, patternMatch);
 1530|   148k|			}
 1531|   779k|			break;
 1532|   779k|		}
 1533|       |
 1534|       |		/* Populate typeform buffer for newly output characters */
 1535|   779k|		if (typebuf != NULL && output->length > prevOutputLength) {
  ------------------
  |  Branch (1535:7): [True: 0, False: 779k]
  |  Branch (1535:26): [True: 0, False: 0]
  ------------------
 1536|      0|			formtype currentEmphasis = ctx.activePhraseEmphasis | ctx.activeWordEmphasis |
 1537|      0|					ctx.nextCharEmphasis;
 1538|      0|			formtype *typeformBuf = (formtype *)typebuf;
 1539|      0|			int k;
 1540|      0|			for (k = prevOutputLength; k < output->length; k++) {
  ------------------
  |  Branch (1540:31): [True: 0, False: 0]
  ------------------
 1541|      0|				typeformBuf[k] = currentEmphasis;
 1542|      0|			}
 1543|       |			/* Clear single-character emphasis after it's been applied */
 1544|      0|			ctx.nextCharEmphasis = 0;
 1545|      0|		}
 1546|       |
 1547|       |		/* Clear word-level emphasis at word boundaries.
 1548|       |		 * NOTE: This currently only checks for spaces. The forward translator also
 1549|       |		 * consults emphmodechars to determine which non-letter characters cancel
 1550|       |		 * word emphasis (see resetsEmphMode() in lou_translateString.c). Tables
 1551|       |		 * that declare emphmodechars (e.g. Dutch, German) may produce incorrect
 1552|       |		 * typeforms here. */
 1553|   779k|		if (opcodeForEmphasis == CTO_Space) {
  ------------------
  |  Branch (1553:7): [True: 513k, False: 265k]
  ------------------
 1554|   513k|			ctx.activeWordEmphasis = 0;
 1555|   513k|		}
 1556|       |
 1557|   779k|		if (((pos > 0) && checkDotsAttr(input->chars[pos - 1], CTC_Space, table) &&
  ------------------
  |  Branch (1557:8): [True: 746k, False: 33.0k]
  |  Branch (1557:21): [True: 640k, False: 105k]
  ------------------
 1558|   640k|					(currentOpcode != CTO_JoinableWord))) {
  ------------------
  |  Branch (1558:6): [True: 640k, False: 0]
  ------------------
 1559|   640k|			srcword = pos;
 1560|   640k|			destword = output->length;
 1561|   640k|		}
 1562|   779k|		if ((currentOpcode >= CTO_Always && currentOpcode <= CTO_None) ||
  ------------------
  |  Branch (1562:8): [True: 630k, False: 148k]
  |  Branch (1562:39): [True: 630k, False: 0]
  ------------------
 1563|   148k|				(currentOpcode >= CTO_Digit && currentOpcode <= CTO_LitDigit))
  ------------------
  |  Branch (1563:6): [True: 148k, False: 0]
  |  Branch (1563:36): [True: 0, False: 148k]
  ------------------
 1564|   630k|			previousOpcode = currentOpcode;
 1565|   779k|	} /* end of translation loop */
 1566|    116|failure:
 1567|       |
 1568|    116|	if (destword != 0 && pos < input->length &&
  ------------------
  |  Branch (1568:6): [True: 105, False: 11]
  |  Branch (1568:23): [True: 35, False: 70]
  ------------------
 1569|     35|			!checkDotsAttr(input->chars[pos], CTC_Space, table)) {
  ------------------
  |  Branch (1569:4): [True: 4, False: 31]
  ------------------
 1570|      4|		pos = srcword;
 1571|      4|		output->length = destword;
 1572|      4|	}
 1573|    116|	if (pos < input->length) {
  ------------------
  |  Branch (1573:6): [True: 43, False: 73]
  ------------------
 1574|   233k|		while (checkDotsAttr(input->chars[pos], CTC_Space, table))
  ------------------
  |  Branch (1574:10): [True: 233k, False: 12]
  ------------------
 1575|   233k|			if (++pos == input->length) break;
  ------------------
  |  Branch (1575:8): [True: 31, False: 233k]
  ------------------
 1576|     43|	}
 1577|    116|	*realInlen = pos;
 1578|    116|	return 1;
 1579|    116|} /* translation completed */
lou_backTranslateString.c:back_setBefore:
  443|   819k|		TranslationTableCharacterAttributes *beforeAttributes) {
  444|   819k|	widechar before = (output->length == 0) ? ' ' : output->chars[output->length - 1];
  ------------------
  |  Branch (444:20): [True: 16.9k, False: 802k]
  ------------------
  445|   819k|	*beforeAttributes = (getChar(before, table))->attributes;
  446|   819k|}
lou_backTranslateString.c:back_selectRule:
  732|   819k|		int hasTypebuf, int posIncremented) {
  733|       |	/* check for valid back-translations */
  734|   819k|	int length = input->length - pos;
  735|   819k|	TranslationTableOffset ruleOffset = 0;
  736|   819k|	static TranslationTableRule pseudoRule = { 0 };
  737|   819k|	unsigned long int makeHash = 0;
  738|   819k|	const TranslationTableCharacter *dots = getDots(input->chars[pos], table);
  739|   819k|	int tryThis;
  740|   819k|	if (handleMultind(table, currentDotslen, currentOpcode, currentRule, doingMultind,
  ------------------
  |  Branch (740:6): [True: 294, False: 819k]
  ------------------
  741|   819k|				*multindRule))
  742|    294|		return;
  743|  1.81M|	for (tryThis = 0; tryThis < 3; tryThis++) {
  ------------------
  |  Branch (743:20): [True: 1.81M, False: 0]
  ------------------
  744|  1.81M|		switch (tryThis) {
  ------------------
  |  Branch (744:11): [True: 1.81M, False: 0]
  ------------------
  745|   819k|		case 0:
  ------------------
  |  Branch (745:3): [True: 819k, False: 996k]
  ------------------
  746|   819k|			if (length < 2 || (ctx.itsANumber && (dots->attributes & CTC_LitDigit)))
  ------------------
  |  Branch (746:8): [True: 29.1k, False: 790k]
  |  Branch (746:23): [True: 14.1k, False: 776k]
  |  Branch (746:41): [True: 13.1k, False: 1.05k]
  ------------------
  747|  42.2k|				break;
  748|       |			/* Hash function optimized for backward translation */
  749|   777k|			makeHash = (unsigned long int)dots->value << 8;
  750|   777k|			makeHash += (unsigned long int)(getDots(input->chars[pos + 1], table))->value;
  751|   777k|			makeHash %= HASHNUM;
  ------------------
  |  |   77|   777k|#define HASHNUM 1123
  ------------------
  752|   777k|			ruleOffset = table->backRules[makeHash];
  753|   777k|			break;
  754|   819k|		case 1:
  ------------------
  |  Branch (754:3): [True: 819k, False: 997k]
  ------------------
  755|   819k|			if (!(length >= 1)) break;
  ------------------
  |  Branch (755:8): [True: 0, False: 819k]
  ------------------
  756|   819k|			length = 1;
  757|   819k|			ruleOffset = dots->otherRules;
  758|   819k|			break;
  759|   177k|		case 2: /* No rule found */
  ------------------
  |  Branch (759:3): [True: 177k, False: 1.63M]
  ------------------
  760|   177k|			*currentRule = &pseudoRule;
  761|   177k|			*currentOpcode = pseudoRule.opcode = CTO_None;
  762|   177k|			*currentDotslen = pseudoRule.dotslen = 1;
  763|   177k|			pseudoRule.charsdots[0] = input->chars[pos];
  764|   177k|			pseudoRule.charslen = 0;
  765|   177k|			return;
  766|      0|			break;
  767|  1.81M|		}
  768|  1.77M|		while (ruleOffset) {
  ------------------
  |  Branch (768:10): [True: 781k, False: 996k]
  ------------------
  769|   781k|			const widechar *currentDots;
  770|   781k|			*currentRule = (TranslationTableRule *)&table->ruleArea[ruleOffset];
  771|   781k|			*currentOpcode = (*currentRule)->opcode;
  772|   781k|			if (*currentOpcode == CTO_Context) {
  ------------------
  |  Branch (772:8): [True: 0, False: 781k]
  ------------------
  773|      0|				currentDots = &(*currentRule)->charsdots[0];
  774|      0|				*currentDotslen = (*currentRule)->charslen;
  775|   781k|			} else {
  776|   781k|				currentDots = &(*currentRule)->charsdots[(*currentRule)->charslen];
  777|   781k|				*currentDotslen = (*currentRule)->dotslen;
  778|   781k|			}
  779|   781k|			if (((*currentDotslen <= length) &&
  ------------------
  |  Branch (779:9): [True: 781k, False: 5]
  ------------------
  780|   781k|						compareDots(&input->chars[pos], currentDots, *currentDotslen))) {
  ------------------
  |  Branch (780:7): [True: 764k, False: 16.4k]
  ------------------
  781|   764k|				TranslationTableCharacterAttributes afterAttributes;
  782|       |				/* check this rule */
  783|   764k|				back_setAfter(*currentDotslen, table, pos, input, &afterAttributes);
  784|   764k|				if ((!((*currentRule)->after & ~CTC_EmpMatch) ||
  ------------------
  |  Branch (784:10): [True: 764k, False: 0]
  ------------------
  785|      0|							(beforeAttributes & (*currentRule)->after)) &&
  ------------------
  |  Branch (785:8): [True: 0, False: 0]
  ------------------
  786|   764k|						(!((*currentRule)->before & ~CTC_EmpMatch) ||
  ------------------
  |  Branch (786:8): [True: 764k, False: 0]
  ------------------
  787|   764k|								(afterAttributes & (*currentRule)->before))) {
  ------------------
  |  Branch (787:9): [True: 0, False: 0]
  ------------------
  788|   764k|					switch (*currentOpcode) { /* check validity of this Translation */
  789|      0|					case CTO_Context:
  ------------------
  |  Branch (789:6): [True: 0, False: 764k]
  ------------------
  790|       |						// check posIncremented to avoid endless loop
  791|      0|						if (posIncremented &&
  ------------------
  |  Branch (791:11): [True: 0, False: 0]
  ------------------
  792|      0|								back_passDoTest(table, pos, input, *currentOpcode,
  ------------------
  |  Branch (792:9): [True: 0, False: 0]
  ------------------
  793|      0|										*currentRule, passInstructions, passIC,
  794|      0|										patternMatch))
  795|      0|							return;
  796|      0|						break;
  797|   513k|					case CTO_Space:
  ------------------
  |  Branch (797:6): [True: 513k, False: 250k]
  ------------------
  798|   533k|					case CTO_Digit:
  ------------------
  |  Branch (798:6): [True: 19.2k, False: 745k]
  ------------------
  799|   542k|					case CTO_Letter:
  ------------------
  |  Branch (799:6): [True: 9.78k, False: 755k]
  ------------------
  800|   547k|					case CTO_UpperCase:
  ------------------
  |  Branch (800:6): [True: 4.09k, False: 760k]
  ------------------
  801|   547k|					case CTO_LowerCase:
  ------------------
  |  Branch (801:6): [True: 0, False: 764k]
  ------------------
  802|   547k|					case CTO_Punctuation:
  ------------------
  |  Branch (802:6): [True: 0, False: 764k]
  ------------------
  803|   547k|					case CTO_Math:
  ------------------
  |  Branch (803:6): [True: 0, False: 764k]
  ------------------
  804|   565k|					case CTO_Sign:
  ------------------
  |  Branch (804:6): [True: 18.6k, False: 746k]
  ------------------
  805|   565k|					case CTO_ExactDots:
  ------------------
  |  Branch (805:6): [True: 15, False: 764k]
  ------------------
  806|   565k|					case CTO_Repeated:
  ------------------
  |  Branch (806:6): [True: 0, False: 764k]
  ------------------
  807|   565k|					case CTO_Hyphen:
  ------------------
  |  Branch (807:6): [True: 0, False: 764k]
  ------------------
  808|   565k|						return;
  809|  14.4k|					case CTO_LitDigit:
  ------------------
  |  Branch (809:6): [True: 14.4k, False: 750k]
  ------------------
  810|  14.4k|						if (ctx.itsANumber) return;
  ------------------
  |  Branch (810:11): [True: 13.1k, False: 1.27k]
  ------------------
  811|  1.27k|						break;
  812|  37.4k|					case CTO_BegCapsWord:
  ------------------
  |  Branch (812:6): [True: 37.4k, False: 727k]
  ------------------
  813|  37.4k|					case CTO_EndCapsWord:
  ------------------
  |  Branch (813:6): [True: 0, False: 764k]
  ------------------
  814|       |						/* Inside a capitals passage, prefer the end-of-passage
  815|       |						 * indicator when it has the same cells. */
  816|  37.4k|						if (ctx.allUpperPhrase && isEndCapsPhrase(table, *currentRule))
  ------------------
  |  Branch (816:11): [True: 0, False: 37.4k]
  |  Branch (816:33): [True: 0, False: 0]
  ------------------
  817|      0|							break;
  818|  37.4k|						return;
  819|  37.4k|					case CTO_CapsLetter:
  ------------------
  |  Branch (819:6): [True: 57, False: 764k]
  ------------------
  820|     57|					case CTO_BegCaps:
  ------------------
  |  Branch (820:6): [True: 0, False: 764k]
  ------------------
  821|     57|					case CTO_EndCaps:
  ------------------
  |  Branch (821:6): [True: 0, False: 764k]
  ------------------
  822|     57|					case CTO_BegEmph:
  ------------------
  |  Branch (822:6): [True: 0, False: 764k]
  ------------------
  823|     57|					case CTO_EndEmph:
  ------------------
  |  Branch (823:6): [True: 0, False: 764k]
  ------------------
  824|  1.11k|					case CTO_NumberSign:
  ------------------
  |  Branch (824:6): [True: 1.05k, False: 763k]
  ------------------
  825|  1.11k|					case CTO_BegComp:
  ------------------
  |  Branch (825:6): [True: 0, False: 764k]
  ------------------
  826|  2.32k|					case CTO_EndComp:
  ------------------
  |  Branch (826:6): [True: 1.21k, False: 763k]
  ------------------
  827|  2.32k|					case CTO_BegCapsPhrase:
  ------------------
  |  Branch (827:6): [True: 0, False: 764k]
  ------------------
  828|  2.32k|						return;
  829|      0|					case CTO_EndCapsPhraseBefore:
  ------------------
  |  Branch (829:6): [True: 0, False: 764k]
  ------------------
  830|      0|					case CTO_EndCapsPhraseAfter:
  ------------------
  |  Branch (830:6): [True: 0, False: 764k]
  ------------------
  831|       |						/* Only meaningful inside a capitals passage. Some tables use
  832|       |						 * the same cells for other indicators (e.g. the capital
  833|       |						 * letter sign). */
  834|      0|						if (ctx.allUpperPhrase) return;
  ------------------
  |  Branch (834:11): [True: 0, False: 0]
  ------------------
  835|      0|						break;
  836|      0|					case CTO_EmphLetter:
  ------------------
  |  Branch (836:6): [True: 0, False: 764k]
  ------------------
  837|      0|					case CTO_BegEmphWord:
  ------------------
  |  Branch (837:6): [True: 0, False: 764k]
  ------------------
  838|      0|					case CTO_EndEmphWord:
  ------------------
  |  Branch (838:6): [True: 0, False: 764k]
  ------------------
  839|      0|					case CTO_BegEmphPhrase:
  ------------------
  |  Branch (839:6): [True: 0, False: 764k]
  ------------------
  840|      0|					case CTO_EndEmphPhrase:
  ------------------
  |  Branch (840:6): [True: 0, False: 764k]
  ------------------
  841|      0|						if (hasTypebuf) return;
  ------------------
  |  Branch (841:11): [True: 0, False: 0]
  ------------------
  842|      0|						break;
  843|      0|					case CTO_NoContractSign:
  ------------------
  |  Branch (843:6): [True: 0, False: 764k]
  ------------------
  844|       |						/* This is just a heuristic test. During forward translation, the
  845|       |						   nocontractsign is inserted when the following character is a
  846|       |						   contraction, so CTC_Letter | CTC_Sign */
  847|      0|						if ((afterAttributes & (CTC_Letter | CTC_Sign))) return;
  ------------------
  |  Branch (847:11): [True: 0, False: 0]
  ------------------
  848|      0|						break;
  849|      0|					case CTO_LetterSign:
  ------------------
  |  Branch (849:6): [True: 0, False: 764k]
  ------------------
  850|      0|					case CTO_NoNumberSign:
  ------------------
  |  Branch (850:6): [True: 0, False: 764k]
  ------------------
  851|       |						/* This is just a heuristic test. During forward translation, the
  852|       |						   nonumsign is inserted when in numeric mode and the next
  853|       |						   character is not numeric (CTC_Digit | CTC_LitDigit |
  854|       |						   CTC_NumericMode | CTC_MidEndNumericMode) */
  855|      0|						if (!(beforeAttributes & CTC_Letter) &&
  ------------------
  |  Branch (855:11): [True: 0, False: 0]
  ------------------
  856|      0|								(afterAttributes & (CTC_Letter | CTC_Sign)))
  ------------------
  |  Branch (856:9): [True: 0, False: 0]
  ------------------
  857|      0|							return;
  858|      0|						break;
  859|    152|					case CTO_MultInd:
  ------------------
  |  Branch (859:6): [True: 152, False: 764k]
  ------------------
  860|    152|						if (!multindApplies(table, *currentRule)) break;
  ------------------
  |  Branch (860:11): [True: 5, False: 147]
  ------------------
  861|    147|						*doingMultind = (*currentRule)->charslen;
  862|    147|						*multindRule = *currentRule;
  863|    147|						if (handleMultind(table, currentDotslen, currentOpcode,
  ------------------
  |  Branch (863:11): [True: 147, False: 0]
  ------------------
  864|    147|									currentRule, doingMultind, *multindRule))
  865|    147|							return;
  866|      0|						break;
  867|  2.43k|					case CTO_LargeSign:
  ------------------
  |  Branch (867:6): [True: 2.43k, False: 762k]
  ------------------
  868|  2.43k|						return;
  869|      0|					case CTO_WholeWord:
  ------------------
  |  Branch (869:6): [True: 0, False: 764k]
  ------------------
  870|      0|						if (mode & partialTrans) break;
  ------------------
  |  Branch (870:11): [True: 0, False: 0]
  ------------------
  871|      0|						if (ctx.noContractMode || ctx.itsANumber) break;
  ------------------
  |  Branch (871:11): [True: 0, False: 0]
  |  Branch (871:33): [True: 0, False: 0]
  ------------------
  872|      0|						if ((beforeAttributes & (CTC_Space | CTC_Punctuation)) &&
  ------------------
  |  Branch (872:11): [True: 0, False: 0]
  ------------------
  873|      0|								((afterAttributes & CTC_Space) ||
  ------------------
  |  Branch (873:10): [True: 0, False: 0]
  ------------------
  874|      0|										isEndWord(table, pos, mode, input,
  ------------------
  |  Branch (874:11): [True: 0, False: 0]
  ------------------
  875|      0|												*currentDotslen)))
  876|      0|							return;
  877|      0|						break;
  878|      0|					case CTO_LowWord:
  ------------------
  |  Branch (878:6): [True: 0, False: 764k]
  ------------------
  879|      0|						if (mode & partialTrans) break;
  ------------------
  |  Branch (879:11): [True: 0, False: 0]
  ------------------
  880|      0|						if ((beforeAttributes & CTC_Space) &&
  ------------------
  |  Branch (880:11): [True: 0, False: 0]
  ------------------
  881|      0|								(afterAttributes & CTC_Space) &&
  ------------------
  |  Branch (881:9): [True: 0, False: 0]
  ------------------
  882|      0|								(previousOpcode != CTO_JoinableWord))
  ------------------
  |  Branch (882:9): [True: 0, False: 0]
  ------------------
  883|      0|							return;
  884|      0|						break;
  885|      0|					case CTO_JoinNum:
  ------------------
  |  Branch (885:6): [True: 0, False: 764k]
  ------------------
  886|      0|					case CTO_JoinableWord:
  ------------------
  |  Branch (886:6): [True: 0, False: 764k]
  ------------------
  887|      0|						if ((beforeAttributes & (CTC_Space | CTC_Punctuation)) &&
  ------------------
  |  Branch (887:11): [True: 0, False: 0]
  ------------------
  888|      0|								(!(afterAttributes & CTC_Space) || mode & partialTrans))
  ------------------
  |  Branch (888:10): [True: 0, False: 0]
  |  Branch (888:44): [True: 0, False: 0]
  ------------------
  889|      0|							return;
  890|      0|						break;
  891|      0|					case CTO_SuffixableWord:
  ------------------
  |  Branch (891:6): [True: 0, False: 764k]
  ------------------
  892|      0|						if (ctx.noContractMode || ctx.itsANumber) break;
  ------------------
  |  Branch (892:11): [True: 0, False: 0]
  |  Branch (892:33): [True: 0, False: 0]
  ------------------
  893|      0|						if (beforeAttributes & (CTC_Space | CTC_Punctuation)) return;
  ------------------
  |  Branch (893:11): [True: 0, False: 0]
  ------------------
  894|      0|						break;
  895|     16|					case CTO_PrefixableWord:
  ------------------
  |  Branch (895:6): [True: 16, False: 764k]
  ------------------
  896|     16|						if (ctx.noContractMode || ctx.itsANumber) break;
  ------------------
  |  Branch (896:11): [True: 0, False: 16]
  |  Branch (896:33): [True: 0, False: 16]
  ------------------
  897|     16|						if ((beforeAttributes &
  ------------------
  |  Branch (897:11): [True: 16, False: 0]
  ------------------
  898|     16|									(CTC_Space | CTC_Letter | CTC_Punctuation)) &&
  899|     16|								isEndWord(table, pos, mode, input, *currentDotslen))
  ------------------
  |  Branch (899:9): [True: 1, False: 15]
  ------------------
  900|      1|							return;
  901|     15|						break;
  902|     15|					case CTO_BegWord:
  ------------------
  |  Branch (902:6): [True: 0, False: 764k]
  ------------------
  903|      0|						if (ctx.noContractMode == NO_CONTRACT_ACTIVE) break;
  ------------------
  |  |   55|      0|#define NO_CONTRACT_ACTIVE 1 /* after nocontractsign, contractions suppressed */
  ------------------
  |  Branch (903:11): [True: 0, False: 0]
  ------------------
  904|      0|						if ((beforeAttributes & (CTC_Space | CTC_Punctuation)) &&
  ------------------
  |  Branch (904:11): [True: 0, False: 0]
  ------------------
  905|      0|								(!isEndWord(table, pos, mode, input, *currentDotslen)))
  ------------------
  |  Branch (905:9): [True: 0, False: 0]
  ------------------
  906|      0|							return;
  907|      0|						break;
  908|      0|					case CTO_BegMidWord:
  ------------------
  |  Branch (908:6): [True: 0, False: 764k]
  ------------------
  909|      0|						if ((beforeAttributes &
  ------------------
  |  Branch (909:11): [True: 0, False: 0]
  ------------------
  910|      0|									(CTC_Letter | CTC_Space | CTC_Punctuation)) &&
  911|      0|								(!isEndWord(table, pos, mode, input, *currentDotslen)))
  ------------------
  |  Branch (911:9): [True: 0, False: 0]
  ------------------
  912|      0|							return;
  913|      0|						break;
  914|      0|					case CTO_PartWord:
  ------------------
  |  Branch (914:6): [True: 0, False: 764k]
  ------------------
  915|      0|						if (!(beforeAttributes & CTC_LitDigit) &&
  ------------------
  |  Branch (915:11): [True: 0, False: 0]
  ------------------
  916|      0|								(beforeAttributes & CTC_Letter ||
  ------------------
  |  Branch (916:10): [True: 0, False: 0]
  ------------------
  917|      0|										!isEndWord(table, pos, mode, input,
  ------------------
  |  Branch (917:11): [True: 0, False: 0]
  ------------------
  918|      0|												*currentDotslen)))
  919|      0|							return;
  920|      0|						break;
  921|      0|					case CTO_MidWord:
  ------------------
  |  Branch (921:6): [True: 0, False: 764k]
  ------------------
  922|      0|						if (beforeAttributes & CTC_Letter &&
  ------------------
  |  Branch (922:11): [True: 0, False: 0]
  ------------------
  923|      0|								!isEndWord(table, pos, mode, input, *currentDotslen))
  ------------------
  |  Branch (923:9): [True: 0, False: 0]
  ------------------
  924|      0|							return;
  925|      0|						break;
  926|      0|					case CTO_MidEndWord:
  ------------------
  |  Branch (926:6): [True: 0, False: 764k]
  ------------------
  927|      0|						if ((beforeAttributes & CTC_Letter)) return;
  ------------------
  |  Branch (927:11): [True: 0, False: 0]
  ------------------
  928|      0|						break;
  929|  4.10k|					case CTO_EndWord:
  ------------------
  |  Branch (929:6): [True: 4.10k, False: 760k]
  ------------------
  930|  4.10k|						if ((beforeAttributes & CTC_Letter) &&
  ------------------
  |  Branch (930:11): [True: 4.09k, False: 12]
  ------------------
  931|  4.09k|								isEndWord(table, pos, mode, input, *currentDotslen))
  ------------------
  |  Branch (931:9): [True: 2, False: 4.09k]
  ------------------
  932|      2|							return;
  933|  4.10k|						break;
  934|  4.10k|					case CTO_BegNum:
  ------------------
  |  Branch (934:6): [True: 0, False: 764k]
  ------------------
  935|      0|						if (beforeAttributes & (CTC_Space | CTC_Punctuation) &&
  ------------------
  |  Branch (935:11): [True: 0, False: 0]
  ------------------
  936|      0|								(afterAttributes & (CTC_LitDigit | CTC_Sign)))
  ------------------
  |  Branch (936:9): [True: 0, False: 0]
  ------------------
  937|      0|							return;
  938|      0|						break;
  939|      0|					case CTO_MidNum:
  ------------------
  |  Branch (939:6): [True: 0, False: 764k]
  ------------------
  940|      0|						if (beforeAttributes & CTC_Digit &&
  ------------------
  |  Branch (940:11): [True: 0, False: 0]
  ------------------
  941|      0|								afterAttributes & CTC_LitDigit)
  ------------------
  |  Branch (941:9): [True: 0, False: 0]
  ------------------
  942|      0|							return;
  943|      0|						break;
  944|    221|					case CTO_EndNum:
  ------------------
  |  Branch (944:6): [True: 221, False: 764k]
  ------------------
  945|    221|						if (ctx.itsANumber && !(afterAttributes & CTC_LitDigit)) return;
  ------------------
  |  Branch (945:11): [True: 0, False: 221]
  |  Branch (945:29): [True: 0, False: 0]
  ------------------
  946|    221|						break;
  947|    221|					case CTO_DecPoint:
  ------------------
  |  Branch (947:6): [True: 0, False: 764k]
  ------------------
  948|      0|						if (afterAttributes & (CTC_Digit | CTC_LitDigit)) return;
  ------------------
  |  Branch (948:11): [True: 0, False: 0]
  ------------------
  949|      0|						break;
  950|  16.9k|					case CTO_PrePunc:
  ------------------
  |  Branch (950:6): [True: 16.9k, False: 747k]
  ------------------
  951|  16.9k|						if (isBegWord(table, output)) return;
  ------------------
  |  Branch (951:11): [True: 16.9k, False: 0]
  ------------------
  952|      0|						break;
  953|       |
  954|  8.19k|					case CTO_PostPunc:
  ------------------
  |  Branch (954:6): [True: 8.19k, False: 756k]
  ------------------
  955|  8.19k|						if (isEndWord(table, pos, mode, input, *currentDotslen)) return;
  ------------------
  |  Branch (955:11): [True: 8, False: 8.19k]
  ------------------
  956|  8.19k|						break;
  957|  8.19k|					case CTO_Always:
  ------------------
  |  Branch (957:6): [True: 4, False: 764k]
  ------------------
  958|      4|						if ((beforeAttributes & CTC_LitDigit) &&
  ------------------
  |  Branch (958:11): [True: 0, False: 4]
  ------------------
  959|      0|								(afterAttributes & CTC_LitDigit) &&
  ------------------
  |  Branch (959:9): [True: 0, False: 0]
  ------------------
  960|      0|								(*currentRule)->charslen > 1)
  ------------------
  |  Branch (960:9): [True: 0, False: 0]
  ------------------
  961|      0|							break;
  962|      4|						return;
  963|       |
  964|   112k|					case CTO_BackMatch: {
  ------------------
  |  Branch (964:6): [True: 112k, False: 652k]
  ------------------
  965|   112k|						widechar *patterns, *pattern;
  966|       |
  967|       |						// if(dontContract || (mode & noContractions))
  968|       |						//	break;
  969|       |						// if(checkEmphasisChange(0))
  970|       |						//	break;
  971|       |
  972|   112k|						patterns = (widechar *)&table->ruleArea[(*currentRule)->patterns];
  973|       |
  974|       |						/* check before pattern */
  975|   112k|						pattern = &patterns[1];
  976|   112k|						if (!_lou_pattern_check(
  ------------------
  |  Branch (976:11): [True: 37.3k, False: 75.4k]
  ------------------
  977|   112k|									input->chars, pos - 1, -1, -1, pattern, table))
  978|  37.3k|							break;
  979|       |
  980|       |						/* check after pattern */
  981|  75.4k|						pattern = &patterns[patterns[0]];
  982|  75.4k|						if (!_lou_pattern_check(input->chars,
  ------------------
  |  Branch (982:11): [True: 71.4k, False: 4.09k]
  ------------------
  983|  75.4k|									pos + (*currentRule)->dotslen, input->length, 1,
  984|  75.4k|									pattern, table))
  985|  71.4k|							break;
  986|       |
  987|  4.09k|						return;
  988|  75.4k|					}
  989|  4.09k|					default:
  ------------------
  |  Branch (989:6): [True: 0, False: 764k]
  ------------------
  990|      0|						break;
  991|   764k|					}
  992|   764k|				}
  993|   764k|			} /* Done with checking this rule */
  994|   139k|			ruleOffset = (*currentRule)->dotsnext;
  995|   139k|		}
  996|  1.63M|	}
  997|   819k|}
lou_backTranslateString.c:handleMultind:
  647|   820k|		int *doingMultind, const TranslationTableRule *multindRule) {
  648|       |	/* Handle multiple braille indicators. The opcodes of the multind rule are
  649|       |	 * applied one at a time, in order, skipping any whose indicator is not defined
  650|       |	 * in the table. The cells of the multind rule are consumed all at once, by the
  651|       |	 * last indicator, so that every indicator is applied before the position
  652|       |	 * moves on. */
  653|   820k|	while (*doingMultind) {
  ------------------
  |  Branch (653:9): [True: 735, False: 819k]
  ------------------
  654|    735|		const widechar *opcodes = multindRule->charsdots;
  655|    735|		int count = multindRule->charslen;
  656|    735|		TranslationTableOffset offset =
  657|    735|				multindIndicator(table, opcodes[count - *doingMultind]);
  658|    735|		(*doingMultind)--;
  659|    735|		if (!findBrailleIndicatorRule(
  ------------------
  |  Branch (659:7): [True: 294, False: 441]
  ------------------
  660|    735|					offset, table, currentDotslen, currentOpcode, currentRule))
  661|    294|			continue;
  662|    441|		while (*doingMultind && !multindIndicator(table, opcodes[count - *doingMultind]))
  ------------------
  |  Branch (662:10): [True: 294, False: 147]
  |  Branch (662:27): [True: 0, False: 294]
  ------------------
  663|      0|			(*doingMultind)--;
  664|    441|		*currentDotslen = *doingMultind ? 0 : multindRule->dotslen;
  ------------------
  |  Branch (664:21): [True: 294, False: 147]
  ------------------
  665|    441|		return 1;
  666|    735|	}
  667|   819k|	return 0;
  668|   820k|}
lou_backTranslateString.c:multindIndicator:
  589|  1.77k|multindIndicator(const TranslationTableHeader *table, widechar opcode) {
  590|  1.77k|	switch (opcode) {
  591|    299|	case CTO_CapsLetter:  // FIXME: make sure this works
  ------------------
  |  Branch (591:2): [True: 299, False: 1.48k]
  ------------------
  592|    299|		return table->emphRules[MAX_EMPH_CLASSES][letterOffset];
  ------------------
  |  |   82|    299|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  593|       |	// NOTE:  following fixme is based on the names at the time of
  594|       |	//        commit f22f91eb510cb4eef33dfb4950a297235dd2f9f1.
  595|       |	// FIXME: the next two opcodes were begcaps/endcaps,
  596|       |	//        and they were aliased to opcodes capsword/capswordstop.
  597|       |	//        However, the table attributes they use are
  598|       |	//        table->beginCapitalSign and table->endCapitalSign.
  599|       |	//        These are actually compiled with firstlettercaps/lastlettercaps.
  600|       |	//        Which to use here?
  601|      5|	case CTO_BegCapsWord:
  ------------------
  |  Branch (601:2): [True: 5, False: 1.77k]
  ------------------
  602|      5|		return table->emphRules[MAX_EMPH_CLASSES][begWordOffset];
  ------------------
  |  |   82|      5|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  603|      0|	case CTO_EndCapsWord:
  ------------------
  |  Branch (603:2): [True: 0, False: 1.77k]
  ------------------
  604|      0|		return table->emphRules[MAX_EMPH_CLASSES][endWordOffset];
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  605|      0|	case CTO_BegCapsPhrase:
  ------------------
  |  Branch (605:2): [True: 0, False: 1.77k]
  ------------------
  606|      0|		return table->emphRules[MAX_EMPH_CLASSES][begPhraseOffset];
  ------------------
  |  |   82|      0|#define MAX_EMPH_CLASSES 10	  // maximal number of emphasis classes
  ------------------
  607|      0|	case CTO_LetterSign:
  ------------------
  |  Branch (607:2): [True: 0, False: 1.77k]
  ------------------
  608|      0|		return table->letterSign;
  609|      0|	case CTO_NoContractSign:
  ------------------
  |  Branch (609:2): [True: 0, False: 1.77k]
  ------------------
  610|      0|		return table->noContractSign;
  611|      0|	case CTO_NumberSign:
  ------------------
  |  Branch (611:2): [True: 0, False: 1.77k]
  ------------------
  612|      0|		return table->numberSign;
  613|      0|	case CTO_NoNumberSign:
  ------------------
  |  Branch (613:2): [True: 0, False: 1.77k]
  ------------------
  614|      0|		return table->noNumberSign;
  615|    294|	case CTO_BegComp:
  ------------------
  |  Branch (615:2): [True: 294, False: 1.48k]
  ------------------
  616|    294|		return table->begComp;
  617|    887|	case CTO_EndComp:
  ------------------
  |  Branch (617:2): [True: 887, False: 892]
  ------------------
  618|    887|		return table->endComp;
  619|    294|	default:
  ------------------
  |  Branch (619:2): [True: 294, False: 1.48k]
  ------------------
  620|    294|		return 0;
  621|  1.77k|	}
  622|  1.77k|}
lou_backTranslateString.c:findBrailleIndicatorRule:
  505|    735|		TranslationTableOpcode *currentOpcode, const TranslationTableRule **currentRule) {
  506|    735|	if (!offset) return 0;
  ------------------
  |  Branch (506:6): [True: 294, False: 441]
  ------------------
  507|    441|	*currentRule = (TranslationTableRule *)&table->ruleArea[offset];
  508|    441|	*currentOpcode = (*currentRule)->opcode;
  509|    441|	*currentDotslen = (*currentRule)->dotslen;
  510|    441|	return 1;
  511|    735|}
lou_backTranslateString.c:compareDots:
  433|   781k|compareDots(const widechar *address1, const widechar *address2, int count) {
  434|   781k|	int k;
  435|   781k|	if (!count) return 0;
  ------------------
  |  Branch (435:6): [True: 0, False: 781k]
  ------------------
  436|  1.54M|	for (k = 0; k < count; k++)
  ------------------
  |  Branch (436:14): [True: 781k, False: 764k]
  ------------------
  437|   781k|		if (address1[k] != address2[k]) return 0;
  ------------------
  |  Branch (437:7): [True: 16.4k, False: 765k]
  ------------------
  438|   764k|	return 1;
  439|   781k|}
lou_backTranslateString.c:back_setAfter:
  450|   764k|		const InString *input, TranslationTableCharacterAttributes *afterAttributes) {
  451|   764k|	widechar after = (pos + length < input->length) ? input->chars[pos + length] : ' ';
  ------------------
  |  Branch (451:19): [True: 702k, False: 62.5k]
  ------------------
  452|   764k|	*afterAttributes = (getDots(after, table))->attributes;
  453|   764k|}
lou_backTranslateString.c:multindApplies:
  629|    152|		const TranslationTableHeader *table, const TranslationTableRule *multindRule) {
  630|    152|	int found = 0;
  631|    152|	int k;
  632|    897|	for (k = 0; k < multindRule->charslen; k++) {
  ------------------
  |  Branch (632:14): [True: 750, False: 147]
  ------------------
  633|    750|		TranslationTableOffset offset =
  634|    750|				multindIndicator(table, multindRule->charsdots[k]);
  635|    750|		if (!offset) continue;
  ------------------
  |  Branch (635:7): [True: 304, False: 446]
  ------------------
  636|    446|		if (((TranslationTableRule *)&table->ruleArea[offset])->dotslen >
  ------------------
  |  Branch (636:7): [True: 5, False: 441]
  ------------------
  637|    446|				multindRule->dotslen)
  638|      5|			return 0;
  639|    441|		found = 1;
  640|    441|	}
  641|    147|	return found;
  642|    152|}
lou_backTranslateString.c:isEndWord:
  471|  12.3k|		int currentDotslen) {
  472|  12.3k|	if (mode & partialTrans) return 0;
  ------------------
  |  Branch (472:6): [True: 0, False: 12.3k]
  ------------------
  473|       |	/* See if this is really the end of a word. */
  474|  12.3k|	int k;
  475|  12.3k|	const TranslationTableCharacter *dots;
  476|  12.3k|	TranslationTableOffset testRuleOffset;
  477|  12.3k|	TranslationTableRule *testRule;
  478|  12.3k|	for (k = pos + currentDotslen; k < input->length; k++) {
  ------------------
  |  Branch (478:33): [True: 12.3k, False: 4]
  ------------------
  479|  12.3k|		int postpuncFound = 0;
  480|  12.3k|		int TranslationFound = 0;
  481|  12.3k|		dots = getDots(input->chars[k], table);
  482|  12.3k|		testRuleOffset = dots->otherRules;
  483|  12.3k|		if (dots->attributes & CTC_Space) break;
  ------------------
  |  Branch (483:7): [True: 7, False: 12.3k]
  ------------------
  484|  12.3k|		if (dots->attributes & CTC_Letter) return 0;
  ------------------
  |  Branch (484:7): [True: 12.2k, False: 21]
  ------------------
  485|     42|		while (testRuleOffset) {
  ------------------
  |  Branch (485:10): [True: 21, False: 21]
  ------------------
  486|     21|			testRule = (TranslationTableRule *)&table->ruleArea[testRuleOffset];
  487|       |			/* #360: Don't treat begword/midword as definite translations here
  488|       |			 * because we don't know whether they apply yet. Subsequent
  489|       |			 * input will allow us to determine whether the word continues.
  490|       |			 */
  491|     21|			if (testRule->charslen > 1 && testRule->opcode != CTO_BegWord &&
  ------------------
  |  Branch (491:8): [True: 21, False: 0]
  |  Branch (491:34): [True: 21, False: 0]
  ------------------
  492|     21|					testRule->opcode != CTO_MidWord)
  ------------------
  |  Branch (492:6): [True: 21, False: 0]
  ------------------
  493|     21|				TranslationFound = 1;
  494|     21|			if (testRule->opcode == CTO_PostPunc) postpuncFound = 1;
  ------------------
  |  Branch (494:8): [True: 21, False: 0]
  ------------------
  495|     21|			if (testRule->opcode == CTO_Hyphen) return 1;
  ------------------
  |  Branch (495:8): [True: 0, False: 21]
  ------------------
  496|     21|			testRuleOffset = testRule->dotsnext;
  497|     21|		}
  498|     21|		if (TranslationFound && !postpuncFound) return 0;
  ------------------
  |  Branch (498:7): [True: 21, False: 0]
  |  Branch (498:27): [True: 0, False: 21]
  ------------------
  499|     21|	}
  500|     11|	return 1;
  501|  12.3k|}
lou_backTranslateString.c:isBegWord:
  456|  16.9k|isBegWord(const TranslationTableHeader *table, OutString *output) {
  457|       |	/* See if this is really the beginning of a word. Look at what has
  458|       |	 * already been translated. */
  459|  16.9k|	int k;
  460|  16.9k|	if (output->length == 0) return 1;
  ------------------
  |  Branch (460:6): [True: 0, False: 16.9k]
  ------------------
  461|   139M|	for (k = output->length - 1; k >= 0; k--) {
  ------------------
  |  Branch (461:31): [True: 139M, False: 0]
  ------------------
  462|   139M|		const TranslationTableCharacter *ch = getChar(output->chars[k], table);
  463|   139M|		if (ch->attributes & CTC_Space) break;
  ------------------
  |  Branch (463:7): [True: 16.9k, False: 139M]
  ------------------
  464|   139M|		if (ch->attributes & (CTC_Letter | CTC_Digit | CTC_Math | CTC_Sign)) return 0;
  ------------------
  |  Branch (464:7): [True: 0, False: 139M]
  ------------------
  465|   139M|	}
  466|  16.9k|	return 1;
  467|  16.9k|}
lou_backTranslateString.c:passSelectRule:
 1882|  2.79M|		int *passIC, PassRuleMatch *match) {
 1883|  2.79M|	if (!findBackPassRule(table, pos, currentPass, input, currentOpcode, currentRule,
  ------------------
  |  Branch (1883:6): [True: 2.16M, False: 627k]
  ------------------
 1884|  2.79M|				passInstructions, passIC, match)) {
 1885|  2.16M|		*currentOpcode = CTO_Always;
 1886|  2.16M|	}
 1887|  2.79M|}
lou_backTranslateString.c:checkDotsAttr:
  422|  1.10M|		const TranslationTableHeader *table) {
  423|  1.10M|	static widechar prevd = 0;
  424|  1.10M|	static TranslationTableCharacterAttributes preva = 0;
  425|  1.10M|	if (d != prevd) {
  ------------------
  |  Branch (425:6): [True: 390k, False: 717k]
  ------------------
  426|   390k|		preva = (getDots(d, table))->attributes;
  427|   390k|		prevd = d;
  428|   390k|	}
  429|  1.10M|	return ((preva & a) ? 1 : 0);
  ------------------
  |  Branch (429:10): [True: 1.00M, False: 105k]
  ------------------
  430|  1.10M|}
lou_backTranslateString.c:translatePass:
 1893|    139|		int *appliedRulesCount, int maxAppliedRules) {
 1894|    139|	int pos;
 1895|    139|	int posIncremented = 1;
 1896|    139|	TranslationContext ctx = { .nextUpper = 0,
 1897|    139|		.allUpper = 0,
 1898|    139|		.allUpperPhrase = 0,
 1899|    139|		.itsANumber = 0,
 1900|    139|		.noContractMode = NO_CONTRACT_OFF };
  ------------------
  |  |   54|    139|#define NO_CONTRACT_OFF 0	 /* not in nocontractsign scope */
  ------------------
 1901|    139|	pos = output->length = 0;
 1902|    139|	_lou_resetPassVariables();
 1903|  2.47M|	while (pos < input->length) { /* the main multipass translation loop */
  ------------------
  |  Branch (1903:9): [True: 2.47M, False: 84]
  ------------------
 1904|  2.47M|		int posBefore = pos;
 1905|  2.47M|		TranslationTableOpcode currentOpcode;
 1906|  2.47M|		const TranslationTableRule *currentRule; /* pointer to current rule in table */
 1907|  2.47M|		const widechar *passInstructions;
 1908|  2.47M|		int passIC; /* Instruction counter */
 1909|  2.47M|		PassRuleMatch patternMatch;
 1910|  2.47M|		if (!posIncremented)
  ------------------
  |  Branch (1910:7): [True: 461k, False: 2.01M]
  ------------------
 1911|   461k|			currentOpcode = CTO_Always;
 1912|  2.01M|		else
 1913|  2.01M|			passSelectRule(table, pos, currentPass, input, &currentOpcode, &currentRule,
 1914|  2.01M|					&passInstructions, &passIC, &patternMatch);
 1915|  2.47M|		switch (currentOpcode) {
 1916|  68.1k|		case CTO_Pass2:
  ------------------
  |  Branch (1916:3): [True: 68.1k, False: 2.40M]
  ------------------
 1917|   269k|		case CTO_Pass3:
  ------------------
  |  Branch (1917:3): [True: 201k, False: 2.27M]
  ------------------
 1918|   478k|		case CTO_Pass4:
  ------------------
  |  Branch (1918:3): [True: 208k, False: 2.26M]
  ------------------
 1919|   478k|			if (appliedRules != NULL && *appliedRulesCount < maxAppliedRules)
  ------------------
  |  Branch (1919:8): [True: 0, False: 478k]
  |  Branch (1919:32): [True: 0, False: 0]
  ------------------
 1920|      0|				appliedRules[(*appliedRulesCount)++] = currentRule;
 1921|   478k|			if (!back_passDoAction(table, &pos, mode, input, output, posMapping,
  ------------------
  |  Branch (1921:8): [True: 30, False: 478k]
  ------------------
 1922|   478k|						cursorPosition, cursorStatus, &ctx, currentOpcode, currentRule,
 1923|   478k|						passInstructions, passIC, patternMatch))
 1924|     30|				goto failure;
 1925|   478k|			break;
 1926|  1.99M|		case CTO_Always:
  ------------------
  |  Branch (1926:3): [True: 1.99M, False: 478k]
  ------------------
 1927|  1.99M|			if ((output->length + 1) > output->maxlength) goto failure;
  ------------------
  |  Branch (1927:8): [True: 25, False: 1.99M]
  ------------------
 1928|  1.99M|			posMapping[pos] = output->length;
 1929|  1.99M|			output->chars[(output->length)++] = input->chars[pos++];
 1930|  1.99M|			break;
 1931|      0|		default:
  ------------------
  |  Branch (1931:3): [True: 0, False: 2.47M]
  ------------------
 1932|      0|			goto failure;
 1933|  2.47M|		}
 1934|  2.47M|		posIncremented = pos > posBefore;
 1935|  2.47M|	}
 1936|    139|failure:
 1937|    139|	if (pos < input->length) {
  ------------------
  |  Branch (1937:6): [True: 55, False: 84]
  ------------------
 1938|   127k|		while (checkDotsAttr(input->chars[pos], CTC_Space, table))
  ------------------
  |  Branch (1938:10): [True: 127k, False: 13]
  ------------------
 1939|   127k|			if (++pos == input->length) break;
  ------------------
  |  Branch (1939:8): [True: 42, False: 127k]
  ------------------
 1940|     55|	}
 1941|    139|	*realInlen = pos;
 1942|    139|	return 1;
 1943|    139|}

_lou_freeTableIndex:
 1021|    138|_lou_freeTableIndex(void) {
 1022|    138|	list_free(tableIndex);
 1023|       |	tableIndex = NULL;
 1024|    138|}
metadata.c:list_free:
  108|    138|list_free(List *list) {
  109|    138|	if (list) {
  ------------------
  |  Branch (109:6): [True: 0, False: 138]
  ------------------
  110|      0|		if (list->free) list->free(list->head);
  ------------------
  |  Branch (110:7): [True: 0, False: 0]
  ------------------
  111|      0|		list_free(list->tail);
  112|      0|		free(list);
  113|      0|	}
  114|    138|}

_lou_pattern_compile:
 1189|     20|		const int expr_max, TranslationTableHeader *table, const FileInfo *nested) {
 1190|     20|	int input_crs;
 1191|       |
 1192|     20|	input_crs = 0;
 1193|     20|	expr_data[0] = 2;
 1194|     20|	expr_data[1] = 0;
 1195|       |
 1196|     20|	if (table == NULL || nested == NULL) return 0;
  ------------------
  |  Branch (1196:6): [True: 0, False: 20]
  |  Branch (1196:23): [True: 0, False: 20]
  ------------------
 1197|       |
 1198|     20|	if (!pattern_compile_1(input, input_max, &input_crs, expr_data, expr_max,
  ------------------
  |  Branch (1198:6): [True: 0, False: 20]
  ------------------
 1199|     20|				&expr_data[0], &expr_data[1], table, nested))
 1200|      0|		return 0;
 1201|       |
 1202|       |	/* shift past the last end */
 1203|     20|	expr_data[0] += 3;
 1204|       |
 1205|     20|	if (!pattern_compile_2(expr_data, 2, expr_max, &expr_data[0])) return 0;
  ------------------
  |  Branch (1205:6): [True: 0, False: 20]
  ------------------
 1206|       |
 1207|     20|	if (!pattern_compile_3(expr_data, 2, expr_max, &expr_data[0])) return 0;
  ------------------
  |  Branch (1207:6): [True: 0, False: 20]
  ------------------
 1208|       |
 1209|     20|	return expr_data[0];
 1210|     20|}
_lou_pattern_reverse:
 1282|     10|_lou_pattern_reverse(widechar *expr_data) {
 1283|     10|	pattern_reverse_expression(expr_data, 2);
 1284|     10|}
_lou_pattern_check:
 1624|   188k|		const TranslationTableHeader *table) {
 1625|       |#ifdef CHECK_OUTPUT_DEFINED
 1626|       |	pattern_output(expr_data, table);
 1627|       |#endif
 1628|   188k|	return pattern_check_hook(
 1629|   188k|			input, input_start, input_minmax, input_dir, expr_data, NULL, NULL, 0, table);
 1630|   188k|}
pattern.c:pattern_compile_1:
  995|    106|		TranslationTableHeader *table, const FileInfo *nested) {
  996|    106|	int expr_crs_prv;
  997|       |
  998|    106|	if (*expr_crs + 6 >= expr_max) return 0;
  ------------------
  |  Branch (998:6): [True: 0, False: 106]
  ------------------
  999|       |
 1000|    106|	expr_crs_prv = *expr_crs;
 1001|       |
 1002|       |	/* setup start expression */
 1003|    106|	EXPR_TYPE(*expr_crs) = PTN_START;
  ------------------
  |  |  107|    106|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    106|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1004|    106|	EXPR_PRV(*expr_crs) = PTN_END;
  ------------------
  |  |  108|    106|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    106|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1005|    106|	*expr_crs += 3;
 1006|    106|	EXPR_NXT(expr_crs_prv) = *expr_crs;
  ------------------
  |  |  109|    106|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    106|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1007|       |
 1008|       |	/* setup end expression */
 1009|    106|	EXPR_TYPE(*expr_crs) = PTN_END;
  ------------------
  |  |  107|    106|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    106|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1010|    106|	EXPR_PRV(*expr_crs) = expr_crs_prv;
  ------------------
  |  |  108|    106|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    106|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1011|    106|	EXPR_NXT(*expr_crs) = PTN_END;
  ------------------
  |  |  109|    106|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    106|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1012|       |
 1013|  2.14k|	while (*input_crs < input_max) {
  ------------------
  |  Branch (1013:9): [True: 2.03k, False: 106]
  ------------------
 1014|  2.03k|		expr_crs_prv = *expr_crs;
 1015|  2.03k|		if (!pattern_compile_expression(input, input_max, input_crs, expr_data, expr_max,
  ------------------
  |  Branch (1015:7): [True: 0, False: 2.03k]
  ------------------
 1016|  2.03k|					expr_crs, loop_cnts, table, nested))
 1017|      0|			return 0;
 1018|       |
 1019|       |		/* setup end expression */
 1020|  2.03k|		if (*expr_crs + 3 >= expr_max) return 0;
  ------------------
  |  Branch (1020:7): [True: 0, False: 2.03k]
  ------------------
 1021|  2.03k|		EXPR_NXT(expr_crs_prv) = *expr_crs;
  ------------------
  |  |  109|  2.03k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  2.03k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1022|  2.03k|		EXPR_TYPE(*expr_crs) = PTN_END;
  ------------------
  |  |  107|  2.03k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.03k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1023|  2.03k|		EXPR_PRV(*expr_crs) = expr_crs_prv;
  ------------------
  |  |  108|  2.03k|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|  2.03k|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1024|  2.03k|		EXPR_NXT(*expr_crs) = PTN_END;
  ------------------
  |  |  109|  2.03k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  2.03k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1025|       |
 1026|       |		/* insert seqafterexpression before attributes of seqafterchars */
 1027|       |		// if(EXPR_TYPE(expr_crs_prv) == PTN_ATTRIBUTES)
 1028|       |		// if(EXPR_DATA_1(expr_crs_prv) & CTC_SeqAfter)
 1029|       |		// {
 1030|       |		// 	i = 0;
 1031|       |		// 	pattern_insert_alternate(table->seqAfterExpression,
 1032|       |		// 		table->seqAfterExpressionLength, &i, expr_data, expr_max,
 1033|       |		// 		expr_crs, loop_cnts, expr_crs_prv);
 1034|       |		// }
 1035|  2.03k|	}
 1036|       |
 1037|    106|	return *expr_crs;
 1038|    106|}
pattern.c:pattern_compile_expression:
  600|  2.04k|		TranslationTableHeader *table, const FileInfo *nested) {
  601|  2.04k|	widechar *data;
  602|  2.04k|	int expr_start, expr_end, expr_sub, expr_crs_prv;
  603|  2.04k|	int input_end;
  604|  2.04k|	int attrs0, attrs1;
  605|  2.04k|	int set, esc, nest, i;
  606|       |
  607|  2.04k|	if (*input_crs >= input_max) return 0;
  ------------------
  |  Branch (607:6): [True: 0, False: 2.04k]
  ------------------
  608|  2.04k|	switch (input[*input_crs]) {
  609|     86|	case '(':
  ------------------
  |  Branch (609:2): [True: 86, False: 1.95k]
  ------------------
  610|       |
  611|     86|		if (*expr_crs + 10 >= expr_max) return 0;
  ------------------
  |  Branch (611:7): [True: 0, False: 86]
  ------------------
  612|       |
  613|     86|		(*input_crs)++;
  614|     86|		if (*input_crs >= input_max) return 0;
  ------------------
  |  Branch (614:7): [True: 0, False: 86]
  ------------------
  615|       |
  616|       |		/* find closing parenthesis */
  617|     86|		nest = esc = 0;
  618|  4.88k|		for (input_end = *input_crs; input_end < input_max; input_end++) {
  ------------------
  |  Branch (618:32): [True: 4.88k, False: 0]
  ------------------
  619|  4.88k|			if (input[input_end] == '\\' && !esc) {
  ------------------
  |  Branch (619:8): [True: 0, False: 4.88k]
  |  Branch (619:36): [True: 0, False: 0]
  ------------------
  620|      0|				esc = 1;
  621|      0|				continue;
  622|      0|			}
  623|       |
  624|  4.88k|			if (input[input_end] == '(' && !esc)
  ------------------
  |  Branch (624:8): [True: 640, False: 4.24k]
  |  Branch (624:35): [True: 640, False: 0]
  ------------------
  625|    640|				nest++;
  626|  4.24k|			else if (input[input_end] == ')' && !esc) {
  ------------------
  |  Branch (626:13): [True: 726, False: 3.52k]
  |  Branch (626:40): [True: 726, False: 0]
  ------------------
  627|    726|				if (nest)
  ------------------
  |  Branch (627:9): [True: 640, False: 86]
  ------------------
  628|    640|					nest--;
  629|     86|				else
  630|     86|					break;
  631|    726|			}
  632|       |
  633|  4.80k|			esc = 0;
  634|  4.80k|		}
  635|     86|		if (input_end >= input_max) return 0;
  ------------------
  |  Branch (635:7): [True: 0, False: 86]
  ------------------
  636|       |
  637|     86|		EXPR_TYPE(*expr_crs) = PTN_GROUP;
  ------------------
  |  |  107|     86|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|     86|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  638|       |
  639|       |		/* compile sub expressions */
  640|     86|		expr_crs_prv = *expr_crs;
  641|     86|		*expr_crs += 4;
  642|     86|		EXPR_DATA_0(expr_crs_prv) = *expr_crs;
  ------------------
  |  |  110|     86|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|     86|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
  643|     86|		expr_sub = *expr_crs;
  644|     86|		EXPR_TYPE(expr_sub) = PTN_ERROR;
  ------------------
  |  |  107|     86|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|     86|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  645|     86|		EXPR_PRV(expr_sub) = PTN_END;
  ------------------
  |  |  108|     86|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|     86|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
  646|     86|		EXPR_NXT(expr_sub) = PTN_END;
  ------------------
  |  |  109|     86|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|     86|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  647|     86|		if (!pattern_compile_1(input, input_end, input_crs, expr_data, expr_max, expr_crs,
  ------------------
  |  Branch (647:7): [True: 0, False: 86]
  ------------------
  648|     86|					loop_cnts, table, nested))
  649|      0|			return 0;
  650|     86|		(*input_crs)++;
  651|       |
  652|       |		/* reset end expression */
  653|     86|		expr_end = *expr_crs;
  654|     86|		EXPR_NXT(expr_end) = expr_crs_prv;
  ------------------
  |  |  109|     86|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|     86|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  655|       |
  656|     86|		return *expr_crs += 3;
  657|       |
  658|      6|	case '!':
  ------------------
  |  Branch (658:2): [True: 6, False: 2.03k]
  ------------------
  659|       |
  660|      6|		if (*expr_crs + 10 >= expr_max) return 0;
  ------------------
  |  Branch (660:7): [True: 0, False: 6]
  ------------------
  661|       |
  662|      6|		(*input_crs)++;
  663|      6|		EXPR_TYPE(*expr_crs) = PTN_NOT;
  ------------------
  |  |  107|      6|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      6|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  664|      6|		expr_crs_prv = *expr_crs;
  665|      6|		*expr_crs += 4;
  666|      6|		EXPR_DATA_0(expr_crs_prv) = *expr_crs;
  ------------------
  |  |  110|      6|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      6|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
  667|       |
  668|       |		/* create start expression */
  669|      6|		expr_start = *expr_crs;
  670|      6|		EXPR_TYPE(expr_start) = PTN_START;
  ------------------
  |  |  107|      6|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      6|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  671|      6|		EXPR_PRV(expr_start) = PTN_END;
  ------------------
  |  |  108|      6|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      6|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
  672|      6|		*expr_crs += 3;
  673|      6|		EXPR_NXT(expr_start) = *expr_crs;
  ------------------
  |  |  109|      6|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      6|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  674|       |
  675|       |		/* compile sub expression */
  676|      6|		expr_sub = *expr_crs;
  677|      6|		EXPR_TYPE(expr_sub) = PTN_ERROR;
  ------------------
  |  |  107|      6|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      6|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  678|      6|		EXPR_PRV(expr_sub) = expr_start;
  ------------------
  |  |  108|      6|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      6|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
  679|      6|		EXPR_NXT(expr_sub) = PTN_END;
  ------------------
  |  |  109|      6|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      6|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  680|       |
  681|      6|		if (!pattern_compile_expression(input, input_max, input_crs, expr_data, expr_max,
  ------------------
  |  Branch (681:7): [True: 0, False: 6]
  ------------------
  682|      6|					expr_crs, loop_cnts, table, nested))
  683|      0|			return 0;
  684|       |
  685|      6|		if (*expr_crs + 3 >= expr_max) return 0;
  ------------------
  |  Branch (685:7): [True: 0, False: 6]
  ------------------
  686|       |
  687|      6|		EXPR_NXT(expr_sub) = *expr_crs;
  ------------------
  |  |  109|      6|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      6|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  688|       |
  689|       |		/* create end expression */
  690|      6|		expr_end = *expr_crs;
  691|      6|		EXPR_TYPE(expr_end) = PTN_END;
  ------------------
  |  |  107|      6|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      6|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  692|      6|		EXPR_PRV(expr_end) = expr_sub;
  ------------------
  |  |  108|      6|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      6|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
  693|      6|		EXPR_NXT(expr_end) = expr_crs_prv;
  ------------------
  |  |  109|      6|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      6|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  694|       |
  695|      6|		return *expr_crs += 3;
  696|       |
  697|      1|	case '+':
  ------------------
  |  Branch (697:2): [True: 1, False: 2.04k]
  ------------------
  698|       |
  699|      1|		if (*expr_crs + 5 >= expr_max) return 0;
  ------------------
  |  Branch (699:7): [True: 0, False: 1]
  ------------------
  700|      1|		EXPR_TYPE(*expr_crs) = PTN_ONE_MORE;
  ------------------
  |  |  107|      1|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      1|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  701|      1|		EXPR_DATA_1(*expr_crs) = (*loop_cnts)++;
  ------------------
  |  |  111|      1|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      1|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  702|      1|		(*input_crs)++;
  703|      1|		return *expr_crs += 5;
  704|       |
  705|    453|	case '*':
  ------------------
  |  Branch (705:2): [True: 453, False: 1.59k]
  ------------------
  706|       |
  707|    453|		if (*expr_crs + 5 >= expr_max) return 0;
  ------------------
  |  Branch (707:7): [True: 0, False: 453]
  ------------------
  708|    453|		EXPR_TYPE(*expr_crs) = PTN_ZERO_MORE;
  ------------------
  |  |  107|    453|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    453|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  709|    453|		EXPR_DATA_1(*expr_crs) = (*loop_cnts)++;
  ------------------
  |  |  111|    453|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|    453|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  710|    453|		(*input_crs)++;
  711|    453|		return *expr_crs += 5;
  712|       |
  713|     61|	case '?':
  ------------------
  |  Branch (713:2): [True: 61, False: 1.98k]
  ------------------
  714|       |
  715|     61|		if (*expr_crs + 4 >= expr_max) return 0;
  ------------------
  |  Branch (715:7): [True: 0, False: 61]
  ------------------
  716|     61|		EXPR_TYPE(*expr_crs) = PTN_OPTIONAL;
  ------------------
  |  |  107|     61|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|     61|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  717|     61|		(*input_crs)++;
  718|     61|		return *expr_crs += 4;
  719|       |
  720|      8|	case '|':
  ------------------
  |  Branch (720:2): [True: 8, False: 2.03k]
  ------------------
  721|       |
  722|      8|		if (*expr_crs + 5 >= expr_max) return 0;
  ------------------
  |  Branch (722:7): [True: 0, False: 8]
  ------------------
  723|      8|		EXPR_TYPE(*expr_crs) = PTN_ALTERNATE;
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  724|      8|		(*input_crs)++;
  725|      8|		return *expr_crs += 5;
  726|       |
  727|      3|	case '.':
  ------------------
  |  Branch (727:2): [True: 3, False: 2.04k]
  ------------------
  728|       |
  729|      3|		if (*expr_crs + 3 >= expr_max) return 0;
  ------------------
  |  Branch (729:7): [True: 0, False: 3]
  ------------------
  730|      3|		EXPR_TYPE(*expr_crs) = PTN_ANY;
  ------------------
  |  |  107|      3|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      3|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  731|      3|		(*input_crs)++;
  732|      3|		return *expr_crs += 3;
  733|       |
  734|      6|	case '%':
  ------------------
  |  Branch (734:2): [True: 6, False: 2.03k]
  ------------------
  735|       |
  736|      6|		if (*expr_crs + 5 >= expr_max) return 0;
  ------------------
  |  Branch (736:7): [True: 0, False: 6]
  ------------------
  737|       |
  738|      6|		(*input_crs)++;
  739|      6|		if (*input_crs >= input_max) return 0;
  ------------------
  |  Branch (739:7): [True: 0, False: 6]
  ------------------
  740|       |
  741|       |		/* find closing bracket */
  742|      6|		if (input[*input_crs] == '[') {
  ------------------
  |  Branch (742:7): [True: 0, False: 6]
  ------------------
  743|      0|			set = 1;
  744|      0|			(*input_crs)++;
  745|      0|			for (input_end = *input_crs; input_end < input_max; input_end++)
  ------------------
  |  Branch (745:33): [True: 0, False: 0]
  ------------------
  746|      0|				if (input[input_end] == ']') break;
  ------------------
  |  Branch (746:9): [True: 0, False: 0]
  ------------------
  747|      0|			if (input_end >= input_max) return 0;
  ------------------
  |  Branch (747:8): [True: 0, False: 0]
  ------------------
  748|      6|		} else {
  749|      6|			set = 0;
  750|      6|			input_end = *input_crs + 1;
  751|      6|		}
  752|       |
  753|      6|		EXPR_TYPE(*expr_crs) = PTN_ATTRIBUTES;
  ------------------
  |  |  107|      6|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      6|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  754|       |
  755|      6|		attrs0 = attrs1 = 0;
  756|     12|		for (; (*input_crs) < input_end; (*input_crs)++) {
  ------------------
  |  Branch (756:10): [True: 6, False: 6]
  ------------------
  757|      6|			switch (input[*input_crs]) {
  758|      6|			case '_':
  ------------------
  |  Branch (758:4): [True: 6, False: 0]
  ------------------
  759|      6|				attrs0 |= CTC_Space;
  760|      6|				break;
  761|      0|			case '#':
  ------------------
  |  Branch (761:4): [True: 0, False: 6]
  ------------------
  762|      0|				attrs0 |= CTC_Digit;
  763|      0|				break;
  764|      0|			case 'a':
  ------------------
  |  Branch (764:4): [True: 0, False: 6]
  ------------------
  765|      0|				attrs0 |= CTC_Letter;
  766|      0|				break;
  767|      0|			case 'u':
  ------------------
  |  Branch (767:4): [True: 0, False: 6]
  ------------------
  768|      0|				attrs0 |= CTC_UpperCase;
  769|      0|				break;
  770|      0|			case 'l':
  ------------------
  |  Branch (770:4): [True: 0, False: 6]
  ------------------
  771|      0|				attrs0 |= CTC_LowerCase;
  772|      0|				break;
  773|      0|			case '.':
  ------------------
  |  Branch (773:4): [True: 0, False: 6]
  ------------------
  774|      0|				attrs0 |= CTC_Punctuation;
  775|      0|				break;
  776|      0|			case '$':
  ------------------
  |  Branch (776:4): [True: 0, False: 6]
  ------------------
  777|      0|				attrs0 |= CTC_Sign;
  778|      0|				break;
  779|      0|			case 'm':
  ------------------
  |  Branch (779:4): [True: 0, False: 6]
  ------------------
  780|      0|				attrs0 |= CTC_Math;
  781|      0|				break;
  782|      0|			case '~':
  ------------------
  |  Branch (782:4): [True: 0, False: 6]
  ------------------
  783|      0|				attrs0 |= CTC_SeqDelimiter;
  784|      0|				break;
  785|      0|			case '<':
  ------------------
  |  Branch (785:4): [True: 0, False: 6]
  ------------------
  786|      0|				attrs0 |= CTC_SeqBefore;
  787|      0|				break;
  788|      0|			case '>':
  ------------------
  |  Branch (788:4): [True: 0, False: 6]
  ------------------
  789|      0|				attrs0 |= CTC_SeqAfter;
  790|      0|				break;
  791|       |
  792|      0|			case '0':
  ------------------
  |  Branch (792:4): [True: 0, False: 6]
  ------------------
  793|      0|			case '1':
  ------------------
  |  Branch (793:4): [True: 0, False: 6]
  ------------------
  794|      0|			case '2':
  ------------------
  |  Branch (794:4): [True: 0, False: 6]
  ------------------
  795|      0|			case '3':
  ------------------
  |  Branch (795:4): [True: 0, False: 6]
  ------------------
  796|      0|			case '4':
  ------------------
  |  Branch (796:4): [True: 0, False: 6]
  ------------------
  797|      0|			case '5':
  ------------------
  |  Branch (797:4): [True: 0, False: 6]
  ------------------
  798|      0|			case '6':
  ------------------
  |  Branch (798:4): [True: 0, False: 6]
  ------------------
  799|      0|			case '7': {
  ------------------
  |  Branch (799:4): [True: 0, False: 6]
  ------------------
  800|      0|				int k = input[*input_crs] - '0';
  801|      0|				TranslationTableCharacterAttributes a = table->numberedAttributes[k];
  802|      0|				if (!a) {
  ------------------
  |  Branch (802:9): [True: 0, False: 0]
  ------------------
  803|       |					// attribute not used before yet: assign it a value
  804|      0|					a = table->numberedAttributes[k] =
  805|      0|							table->nextNumberedCharacterClassAttribute;
  806|      0|					if (a > CTC_UserDefined8) {
  ------------------
  |  Branch (806:10): [True: 0, False: 0]
  ------------------
  807|      0|						_lou_logMessage(LOU_LOG_ERROR,
  808|      0|								"%s:%d: error: Too many character attributes defined",
  809|      0|								nested->fileName, nested->lineNumber);
  810|      0|						return 0;
  811|      0|					}
  812|      0|					table->nextNumberedCharacterClassAttribute <<= 1;
  813|      0|				}
  814|      0|				attrs1 |= (a >> 16);
  815|      0|				break;
  816|      0|			}
  817|      0|			case '^':
  ------------------
  |  Branch (817:4): [True: 0, False: 6]
  ------------------
  818|      0|				attrs1 |= (CTC_EndOfInput >> 16);
  819|      0|				break;
  820|       |
  821|      0|			default:
  ------------------
  |  Branch (821:4): [True: 0, False: 6]
  ------------------
  822|      0|				return 0;
  823|      6|			}
  824|      6|		}
  825|      6|		EXPR_DATA_0(*expr_crs) = attrs1;
  ------------------
  |  |  110|      6|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      6|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
  826|      6|		EXPR_DATA_1(*expr_crs) = attrs0;
  ------------------
  |  |  111|      6|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      6|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  827|       |
  828|      6|		if (set) (*input_crs)++;
  ------------------
  |  Branch (828:7): [True: 0, False: 6]
  ------------------
  829|      6|		return *expr_crs += 5;
  830|       |
  831|      0|	case '[':
  ------------------
  |  Branch (831:2): [True: 0, False: 2.04k]
  ------------------
  832|       |
  833|      0|		(*input_crs)++;
  834|      0|		if (*input_crs >= input_max) return 0;
  ------------------
  |  Branch (834:7): [True: 0, False: 0]
  ------------------
  835|       |
  836|       |		/* find closing bracket */
  837|      0|		esc = 0;
  838|      0|		for (input_end = *input_crs; input_end < input_max; input_end++) {
  ------------------
  |  Branch (838:32): [True: 0, False: 0]
  ------------------
  839|      0|			if (input[input_end] == '\\' && !esc) {
  ------------------
  |  Branch (839:8): [True: 0, False: 0]
  |  Branch (839:36): [True: 0, False: 0]
  ------------------
  840|      0|				esc = 1;
  841|      0|				continue;
  842|      0|			}
  843|       |
  844|      0|			if (input[input_end] == ']' && !esc) break;
  ------------------
  |  Branch (844:8): [True: 0, False: 0]
  |  Branch (844:35): [True: 0, False: 0]
  ------------------
  845|      0|			esc = 0;
  846|      0|		}
  847|      0|		if (input_end >= input_max) return 0;
  ------------------
  |  Branch (847:7): [True: 0, False: 0]
  ------------------
  848|       |
  849|      0|		if (*expr_crs + 4 + (input_end - *input_crs) >= expr_max) return 0;
  ------------------
  |  Branch (849:7): [True: 0, False: 0]
  ------------------
  850|       |
  851|      0|		EXPR_TYPE(*expr_crs) = PTN_CHARS;
  ------------------
  |  |  107|      0|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      0|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  852|       |
  853|      0|		esc = 0;
  854|      0|		data = EXPR_DATA(*expr_crs);
  ------------------
  |  |  113|      0|#define EXPR_DATA(at) EXPR_DATA_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  104|      0|#define EXPR_DATA_IN(at, buffer) ((widechar *)&buffer[(at) + 3])
  |  |  ------------------
  ------------------
  855|      0|		for (i = 1; *input_crs < input_end; (*input_crs)++) {
  ------------------
  |  Branch (855:15): [True: 0, False: 0]
  ------------------
  856|      0|			if (input[*input_crs] == '\\' && !esc) {
  ------------------
  |  Branch (856:8): [True: 0, False: 0]
  |  Branch (856:37): [True: 0, False: 0]
  ------------------
  857|      0|				esc = 1;
  858|      0|				continue;
  859|      0|			}
  860|       |
  861|      0|			esc = 0;
  862|      0|			data[i++] = (widechar)input[*input_crs];
  863|      0|		}
  864|      0|		data[0] = i - 1;
  865|      0|		(*input_crs)++;
  866|      0|		return *expr_crs += 4 + data[0];
  867|       |
  868|      0|	case '@':
  ------------------
  |  Branch (868:2): [True: 0, False: 2.04k]
  ------------------
  869|       |
  870|      0|		(*input_crs)++;
  871|      0|		if (*input_crs >= input_max) return 0;
  ------------------
  |  Branch (871:7): [True: 0, False: 0]
  ------------------
  872|       |
  873|       |		/* find closing bracket */
  874|      0|		if (input[*input_crs] == '[') {
  ------------------
  |  Branch (874:7): [True: 0, False: 0]
  ------------------
  875|      0|			set = 1;
  876|      0|			(*input_crs)++;
  877|      0|			for (input_end = *input_crs; input_end < input_max; input_end++)
  ------------------
  |  Branch (877:33): [True: 0, False: 0]
  ------------------
  878|      0|				if (input[input_end] == ']') break;
  ------------------
  |  Branch (878:9): [True: 0, False: 0]
  ------------------
  879|      0|			if (input_end >= input_max) return 0;
  ------------------
  |  Branch (879:8): [True: 0, False: 0]
  ------------------
  880|      0|		} else {
  881|      0|			set = 0;
  882|      0|			input_end = *input_crs + 1;
  883|      0|		}
  884|       |
  885|      0|		if (*expr_crs + 4 + (input_end - *input_crs) >= expr_max) return 0;
  ------------------
  |  Branch (885:7): [True: 0, False: 0]
  ------------------
  886|       |
  887|      0|		EXPR_TYPE(*expr_crs) = PTN_HOOK;
  ------------------
  |  |  107|      0|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      0|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  888|       |
  889|      0|		esc = 0;
  890|      0|		data = EXPR_DATA(*expr_crs);
  ------------------
  |  |  113|      0|#define EXPR_DATA(at) EXPR_DATA_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  104|      0|#define EXPR_DATA_IN(at, buffer) ((widechar *)&buffer[(at) + 3])
  |  |  ------------------
  ------------------
  891|      0|		for (i = 1; *input_crs < input_end; (*input_crs)++) {
  ------------------
  |  Branch (891:15): [True: 0, False: 0]
  ------------------
  892|      0|			if (input[*input_crs] == '\\' && !esc) {
  ------------------
  |  Branch (892:8): [True: 0, False: 0]
  |  Branch (892:37): [True: 0, False: 0]
  ------------------
  893|      0|				esc = 1;
  894|      0|				continue;
  895|      0|			}
  896|       |
  897|      0|			esc = 0;
  898|      0|			data[i++] = (widechar)input[*input_crs];
  899|      0|		}
  900|      0|		data[0] = i - 1;
  901|      0|		if (set) (*input_crs)++;
  ------------------
  |  Branch (901:7): [True: 0, False: 0]
  ------------------
  902|      0|		return *expr_crs += 4 + data[0];
  903|       |
  904|      0|	case '^':
  ------------------
  |  Branch (904:2): [True: 0, False: 2.04k]
  ------------------
  905|     67|	case '$':
  ------------------
  |  Branch (905:2): [True: 67, False: 1.97k]
  ------------------
  906|       |
  907|     67|		if (*expr_crs + 3 >= expr_max) return 0;
  ------------------
  |  Branch (907:7): [True: 0, False: 67]
  ------------------
  908|     67|		EXPR_TYPE(*expr_crs) = PTN_END_OF_INPUT;
  ------------------
  |  |  107|     67|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|     67|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  909|     67|		(*input_crs)++;
  910|     67|		return *expr_crs += 3;
  911|       |
  912|      0|	case '\\':
  ------------------
  |  Branch (912:2): [True: 0, False: 2.04k]
  ------------------
  913|       |
  914|      0|		(*input_crs)++;
  915|      0|		if (*input_crs >= input_max) return 0;
  ------------------
  |  Branch (915:7): [True: 0, False: 0]
  ------------------
  916|       |
  917|  1.35k|	default:
  ------------------
  |  Branch (917:2): [True: 1.35k, False: 691]
  ------------------
  918|       |
  919|  1.35k|		if (*expr_crs + 5 >= expr_max) return 0;
  ------------------
  |  Branch (919:7): [True: 0, False: 1.35k]
  ------------------
  920|  1.35k|		EXPR_TYPE(*expr_crs) = PTN_CHARS;
  ------------------
  |  |  107|  1.35k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.35k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  921|  1.35k|		EXPR_DATA_0(*expr_crs) = 1;
  ------------------
  |  |  110|  1.35k|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|  1.35k|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
  922|  1.35k|		EXPR_DATA_1(*expr_crs) = (widechar)input[*input_crs];
  ------------------
  |  |  111|  1.35k|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|  1.35k|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  923|  1.35k|		(*input_crs)++;
  924|  1.35k|		return *expr_crs += 5;
  925|  2.04k|	}
  926|  2.04k|}
pattern.c:pattern_compile_2:
 1044|    112|		widechar *expr_data, int expr_at, const int expr_max, widechar *expr_crs) {
 1045|    112|	int expr_start, expr_end, expr_prv, expr_sub;
 1046|       |
 1047|  2.26k|	while (EXPR_TYPE(expr_at) != PTN_END) {
  ------------------
  |  |  107|  2.26k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.26k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1047:9): [True: 2.15k, False: 112]
  ------------------
 1048|  2.15k|		if (EXPR_TYPE(expr_at) == PTN_GROUP || EXPR_TYPE(expr_at) == PTN_NOT) {
  ------------------
  |  |  107|  2.15k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.15k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              		if (EXPR_TYPE(expr_at) == PTN_GROUP || EXPR_TYPE(expr_at) == PTN_NOT) {
  ------------------
  |  |  107|  2.07k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.07k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1048:7): [True: 86, False: 2.07k]
  |  Branch (1048:42): [True: 6, False: 2.06k]
  ------------------
 1049|     92|			if (!pattern_compile_2(expr_data, EXPR_DATA_0(expr_at), expr_max, expr_crs))
  ------------------
  |  |  110|     92|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|     92|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
  |  Branch (1049:8): [True: 0, False: 92]
  ------------------
 1050|      0|				return 0;
 1051|     92|		}
 1052|       |
 1053|  2.15k|		if (EXPR_TYPE(expr_at) == PTN_ZERO_MORE || EXPR_TYPE(expr_at) == PTN_ONE_MORE ||
  ------------------
  |  |  107|  2.15k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.15k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              		if (EXPR_TYPE(expr_at) == PTN_ZERO_MORE || EXPR_TYPE(expr_at) == PTN_ONE_MORE ||
  ------------------
  |  |  107|  1.70k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.70k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1053:7): [True: 453, False: 1.70k]
  |  Branch (1053:46): [True: 1, False: 1.70k]
  ------------------
 1054|  1.70k|				EXPR_TYPE(expr_at) == PTN_OPTIONAL) {
  ------------------
  |  |  107|  1.70k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.70k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1054:5): [True: 61, False: 1.64k]
  ------------------
 1055|    515|			if (*expr_crs + 6 >= expr_max) return 0;
  ------------------
  |  Branch (1055:8): [True: 0, False: 515]
  ------------------
 1056|       |
 1057|       |			/* get previous expressions, there must
 1058|       |			 * be at least something and a PTN_START */
 1059|    515|			expr_sub = EXPR_PRV(expr_at);
  ------------------
  |  |  108|    515|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    515|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1060|    515|			if (EXPR_TYPE(expr_sub) == PTN_START) return 0;
  ------------------
  |  |  107|    515|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    515|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1060:8): [True: 0, False: 515]
  ------------------
 1061|    515|			expr_prv = EXPR_PRV(expr_sub);
  ------------------
  |  |  108|    515|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    515|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1062|       |
 1063|       |			/* create start expression */
 1064|    515|			expr_start = *expr_crs;
 1065|    515|			EXPR_TYPE(expr_start) = PTN_START;
  ------------------
  |  |  107|    515|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    515|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1066|    515|			EXPR_PRV(expr_start) = PTN_END;
  ------------------
  |  |  108|    515|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    515|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1067|    515|			EXPR_NXT(expr_start) = expr_sub;
  ------------------
  |  |  109|    515|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    515|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1068|    515|			*expr_crs += 3;
 1069|       |
 1070|       |			/* create end expression */
 1071|    515|			expr_end = *expr_crs;
 1072|    515|			EXPR_TYPE(expr_end) = PTN_END;
  ------------------
  |  |  107|    515|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    515|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1073|    515|			EXPR_PRV(expr_end) = expr_sub;
  ------------------
  |  |  108|    515|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    515|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1074|    515|			EXPR_NXT(expr_end) = expr_at;
  ------------------
  |  |  109|    515|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    515|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1075|    515|			*expr_crs += 3;
 1076|       |
 1077|       |			/* relink previous expression before sub expression */
 1078|    515|			EXPR_DATA_0(expr_at) = expr_start;
  ------------------
  |  |  110|    515|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|    515|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1079|    515|			EXPR_NXT(expr_prv) = expr_at;
  ------------------
  |  |  109|    515|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    515|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1080|    515|			EXPR_PRV(expr_at) = expr_prv;
  ------------------
  |  |  108|    515|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    515|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1081|       |
 1082|       |			/* relink sub expression to start and end */
 1083|    515|			EXPR_PRV(expr_sub) = expr_start;
  ------------------
  |  |  108|    515|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    515|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1084|    515|			EXPR_NXT(expr_sub) = expr_end;
  ------------------
  |  |  109|    515|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    515|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1085|    515|		}
 1086|       |
 1087|  2.15k|		expr_at = EXPR_NXT(expr_at);
  ------------------
  |  |  109|  2.15k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  2.15k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1088|  2.15k|	}
 1089|       |
 1090|    112|	return 1;
 1091|    112|}
pattern.c:pattern_compile_3:
 1097|    635|		widechar *expr_data, int expr_at, const int expr_max, widechar *expr_crs) {
 1098|    635|	int expr_mrk, expr_start, expr_end, expr_sub_start, expr_sub_end;
 1099|       |
 1100|  3.31k|	while (EXPR_TYPE(expr_at) != PTN_END) {
  ------------------
  |  |  107|  3.31k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  3.31k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1100:9): [True: 2.68k, False: 635]
  ------------------
 1101|  2.68k|		if (EXPR_TYPE(expr_at) == PTN_GROUP || EXPR_TYPE(expr_at) == PTN_NOT ||
  ------------------
  |  |  107|  2.68k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.68k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              		if (EXPR_TYPE(expr_at) == PTN_GROUP || EXPR_TYPE(expr_at) == PTN_NOT ||
  ------------------
  |  |  107|  2.59k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.59k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1101:7): [True: 86, False: 2.59k]
  |  Branch (1101:42): [True: 6, False: 2.58k]
  ------------------
 1102|  2.58k|				EXPR_TYPE(expr_at) == PTN_OPTIONAL ||
  ------------------
  |  |  107|  2.58k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.58k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1102:5): [True: 61, False: 2.52k]
  ------------------
 1103|  2.52k|				EXPR_TYPE(expr_at) == PTN_ZERO_MORE ||
  ------------------
  |  |  107|  2.52k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.52k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1103:5): [True: 453, False: 2.07k]
  ------------------
 1104|  2.07k|				EXPR_TYPE(expr_at) == PTN_ONE_MORE) {
  ------------------
  |  |  107|  2.07k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.07k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1104:5): [True: 1, False: 2.07k]
  ------------------
 1105|    607|			if (!pattern_compile_3(expr_data, EXPR_DATA_0(expr_at), expr_max, expr_crs))
  ------------------
  |  |  110|    607|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|    607|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
  |  Branch (1105:8): [True: 0, False: 607]
  ------------------
 1106|      0|				return 0;
 1107|    607|		}
 1108|       |
 1109|  2.68k|		if (EXPR_TYPE(expr_at) == PTN_ALTERNATE) {
  ------------------
  |  |  107|  2.68k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  2.68k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1109:7): [True: 8, False: 2.67k]
  ------------------
 1110|      8|			if (*expr_crs + 12 >= expr_max) return 0;
  ------------------
  |  Branch (1110:8): [True: 0, False: 8]
  ------------------
 1111|       |
 1112|       |			/* get previous start expression,
 1113|       |			 * can include alternate expressions */
 1114|      8|			expr_mrk = EXPR_PRV(expr_at);
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1115|      8|			if (EXPR_TYPE(expr_mrk) == PTN_START) return 0;
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1115:8): [True: 0, False: 8]
  ------------------
 1116|      8|			expr_sub_end = expr_mrk;
 1117|    120|			while (EXPR_TYPE(expr_mrk) != PTN_START) expr_mrk = EXPR_PRV(expr_mrk);
  ------------------
  |  |  107|    120|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    120|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              			while (EXPR_TYPE(expr_mrk) != PTN_START) expr_mrk = EXPR_PRV(expr_mrk);
  ------------------
  |  |  108|    112|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    120|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
  |  Branch (1117:11): [True: 112, False: 8]
  ------------------
 1118|      8|			expr_sub_start = EXPR_NXT(expr_mrk);
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1119|       |
 1120|       |			/* create first start expression */
 1121|      8|			expr_start = *expr_crs;
 1122|      8|			EXPR_TYPE(expr_start) = PTN_START;
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1123|      8|			EXPR_PRV(expr_start) = PTN_END;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1124|      8|			EXPR_NXT(expr_start) = expr_sub_start;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1125|      8|			*expr_crs += 3;
 1126|       |
 1127|       |			/* create first end expression */
 1128|      8|			expr_end = *expr_crs;
 1129|      8|			EXPR_TYPE(expr_end) = PTN_END;
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1130|      8|			EXPR_PRV(expr_end) = expr_sub_end;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1131|      8|			EXPR_NXT(expr_end) = expr_at;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1132|      8|			*expr_crs += 3;
 1133|       |
 1134|       |			/* relink previous expression before sub expression */
 1135|      8|			EXPR_DATA_0(expr_at) = expr_start;
  ------------------
  |  |  110|      8|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      8|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1136|      8|			EXPR_NXT(expr_mrk) = expr_at;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1137|      8|			EXPR_PRV(expr_at) = expr_mrk;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1138|       |
 1139|       |			/* relink sub expression to start and end */
 1140|      8|			EXPR_PRV(expr_sub_start) = expr_start;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1141|      8|			EXPR_NXT(expr_sub_end) = expr_end;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1142|       |
 1143|       |			/* get following PTN_END or PTN_ALTERNATE expression */
 1144|      8|			expr_mrk = EXPR_NXT(expr_at);
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1145|      8|			if (EXPR_TYPE(expr_mrk) == PTN_END || EXPR_TYPE(expr_mrk) == PTN_ALTERNATE)
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              			if (EXPR_TYPE(expr_mrk) == PTN_END || EXPR_TYPE(expr_mrk) == PTN_ALTERNATE)
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1145:8): [True: 0, False: 8]
  |  Branch (1145:42): [True: 0, False: 8]
  ------------------
 1146|      0|				return 0;
 1147|      8|			expr_sub_start = expr_mrk;
 1148|     62|			while (EXPR_TYPE(expr_mrk) != PTN_END && EXPR_TYPE(expr_mrk) != PTN_ALTERNATE)
  ------------------
  |  |  107|     62|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|     62|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              			while (EXPR_TYPE(expr_mrk) != PTN_END && EXPR_TYPE(expr_mrk) != PTN_ALTERNATE)
  ------------------
  |  |  107|     54|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|     54|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1148:11): [True: 54, False: 8]
  |  Branch (1148:45): [True: 54, False: 0]
  ------------------
 1149|     54|				expr_mrk = EXPR_NXT(expr_mrk);
  ------------------
  |  |  109|     54|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|     62|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1150|      8|			expr_sub_end = EXPR_PRV(expr_mrk);
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1151|       |
 1152|       |			/* create first start expression */
 1153|      8|			expr_start = *expr_crs;
 1154|      8|			EXPR_TYPE(expr_start) = PTN_START;
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1155|      8|			EXPR_PRV(expr_start) = PTN_END;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1156|      8|			EXPR_NXT(expr_start) = expr_sub_start;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1157|      8|			*expr_crs += 3;
 1158|       |
 1159|       |			/* create first end expression */
 1160|      8|			expr_end = *expr_crs;
 1161|      8|			EXPR_TYPE(expr_end) = PTN_END;
  ------------------
  |  |  107|      8|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|      8|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1162|      8|			EXPR_PRV(expr_end) = expr_sub_end;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1163|      8|			EXPR_NXT(expr_end) = expr_at;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1164|      8|			*expr_crs += 3;
 1165|       |
 1166|       |			/* relink following expression before sub expression */
 1167|      8|			EXPR_DATA_1(expr_at) = expr_start;
  ------------------
  |  |  111|      8|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      8|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1168|      8|			EXPR_PRV(expr_mrk) = expr_at;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1169|      8|			EXPR_NXT(expr_at) = expr_mrk;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1170|       |
 1171|       |			/* relink sub expression to start and end */
 1172|      8|			EXPR_PRV(expr_sub_start) = expr_start;
  ------------------
  |  |  108|      8|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|      8|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1173|      8|			EXPR_NXT(expr_sub_end) = expr_end;
  ------------------
  |  |  109|      8|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      8|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1174|       |
 1175|       |			/* check expressions were after alternate and got moved into
 1176|       |			 * a sub expression, previous expressions already checked */
 1177|      8|			if (!pattern_compile_3(expr_data, EXPR_DATA_1(expr_at), expr_max, expr_crs))
  ------------------
  |  |  111|      8|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      8|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  |  Branch (1177:8): [True: 0, False: 8]
  ------------------
 1178|      0|				return 0;
 1179|      8|		}
 1180|       |
 1181|  2.68k|		expr_at = EXPR_NXT(expr_at);
  ------------------
  |  |  109|  2.68k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  2.68k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1182|  2.68k|	}
 1183|       |
 1184|    635|	return 1;
 1185|    635|}
pattern.c:pattern_reverse_expression:
 1240|    483|pattern_reverse_expression(widechar *expr_data, const int expr_start) {
 1241|    483|	widechar expr_end, expr_crs, expr_prv;
 1242|       |
 1243|    483|	expr_end = EXPR_NXT(expr_start);
  ------------------
  |  |  109|    483|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    483|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1244|       |
 1245|       |	/* empty expression */
 1246|    483|	if (EXPR_TYPE(expr_end) == PTN_END) return;
  ------------------
  |  |  107|    483|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|    483|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1246:6): [True: 0, False: 483]
  ------------------
 1247|       |
 1248|       |	/* find end expression */
 1249|  1.65k|	while (EXPR_TYPE(expr_end) != PTN_END) expr_end = EXPR_NXT(expr_end);
  ------------------
  |  |  107|  1.65k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.65k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              	while (EXPR_TYPE(expr_end) != PTN_END) expr_end = EXPR_NXT(expr_end);
  ------------------
  |  |  109|  1.17k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  1.65k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  |  Branch (1249:9): [True: 1.17k, False: 483]
  ------------------
 1250|       |
 1251|    483|	expr_crs = EXPR_PRV(expr_end);
  ------------------
  |  |  108|    483|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    483|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1252|    483|	expr_prv = EXPR_PRV(expr_crs);
  ------------------
  |  |  108|    483|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    483|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1253|       |
 1254|       |	/* relink expression before end expression */
 1255|    483|	EXPR_NXT(expr_start) = expr_crs;
  ------------------
  |  |  109|    483|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    483|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1256|    483|	EXPR_PRV(expr_crs) = expr_start;
  ------------------
  |  |  108|    483|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    483|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1257|    483|	EXPR_NXT(expr_crs) = expr_prv;
  ------------------
  |  |  109|    483|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    483|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1258|       |
 1259|       |	/* reverse any branching expressions */
 1260|    483|	pattern_reverse_branch(expr_data, expr_crs);
 1261|       |
 1262|  1.17k|	while (expr_prv != expr_start) {
  ------------------
  |  Branch (1262:9): [True: 688, False: 483]
  ------------------
 1263|       |		/* shift current expression */
 1264|    688|		expr_crs = expr_prv;
 1265|    688|		expr_prv = EXPR_PRV(expr_prv);
  ------------------
  |  |  108|    688|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    688|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1266|       |
 1267|       |		/* reverse any branching expressions */
 1268|    688|		pattern_reverse_branch(expr_data, expr_crs);
 1269|       |
 1270|       |		/* relink current expression */
 1271|    688|		EXPR_PRV(expr_crs) = EXPR_NXT(expr_crs);
  ------------------
  |  |  108|    688|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    688|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
              		EXPR_PRV(expr_crs) = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|    688|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    688|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1272|    688|		EXPR_NXT(expr_crs) = expr_prv;
  ------------------
  |  |  109|    688|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    688|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1273|    688|	}
 1274|       |
 1275|       |	/* relink expression after start expression */
 1276|    483|	EXPR_PRV(expr_crs) = EXPR_NXT(expr_crs);
  ------------------
  |  |  108|    483|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    483|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
              	EXPR_PRV(expr_crs) = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|    483|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    483|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1277|    483|	EXPR_NXT(expr_crs) = expr_end;
  ------------------
  |  |  109|    483|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|    483|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1278|    483|	EXPR_PRV(expr_end) = expr_crs;
  ------------------
  |  |  108|    483|#define EXPR_PRV(at) EXPR_PRV_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   99|    483|#define EXPR_PRV_IN(at, buffer) (buffer[(at) + 1])
  |  |  ------------------
  ------------------
 1279|    483|}
pattern.c:pattern_reverse_branch:
 1218|  1.17k|pattern_reverse_branch(widechar *expr_data, const int expr_at) {
 1219|  1.17k|	widechar expr_swap;
 1220|       |
 1221|  1.17k|	switch (EXPR_TYPE(expr_at)) {
  ------------------
  |  |  107|  1.17k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.17k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (98:34): [True: 467, False: 704]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1222|      6|	case PTN_ALTERNATE:
  ------------------
  |  Branch (1222:2): [True: 6, False: 1.16k]
  ------------------
 1223|       |
 1224|      6|		pattern_reverse_expression(expr_data, EXPR_DATA_0(expr_at));
  ------------------
  |  |  110|      6|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      6|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1225|      6|		expr_swap = EXPR_DATA_0(expr_at);
  ------------------
  |  |  110|      6|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      6|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1226|      6|		EXPR_DATA_0(expr_at) = EXPR_DATA_1(expr_at);
  ------------------
  |  |  110|      6|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      6|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
              		EXPR_DATA_0(expr_at) = EXPR_DATA_1(expr_at);
  ------------------
  |  |  111|      6|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      6|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1227|      6|		EXPR_DATA_1(expr_at) = expr_swap;
  ------------------
  |  |  111|      6|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      6|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1228|       |
 1229|      6|	case PTN_GROUP:
  ------------------
  |  Branch (1229:2): [True: 0, False: 1.17k]
  ------------------
 1230|      6|	case PTN_NOT:
  ------------------
  |  Branch (1230:2): [True: 0, False: 1.17k]
  ------------------
 1231|      7|	case PTN_ONE_MORE:
  ------------------
  |  Branch (1231:2): [True: 1, False: 1.17k]
  ------------------
 1232|    460|	case PTN_ZERO_MORE:
  ------------------
  |  Branch (1232:2): [True: 453, False: 718]
  ------------------
 1233|    467|	case PTN_OPTIONAL:
  ------------------
  |  Branch (1233:2): [True: 7, False: 1.16k]
  ------------------
 1234|       |
 1235|    467|		pattern_reverse_expression(expr_data, EXPR_DATA_0(expr_at));
  ------------------
  |  |  110|    467|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|    467|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1236|  1.17k|	}
 1237|  1.17k|}
pattern.c:pattern_check_hook:
 1609|   188k|		const int hook_max, const TranslationTableHeader *table) {
 1610|   188k|	int input_crs, ret, *loop_cnts;
 1611|       |
 1612|   188k|	input_crs = input_start;
 1613|   188k|	loop_cnts = malloc(expr_data[1] * sizeof(int));
 1614|   188k|	memset(loop_cnts, 0, expr_data[1] * sizeof(int));
 1615|   188k|	ret = pattern_check_expression(input, &input_crs, input_minmax, input_dir, expr_data,
 1616|   188k|			hook, hook_data, hook_max, 2, 0, 0, loop_cnts, table);
 1617|   188k|	free(loop_cnts);
 1618|   188k|	return ret;
 1619|   188k|}
pattern.c:pattern_check_expression:
 1316|   476k|		const TranslationTableHeader *table) {
 1317|   476k|	int input_crs_prv, input_start, attrs, ret, i;
 1318|   476k|	const widechar *data;
 1319|       |
 1320|   476k|	data = NULL;
 1321|       |
 1322|       |	/* save input_crs to know if loop consumed input */
 1323|   476k|	input_start = *input_crs;
 1324|       |
 1325|   476k|	CHECK_OUTPUT(START, 0, __LINE__, "check start")
  ------------------
  |  |  137|   476k|	{ ; }
  ------------------
 1326|       |
 1327|  1.10M|	while (!(EXPR_TYPE(expr_crs) == PTN_END && EXPR_TYPE(expr_crs) == PTN_END)) {
  ------------------
  |  |  107|  1.10M|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.10M|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
              	while (!(EXPR_TYPE(expr_crs) == PTN_END && EXPR_TYPE(expr_crs) == PTN_END)) {
  ------------------
  |  |  107|  75.4k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  75.4k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1327:11): [True: 75.4k, False: 1.03M]
  |  Branch (1327:45): [True: 75.4k, False: 0]
  ------------------
 1328|       |		/* end of input expression */
 1329|  1.03M|		if (EXPR_TYPE(expr_crs) == PTN_END_OF_INPUT) {
  ------------------
  |  |  107|  1.03M|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  1.03M|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1329:7): [True: 78.9k, False: 955k]
  ------------------
 1330|  78.9k|			if (*input_crs * input_dir >= input_minmax * input_dir) {
  ------------------
  |  Branch (1330:8): [True: 4.10k, False: 74.8k]
  ------------------
 1331|  4.10k|				if (notOperator)
  ------------------
  |  Branch (1331:9): [True: 0, False: 4.10k]
  ------------------
 1332|      0|					CHECK_OUTPUT(
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1333|  4.10k|							RETURN, 0, __LINE__, "end of input failed:  no input and not")
 1334|  4.10k|				else
 1335|  4.10k|					CHECK_OUTPUT(RETURN, 1, __LINE__, "end of input passed:  no input")
  ------------------
  |  |  137|  4.10k|	{ ; }
  ------------------
 1336|  4.10k|				return !notOperator;
 1337|  74.8k|			} else {
 1338|  74.8k|				if (notOperator)
  ------------------
  |  Branch (1338:9): [True: 0, False: 74.8k]
  ------------------
 1339|      0|					CHECK_OUTPUT(
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1340|  74.8k|							RETURN, 1, __LINE__, "end of input passed:  input and not")
 1341|  74.8k|				else
 1342|  74.8k|					CHECK_OUTPUT(RETURN, 0, __LINE__, "end of input failed:  input")
  ------------------
  |  |  137|  74.8k|	{ ; }
  ------------------
 1343|  74.8k|				return notOperator;
 1344|  74.8k|			}
 1345|  78.9k|		}
 1346|       |
 1347|       |		/* no more input */
 1348|   955k|		if (*input_crs * input_dir >= input_minmax * input_dir) {
  ------------------
  |  Branch (1348:7): [True: 73.2k, False: 881k]
  ------------------
 1349|  73.2k|			switch (EXPR_TYPE(expr_crs)) {
  ------------------
  |  |  107|  73.2k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|  73.2k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (98:34): [True: 35.2k, False: 37.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1350|      6|			case PTN_ATTRIBUTES:
  ------------------
  |  Branch (1350:4): [True: 6, False: 73.2k]
  ------------------
 1351|       |
 1352|      6|				attrs = (EXPR_DATA_0(expr_crs) << 16);
  ------------------
  |  |  110|      6|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|      6|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1353|      6|				if (attrs & CTC_EndOfInput) {
  ------------------
  |  Branch (1353:9): [True: 0, False: 6]
  ------------------
 1354|      0|					if (notOperator) {
  ------------------
  |  Branch (1354:10): [True: 0, False: 0]
  ------------------
 1355|      0|						CHECK_OUTPUT(RETURN, 0, __LINE__,
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1356|      0|								"attributes failed:  end of input attribute:  not")
 1357|      0|						return 0;
 1358|      0|					}
 1359|      0|					CHECK_OUTPUT(RETURN, 1, __LINE__,
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1360|      0|							"attributes passed:  end of input attribute")
 1361|      0|					return 1;
 1362|      0|				}
 1363|      6|				CHECK_OUTPUT(RETURN, 0, __LINE__,
  ------------------
  |  |  137|      6|	{ ; }
  ------------------
 1364|      6|						"attributes failed:  no end of input attribute")
 1365|      6|				return 0;
 1366|       |
 1367|      0|			case PTN_ANY:
  ------------------
  |  Branch (1367:4): [True: 0, False: 73.2k]
  ------------------
 1368|  35.2k|			case PTN_CHARS:
  ------------------
  |  Branch (1368:4): [True: 35.2k, False: 37.9k]
  ------------------
 1369|       |
 1370|  35.2k|				CHECK_OUTPUT(RETURN, 0, __LINE__, "chars failed:  no input")
  ------------------
  |  |  137|  35.2k|	{ ; }
  ------------------
 1371|  35.2k|				return 0;
 1372|  73.2k|			}
 1373|       |
 1374|  37.9k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "no input")
  ------------------
  |  |  137|  37.9k|	{ ; }
  ------------------
 1375|  37.9k|		}
 1376|       |
 1377|   919k|		switch (EXPR_TYPE(expr_crs)) {
  ------------------
  |  |  107|   919k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|   919k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
 1378|       |
 1379|   481k|		case PTN_START:
  ------------------
  |  Branch (1379:3): [True: 481k, False: 437k]
  ------------------
 1380|       |
 1381|   481k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|   481k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|   481k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1382|   481k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "start next")
  ------------------
  |  |  137|   481k|	{ ; }
  ------------------
 1383|   481k|			break;
 1384|       |
 1385|  4.87k|		case PTN_GROUP:
  ------------------
  |  Branch (1385:3): [True: 4.87k, False: 914k]
  ------------------
 1386|       |
 1387|  4.87k|			expr_crs = EXPR_DATA_0(expr_crs);
  ------------------
  |  |  110|  4.87k|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|  4.87k|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1388|  4.87k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "group next")
  ------------------
  |  |  137|  4.87k|	{ ; }
  ------------------
 1389|  4.87k|			break;
 1390|       |
 1391|    132|		case PTN_NOT:
  ------------------
  |  Branch (1391:3): [True: 132, False: 919k]
  ------------------
 1392|       |
 1393|    132|			notOperator = !notOperator;
 1394|    132|			expr_crs = EXPR_DATA_0(expr_crs);
  ------------------
  |  |  110|    132|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|    132|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1395|    132|			CHECK_OUTPUT(SHOW, 0, __LINE__, "not next")
  ------------------
  |  |  137|    132|	{ ; }
  ------------------
 1396|    132|			break;
 1397|       |
 1398|      0|		case PTN_ONE_MORE:
  ------------------
  |  Branch (1398:3): [True: 0, False: 919k]
  ------------------
 1399|       |
 1400|      0|			CHECK_OUTPUT(SHOW, 0, __LINE__, "loop+ start")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1401|       |
 1402|   135k|		case PTN_ZERO_MORE:
  ------------------
  |  Branch (1402:3): [True: 135k, False: 784k]
  ------------------
 1403|       |
 1404|       |			/* check if loop already started */
 1405|   135k|			if (expr_crs == loop_crs) {
  ------------------
  |  Branch (1405:8): [True: 22.7k, False: 112k]
  ------------------
 1406|  22.7k|				loop_cnts[EXPR_DATA_1(loop_crs)]++;
  ------------------
  |  |  111|  22.7k|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|  22.7k|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1407|  22.7k|				CHECK_OUTPUT(SHOW, 0, __LINE__, "loop again")
  ------------------
  |  |  137|  22.7k|	{ ; }
  ------------------
 1408|   112k|			} else {
 1409|       |				/* check if loop nested, wasn't running but has a count */
 1410|   112k|				if (loop_cnts[EXPR_DATA_1(expr_crs)]) {
  ------------------
  |  |  111|   112k|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|   112k|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  |  Branch (1410:9): [True: 0, False: 112k]
  ------------------
 1411|      0|					CHECK_OUTPUT(SHOW, 0, __LINE__, "loop already running")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1412|      0|					goto loop_next;
 1413|      0|				}
 1414|       |
 1415|       |				/* start loop */
 1416|   112k|				loop_crs = expr_crs;
 1417|   112k|				loop_cnts[EXPR_DATA_1(loop_crs)] = 1;
  ------------------
  |  |  111|   112k|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|   112k|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1418|   112k|				CHECK_OUTPUT(SHOW, 0, __LINE__, "loop start")
  ------------------
  |  |  137|   112k|	{ ; }
  ------------------
 1419|   112k|			}
 1420|       |
 1421|       |			/* start loop expression */
 1422|   135k|			input_crs_prv = *input_crs;
 1423|   135k|			ret = pattern_check_expression(input, input_crs, input_minmax, input_dir,
 1424|   135k|					expr_data, hook, hook_data, hook_max, EXPR_DATA_0(expr_crs),
  ------------------
  |  |  110|   135k|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|   135k|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1425|   135k|					notOperator, loop_crs, loop_cnts, table);
 1426|   135k|			if (ret) {
  ------------------
  |  Branch (1426:8): [True: 22.7k, False: 112k]
  ------------------
 1427|  22.7k|				CHECK_OUTPUT(RETURN, 1, __LINE__, "loop passed")
  ------------------
  |  |  137|  22.7k|	{ ; }
  ------------------
 1428|  22.7k|				return 1;
 1429|  22.7k|			}
 1430|   112k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "loop failed")
  ------------------
  |  |  137|   112k|	{ ; }
  ------------------
 1431|   112k|			*input_crs = input_crs_prv;
 1432|       |
 1433|       |			/* check loop count */
 1434|   112k|			loop_cnts[EXPR_DATA_1(loop_crs)]--;
  ------------------
  |  |  111|   112k|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|   112k|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1435|   112k|			if (EXPR_TYPE(expr_crs) == PTN_ONE_MORE) {
  ------------------
  |  |  107|   112k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|   112k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1435:8): [True: 0, False: 112k]
  ------------------
 1436|      0|				if (loop_cnts[EXPR_DATA_1(loop_crs)] < 1) {
  ------------------
  |  |  111|      0|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|      0|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
  |  Branch (1436:9): [True: 0, False: 0]
  ------------------
 1437|      0|					CHECK_OUTPUT(RETURN, 0, __LINE__, "loop+ failed")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1438|      0|					return 0;
 1439|      0|				} else
 1440|      0|					CHECK_OUTPUT(SHOW, 0, __LINE__, "loop+ passed")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1441|      0|			}
 1442|       |
 1443|       |		/* continue after loop */
 1444|   112k|		loop_next:
 1445|   112k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|   112k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|   112k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1446|   112k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "loop next")
  ------------------
  |  |  137|   112k|	{ ; }
  ------------------
 1447|   112k|			break;
 1448|       |
 1449|  77.4k|		case PTN_OPTIONAL:
  ------------------
  |  Branch (1449:3): [True: 77.4k, False: 842k]
  ------------------
 1450|       |
 1451|       |			/* save current state */
 1452|  77.4k|			input_crs_prv = *input_crs;
 1453|       |
 1454|       |			/* start optional expression */
 1455|  77.4k|			CHECK_OUTPUT(CALL, 0, __LINE__, "option start")
  ------------------
  |  |  137|  77.4k|	{ ; }
  ------------------
 1456|  77.4k|			if (pattern_check_expression(input, input_crs, input_minmax, input_dir,
  ------------------
  |  Branch (1456:8): [True: 75.4k, False: 1.97k]
  ------------------
 1457|  77.4k|						expr_data, hook, hook_data, hook_max, EXPR_DATA_0(expr_crs),
  ------------------
  |  |  110|  77.4k|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|  77.4k|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1458|  77.4k|						notOperator, loop_crs, loop_cnts, table)) {
 1459|  75.4k|				CHECK_OUTPUT(RETURN, 1, __LINE__, "option passed")
  ------------------
  |  |  137|  75.4k|	{ ; }
  ------------------
 1460|  75.4k|				return 1;
 1461|  75.4k|			}
 1462|  1.97k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "option failed")
  ------------------
  |  |  137|  1.97k|	{ ; }
  ------------------
 1463|       |
 1464|       |			/* continue after optional expression */
 1465|  1.97k|			*input_crs = input_crs_prv;
 1466|  1.97k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "no option start")
  ------------------
  |  |  137|  1.97k|	{ ; }
  ------------------
 1467|  1.97k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|  1.97k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  1.97k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1468|  1.97k|			break;
 1469|       |
 1470|  75.5k|		case PTN_ALTERNATE:
  ------------------
  |  Branch (1470:3): [True: 75.5k, False: 844k]
  ------------------
 1471|       |
 1472|       |			/* save current state */
 1473|  75.5k|			input_crs_prv = *input_crs;
 1474|       |
 1475|       |			/* start first expression */
 1476|  75.5k|			CHECK_OUTPUT(CALL, 0, __LINE__, "or 1 start")
  ------------------
  |  |  137|  75.5k|	{ ; }
  ------------------
 1477|  75.5k|			if (pattern_check_expression(input, input_crs, input_minmax, input_dir,
  ------------------
  |  Branch (1477:8): [True: 75.4k, False: 33]
  ------------------
 1478|  75.5k|						expr_data, hook, hook_data, hook_max, EXPR_DATA_0(expr_crs),
  ------------------
  |  |  110|  75.5k|#define EXPR_DATA_0(at) EXPR_DATA_0_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  101|  75.5k|#define EXPR_DATA_0_IN(at, buffer) (buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1479|  75.5k|						notOperator, loop_crs, loop_cnts, table)) {
 1480|  75.4k|				CHECK_OUTPUT(RETURN, 1, __LINE__, "or 1 passed")
  ------------------
  |  |  137|  75.4k|	{ ; }
  ------------------
 1481|  75.4k|				return 1;
 1482|  75.4k|			}
 1483|     33|			CHECK_OUTPUT(SHOW, 0, __LINE__, "or 1 failed")
  ------------------
  |  |  137|     33|	{ ; }
  ------------------
 1484|       |
 1485|       |			/* start second expression (no need to push) */
 1486|     33|			*input_crs = input_crs_prv;
 1487|     33|			CHECK_OUTPUT(SHOW, 0, __LINE__, "or 2 start")
  ------------------
  |  |  137|     33|	{ ; }
  ------------------
 1488|     33|			expr_crs = EXPR_DATA_1(expr_crs);
  ------------------
  |  |  111|     33|#define EXPR_DATA_1(at) EXPR_DATA_1_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  102|     33|#define EXPR_DATA_1_IN(at, buffer) (buffer[(at) + 4])
  |  |  ------------------
  ------------------
 1489|     33|			break;
 1490|       |
 1491|      0|		case PTN_ANY:
  ------------------
  |  Branch (1491:3): [True: 0, False: 919k]
  ------------------
 1492|       |
 1493|      0|			CHECK_OUTPUT(SHOW, 0, __LINE__, "any")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1494|      0|			*input_crs += input_dir;
 1495|      0|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|      0|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      0|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1496|      0|			break;
 1497|       |
 1498|  98.1k|		case PTN_ATTRIBUTES:
  ------------------
  |  Branch (1498:3): [True: 98.1k, False: 821k]
  ------------------
 1499|       |
 1500|  98.1k|			ret = pattern_check_attrs(
 1501|  98.1k|					input[*input_crs], EXPR_CONST_DATA(expr_crs), table);
  ------------------
  |  |  114|  98.1k|#define EXPR_CONST_DATA(at) EXPR_CONST_DATA_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  105|  98.1k|#define EXPR_CONST_DATA_IN(at, buffer) ((const widechar *)&buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1502|  98.1k|			if (ret && notOperator) {
  ------------------
  |  Branch (1502:8): [True: 22.7k, False: 75.4k]
  |  Branch (1502:15): [True: 0, False: 22.7k]
  ------------------
 1503|      0|				CHECK_OUTPUT(RETURN, 0, __LINE__, "attributes failed:  not");
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1504|      0|				return 0;
 1505|      0|			}
 1506|  98.1k|			if (!ret && !notOperator) {
  ------------------
  |  Branch (1506:8): [True: 75.4k, False: 22.7k]
  |  Branch (1506:16): [True: 75.4k, False: 0]
  ------------------
 1507|  75.4k|				CHECK_OUTPUT(RETURN, 0, __LINE__, "attributes failed");
  ------------------
  |  |  137|  75.4k|	{ ; }
  ------------------
 1508|  75.4k|				return 0;
 1509|  75.4k|			}
 1510|  22.7k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "attributes passed")
  ------------------
  |  |  137|  22.7k|	{ ; }
  ------------------
 1511|  22.7k|			*input_crs += input_dir;
 1512|  22.7k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|  22.7k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  22.7k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1513|  22.7k|			break;
 1514|       |
 1515|  46.1k|		case PTN_CHARS:
  ------------------
  |  Branch (1515:3): [True: 46.1k, False: 873k]
  ------------------
 1516|       |
 1517|  46.1k|			ret = pattern_check_chars(input[*input_crs], EXPR_CONST_DATA(expr_crs));
  ------------------
  |  |  114|  46.1k|#define EXPR_CONST_DATA(at) EXPR_CONST_DATA_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  105|  46.1k|#define EXPR_CONST_DATA_IN(at, buffer) ((const widechar *)&buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1518|  46.1k|			if (ret && notOperator) {
  ------------------
  |  Branch (1518:8): [True: 0, False: 46.1k]
  |  Branch (1518:15): [True: 0, False: 0]
  ------------------
 1519|      0|				CHECK_OUTPUT(RETURN, 0, __LINE__, "chars failed:  not");
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1520|      0|				return 0;
 1521|      0|			}
 1522|  46.1k|			if (!ret && !notOperator) {
  ------------------
  |  Branch (1522:8): [True: 46.1k, False: 0]
  |  Branch (1522:16): [True: 38.0k, False: 8.06k]
  ------------------
 1523|  38.0k|				CHECK_OUTPUT(RETURN, 0, __LINE__, "chars failed");
  ------------------
  |  |  137|  38.0k|	{ ; }
  ------------------
 1524|  38.0k|				return 0;
 1525|  38.0k|			}
 1526|  8.06k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "chars passed")
  ------------------
  |  |  137|  8.06k|	{ ; }
  ------------------
 1527|  8.06k|			*input_crs += input_dir;
 1528|  8.06k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|  8.06k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|  8.06k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1529|  8.06k|			break;
 1530|       |
 1531|      0|		case PTN_HOOK:
  ------------------
  |  Branch (1531:3): [True: 0, False: 919k]
  ------------------
 1532|       |
 1533|      0|			if (hook == NULL) {
  ------------------
  |  Branch (1533:8): [True: 0, False: 0]
  ------------------
 1534|      0|				CHECK_OUTPUT(RETURN, 0, __LINE__, "hook failed:  NULL");
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1535|      0|				return 0;
 1536|      0|			}
 1537|       |
 1538|       |			/* copy expression data */
 1539|      0|			data = EXPR_CONST_DATA(expr_crs);
  ------------------
  |  |  114|      0|#define EXPR_CONST_DATA(at) EXPR_CONST_DATA_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  105|      0|#define EXPR_CONST_DATA_IN(at, buffer) ((const widechar *)&buffer[(at) + 3])
  |  |  ------------------
  ------------------
 1540|      0|			for (i = 0; i < data[0]; i++) hook_data[i] = data[i + 1];
  ------------------
  |  Branch (1540:16): [True: 0, False: 0]
  ------------------
 1541|       |
 1542|       |			/* call hook function */
 1543|      0|			ret = hook(input[*input_crs], data[0]);
 1544|      0|			if (ret && notOperator) {
  ------------------
  |  Branch (1544:8): [True: 0, False: 0]
  |  Branch (1544:15): [True: 0, False: 0]
  ------------------
 1545|      0|				CHECK_OUTPUT(RETURN, 0, __LINE__, "hook failed:  not");
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1546|      0|				return 0;
 1547|      0|			}
 1548|      0|			if (!ret && !notOperator) {
  ------------------
  |  Branch (1548:8): [True: 0, False: 0]
  |  Branch (1548:16): [True: 0, False: 0]
  ------------------
 1549|      0|				CHECK_OUTPUT(RETURN, 0, __LINE__, "hook failed");
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1550|      0|				return 0;
 1551|      0|			}
 1552|      0|			CHECK_OUTPUT(SHOW, 0, __LINE__, "hook passed")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1553|      0|			*input_crs += input_dir;
 1554|      0|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|      0|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|      0|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1555|      0|			break;
 1556|       |
 1557|      0|		case PTN_END:
  ------------------
  |  Branch (1557:3): [True: 0, False: 919k]
  ------------------
 1558|      0|			break;
 1559|       |
 1560|      0|		default:
  ------------------
  |  Branch (1560:3): [True: 0, False: 919k]
  ------------------
 1561|       |
 1562|      0|			CHECK_OUTPUT(RETURN, 0, __LINE__, "unknown opcode")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1563|      0|			return 0;
 1564|   919k|		}
 1565|       |
 1566|       |		/* check end expression  */
 1567|   786k|		while (EXPR_TYPE(expr_crs) == PTN_END) {
  ------------------
  |  |  107|   786k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|   786k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1567:10): [True: 252k, False: 534k]
  ------------------
 1568|   252k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "end")
  ------------------
  |  |  137|   252k|	{ ; }
  ------------------
 1569|       |
 1570|       |			/* check for end of expressions */
 1571|   252k|			if (EXPR_NXT(expr_crs) == PTN_END) break;
  ------------------
  |  |  109|   252k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|   252k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
  |  Branch (1571:8): [True: 75.4k, False: 176k]
  ------------------
 1572|       |
 1573|   176k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|   176k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|   176k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1574|       |
 1575|       |			/* returning loop */
 1576|   176k|			if (EXPR_TYPE(expr_crs) == PTN_ZERO_MORE ||
  ------------------
  |  |  107|   176k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|   176k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1576:8): [True: 22.7k, False: 154k]
  ------------------
 1577|   154k|					EXPR_TYPE(expr_crs) == PTN_ONE_MORE) {
  ------------------
  |  |  107|   154k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|   154k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1577:6): [True: 0, False: 154k]
  ------------------
 1578|  22.7k|				CHECK_OUTPUT(SHOW, 0, __LINE__, "end loop")
  ------------------
  |  |  137|  22.7k|	{ ; }
  ------------------
 1579|       |
 1580|       |				/* check that loop consumed input */
 1581|  22.7k|				if (*input_crs == input_start) {
  ------------------
  |  Branch (1581:9): [True: 0, False: 22.7k]
  ------------------
 1582|      0|					CHECK_OUTPUT(RETURN, 0, __LINE__, "loop failed:  did not consume")
  ------------------
  |  |  137|      0|	{ ; }
  ------------------
 1583|      0|					return 0;
 1584|      0|				}
 1585|       |
 1586|       |				/* loops do not continue to the next expression */
 1587|  22.7k|				break;
 1588|  22.7k|			}
 1589|       |
 1590|       |			/* returning not */
 1591|   154k|			if (EXPR_TYPE(expr_crs) == PTN_NOT) notOperator = !notOperator;
  ------------------
  |  |  107|   154k|#define EXPR_TYPE(at) EXPR_TYPE_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |   98|   154k|#define EXPR_TYPE_IN(at, buffer) (buffer[(at) + 0])
  |  |  ------------------
  ------------------
  |  Branch (1591:8): [True: 0, False: 154k]
  ------------------
 1592|       |
 1593|   154k|			expr_crs = EXPR_NXT(expr_crs);
  ------------------
  |  |  109|   154k|#define EXPR_NXT(at) EXPR_NXT_IN((at), expr_data)
  |  |  ------------------
  |  |  |  |  100|   154k|#define EXPR_NXT_IN(at, buffer) (buffer[(at) + 2])
  |  |  ------------------
  ------------------
 1594|       |
 1595|   154k|			CHECK_OUTPUT(SHOW, 0, __LINE__, "end next")
  ------------------
  |  |  137|   154k|	{ ; }
  ------------------
 1596|   154k|		}
 1597|       |
 1598|   632k|		CHECK_OUTPUT(SHOW, 0, __LINE__, "check next")
  ------------------
  |  |  137|   632k|	{ ; }
  ------------------
 1599|   632k|	}
 1600|       |
 1601|  75.4k|	CHECK_OUTPUT(RETURN, 1, __LINE__, "check passed:  end of expression");
  ------------------
  |  |  137|  75.4k|	{ ; }
  ------------------
 1602|  75.4k|	return 1;
 1603|   476k|}
pattern.c:pattern_check_attrs:
 1303|  98.1k|		const TranslationTableHeader *table) {
 1304|  98.1k|	int attrs;
 1305|       |
 1306|  98.1k|	attrs = ((expr_data[0] << 16) | expr_data[1]) & ~(CTC_EndOfInput | CTC_EmpMatch);
 1307|  98.1k|	if (!checkAttr(input_char, attrs, table)) return 0;
  ------------------
  |  Branch (1307:6): [True: 75.4k, False: 22.7k]
  ------------------
 1308|  22.7k|	return 1;
 1309|  98.1k|}
pattern.c:checkAttr:
   68|  98.1k|		const TranslationTableHeader *table) {
   69|  98.1k|	return (((findCharOrDots(c, translation_direction ? 0 : 1, table))->attributes & a)
  ------------------
  |  Branch (69:10): [True: 22.7k, False: 75.4k]
  |  Branch (69:30): [True: 0, False: 98.1k]
  ------------------
   70|  98.1k|					? 1
   71|  98.1k|					: 0);
   72|  98.1k|}
pattern.c:findCharOrDots:
   39|  98.1k|findCharOrDots(widechar c, int m, const TranslationTableHeader *table) {
   40|       |	/* Look up character or dot pattern in the appropriate
   41|       |	 * table. */
   42|  98.1k|	static TranslationTableCharacter noChar = { NULL, -1, 0, 0, 0, CTC_Space, 0, 0, 32, 0,
   43|  98.1k|		0 };
   44|  98.1k|	static TranslationTableCharacter noDots = { NULL, -1, 0, 0, 0, CTC_Space, 0, 0,
   45|  98.1k|		LOU_DOTS, 0, 0 };
   46|  98.1k|	TranslationTableCharacter *notFound;
   47|  98.1k|	TranslationTableCharacter *character;
   48|  98.1k|	TranslationTableOffset bucket;
   49|  98.1k|	unsigned long int makeHash = _lou_charHash(c);
   50|  98.1k|	if (m == 0) {
  ------------------
  |  Branch (50:6): [True: 0, False: 98.1k]
  ------------------
   51|      0|		bucket = table->characters[makeHash];
   52|      0|		notFound = &noChar;
   53|  98.1k|	} else {
   54|  98.1k|		bucket = table->dots[makeHash];
   55|  98.1k|		notFound = &noDots;
   56|  98.1k|	}
   57|  98.1k|	while (bucket) {
  ------------------
  |  Branch (57:9): [True: 85.4k, False: 12.7k]
  ------------------
   58|  85.4k|		character = (TranslationTableCharacter *)&table->ruleArea[bucket];
   59|  85.4k|		if (character->value == c) return character;
  ------------------
  |  Branch (59:7): [True: 85.4k, False: 0]
  ------------------
   60|      0|		bucket = character->next;
   61|      0|	}
   62|  12.7k|	notFound->value = c;
   63|  12.7k|	return notFound;
   64|  98.1k|}
pattern.c:pattern_check_chars:
 1289|  46.1k|pattern_check_chars(const widechar input_char, const widechar *expr_data) {
 1290|  46.1k|	int expr_cnt, i;
 1291|       |
 1292|  46.1k|	expr_cnt = expr_data[0] + 1;
 1293|       |
 1294|  92.2k|	for (i = 1; i < expr_cnt; i++)
  ------------------
  |  Branch (1294:14): [True: 46.1k, False: 46.1k]
  ------------------
 1295|  46.1k|		if (input_char == expr_data[i]) break;
  ------------------
  |  Branch (1295:7): [True: 0, False: 46.1k]
  ------------------
 1296|       |
 1297|  46.1k|	if (i == expr_cnt) return 0;
  ------------------
  |  Branch (1297:6): [True: 46.1k, False: 0]
  ------------------
 1298|      0|	return 1;
 1299|  46.1k|}

_lou_stringHash:
  140|    142|_lou_stringHash(const widechar *c, int lowercase, const TranslationTableHeader *table) {
  141|    142|	if (!lowercase)
  ------------------
  |  Branch (141:6): [True: 142, False: 0]
  ------------------
  142|    142|		return (((unsigned long int)c[0] << 8) + (unsigned long int)c[1]) % HASHNUM;
  ------------------
  |  |   77|    142|#define HASHNUM 1123
  ------------------
  143|      0|	else
  144|      0|		return (((unsigned long int)toLowercase(c[0], table) << 8) +
  145|      0|					   (unsigned long int)toLowercase(c[1], table)) %
  146|      0|				HASHNUM;
  ------------------
  |  |   77|      0|#define HASHNUM 1123
  ------------------
  147|    142|}
_lou_charHash:
  150|   144M|_lou_charHash(widechar c) {
  151|   144M|	return (unsigned long int)c % HASHNUM;
  ------------------
  |  |   77|   144M|#define HASHNUM 1123
  ------------------
  152|   144M|}
_lou_showString:
  155|      4|_lou_showString(widechar const *chars, int length, int forceHex) {
  156|       |	/* Translate a string of characters to the encoding used in character
  157|       |	 * operands */
  158|      4|	static char scratchBuf[MAXSTRING];
  159|      4|	int bufPos = 0;
  160|      4|	scratchBuf[bufPos++] = '\'';
  161|       |
  162|     22|	for (int charPos = 0; (charPos < length) && (bufPos < (MAXSTRING - 2));
  ------------------
  |  |   80|     18|#define MAXSTRING 2048
  ------------------
  |  Branch (162:24): [True: 18, False: 4]
  |  Branch (162:46): [True: 18, False: 0]
  ------------------
  163|     18|			charPos += 1) {
  164|     18|		widechar c = chars[charPos];
  165|       |
  166|     18|		if (!forceHex && isASCII(c)) {
  ------------------
  |  Branch (166:7): [True: 18, False: 0]
  |  Branch (166:20): [True: 18, False: 0]
  ------------------
  167|     18|			scratchBuf[bufPos++] = (char)c;
  168|     18|		} else {
  169|      0|			char hexbuf[20];
  170|      0|			int hexLength;
  171|      0|			char escapeLetter;
  172|       |
  173|      0|			int leadingZeros;
  174|      0|			int hexPos;
  175|      0|			hexLength = sprintf(hexbuf, "%x", c);
  176|      0|			switch (hexLength) {
  177|      0|			case 1:
  ------------------
  |  Branch (177:4): [True: 0, False: 0]
  ------------------
  178|      0|			case 2:
  ------------------
  |  Branch (178:4): [True: 0, False: 0]
  ------------------
  179|      0|			case 3:
  ------------------
  |  Branch (179:4): [True: 0, False: 0]
  ------------------
  180|      0|			case 4:
  ------------------
  |  Branch (180:4): [True: 0, False: 0]
  ------------------
  181|      0|				escapeLetter = 'x';
  182|      0|				leadingZeros = 4 - hexLength;
  183|      0|				break;
  184|      0|			case 5:
  ------------------
  |  Branch (184:4): [True: 0, False: 0]
  ------------------
  185|      0|				escapeLetter = 'y';
  186|      0|				leadingZeros = 0;
  187|      0|				break;
  188|      0|			case 6:
  ------------------
  |  Branch (188:4): [True: 0, False: 0]
  ------------------
  189|      0|			case 7:
  ------------------
  |  Branch (189:4): [True: 0, False: 0]
  ------------------
  190|      0|			case 8:
  ------------------
  |  Branch (190:4): [True: 0, False: 0]
  ------------------
  191|      0|				escapeLetter = 'z';
  192|      0|				leadingZeros = 8 - hexLength;
  193|      0|				break;
  194|      0|			default:
  ------------------
  |  Branch (194:4): [True: 0, False: 0]
  ------------------
  195|      0|				escapeLetter = '?';
  196|      0|				leadingZeros = 0;
  197|      0|				break;
  198|      0|			}
  199|      0|			if ((bufPos + leadingZeros + hexLength + 4) >= (MAXSTRING - 2)) break;
  ------------------
  |  |   80|      0|#define MAXSTRING 2048
  ------------------
  |  Branch (199:8): [True: 0, False: 0]
  ------------------
  200|      0|			scratchBuf[bufPos++] = '\\';
  201|      0|			scratchBuf[bufPos++] = escapeLetter;
  202|      0|			for (hexPos = 0; hexPos < leadingZeros; hexPos++) scratchBuf[bufPos++] = '0';
  ------------------
  |  Branch (202:21): [True: 0, False: 0]
  ------------------
  203|      0|			for (hexPos = 0; hexPos < hexLength; hexPos++)
  ------------------
  |  Branch (203:21): [True: 0, False: 0]
  ------------------
  204|      0|				scratchBuf[bufPos++] = hexbuf[hexPos];
  205|      0|		}
  206|     18|	}
  207|      4|	scratchBuf[bufPos++] = '\'';
  208|      4|	scratchBuf[bufPos] = 0;
  209|      4|	return scratchBuf;
  210|      4|}
_lou_unknownDots:
  241|   319k|_lou_unknownDots(widechar dots) {
  242|   319k|	static char buffer[20];
  243|       |
  244|   319k|	int k = 0;
  245|   319k|	buffer[k++] = '\\';
  246|       |
  247|  5.11M|	for (int mappingPos = 0; dotMapping[mappingPos].key; mappingPos++) {
  ------------------
  |  Branch (247:27): [True: 4.79M, False: 319k]
  ------------------
  248|  4.79M|		if (dots & dotMapping[mappingPos].key) buffer[k++] = dotMapping[mappingPos].value;
  ------------------
  |  Branch (248:7): [True: 91.8k, False: 4.70M]
  ------------------
  249|  4.79M|	}
  250|       |
  251|   319k|	if (k == 1) buffer[k++] = '0';
  ------------------
  |  Branch (251:6): [True: 246k, False: 73.2k]
  ------------------
  252|   319k|	buffer[k++] = '/';
  253|   319k|	buffer[k] = 0;
  254|   319k|	return buffer;
  255|   319k|}
_lou_isValidMode:
  333|    116|_lou_isValidMode(int mode) {
  334|       |	// mask out all valid mode bits. If you end up with some bits set
  335|       |	// then the input isn't valid. See
  336|       |	// https://en.wikipedia.org/wiki/Material_nonimplication
  337|    116|	for (size_t i = 0;
  338|    928|			i < (sizeof(validTranslationModes) / sizeof(*validTranslationModes)); i++)
  ------------------
  |  Branch (338:4): [True: 812, False: 116]
  ------------------
  339|    812|		mode &= ~validTranslationModes[i];
  340|    116|	return !mode;
  341|    116|}

avoid_log:
   44|   105k|void avoid_log(logLevels level, const char *msg) {
   45|   105k|  (void)level;
   46|   105k|  (void)msg;
   47|   105k|}
LLVMFuzzerTestOneInput:
   51|    138|int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   52|    138|  int inputLen = 0;
   53|    138|  int outputLen = 0;
   54|    138|  static int counter = 0;
   55|    138|  if (!initialized) {
  ------------------
  |  Branch (55:7): [True: 1, False: 137]
  ------------------
   56|      1|    lou_registerLogCallback(avoid_log);
   57|      1|    initialized = 1;
   58|      1|  }
   59|       |
   60|    138|  if (size < 512) {
  ------------------
  |  Branch (60:7): [True: 0, False: 138]
  ------------------
   61|      0|    return 0;
   62|      0|  }
   63|       |
   64|       |  // Write first half of fuzz data to a table file.
   65|    138|  char new_file[256];
   66|    138|  sprintf(new_file, "/tmp/libfuzzer-%d.ctb", counter);
   67|    138|  counter++;
   68|       |
   69|    138|  FILE *fp = fopen(new_file, "wb");
   70|    138|  if (!fp) {
  ------------------
  |  Branch (70:7): [True: 0, False: 138]
  ------------------
   71|      0|    return 0;
   72|      0|  }
   73|    138|  fwrite(data, 512, 1, fp);
   74|    138|  fclose(fp);
   75|       |
   76|       |  // Adjust data pointer to after the table file data.
   77|    138|  data += 512;
   78|    138|  size -= 512;
   79|       |
   80|       |  /* check if this works, otherwise bail */
   81|    138|  if (lou_checkTable(new_file) == 0) {
  ------------------
  |  Branch (81:7): [True: 13, False: 125]
  ------------------
   82|     13|    lou_free();
   83|     13|    unlink(new_file);
   84|     13|    return 0;
   85|     13|  }
   86|    125|  char *mutable_data = NULL;
   87|    125|  table_default = new_file;
   88|       |
   89|    125|  mutable_data = strndup((char *)data, size);
   90|    125|  if (!mutable_data) {
  ------------------
  |  Branch (90:7): [True: 0, False: 125]
  ------------------
   91|      0|    perror("malloc");
   92|      0|    exit(1);
   93|      0|  }
   94|       |
   95|    125|  widechar *inputText = malloc((size * 16 + 1) * sizeof(widechar));
   96|    125|  int len = (int)_lou_extParseChars(mutable_data, inputText);
   97|    125|  free(mutable_data);
   98|    125|  if (len <= 0) {
  ------------------
  |  Branch (98:7): [True: 9, False: 116]
  ------------------
   99|      9|    free(inputText);
  100|      9|    unlink(new_file);
  101|      9|    lou_free();
  102|      9|    return -1;
  103|      9|  }
  104|       |
  105|    125|  assert(len <= (size * 16));
  ------------------
  |  Branch (105:3): [True: 0, False: 116]
  |  Branch (105:3): [True: 116, False: 0]
  ------------------
  106|    116|  inputLen = len;
  107|    116|  outputLen = len * 16;
  108|    116|  widechar *outputText = malloc((outputLen + 1) * sizeof(widechar));
  109|       |
  110|    116|  lou_backTranslateString(table_default, inputText, &inputLen, outputText,
  111|    116|                      &outputLen, NULL, NULL, ucBrl);
  112|       |
  113|    116|  free(inputText);
  114|    116|  free(outputText);
  115|       |
  116|    116|  lou_free();
  117|    116|  unlink(new_file);
  118|       |
  119|    116|  return 0;
  120|    116|}

