5 * Created by Jason Allen on 6/22/06.
6 * Copyright 2006 Ohloh. All rights reserved.
12 void state_initialize(State *state, char *name, enum Semantic semantic) {
14 state->semantic = semantic;
20 * performs an overall test suite on State.
23 void state_test(void) {
24 printf("passed state_test.\n");
27 bool state_trumps_language(State *the_state, State *other_state) {
28 if (the_state == NULL ||
29 the_state->semantic == semantic_blank ||
30 the_state->semantic == semantic_null ||
31 other_state == NULL) {
34 // simple algorithm... html gets trumped by everything
35 bool trumped = (strcmp(other_state->language, "html") == 0 && strcmp(the_state->language, "html") != 0);
38 log2("[ohcount] - state %s trumped by %s\n", other_state->name, the_state->name);