- print - print a set of states == #ifdef REDEBUG == static void print(struct match *m, char *caption, states st, \ == int ch, FILE *d); == #endif */
(m, caption, st, ch, d)
| 939 | == #endif |
| 940 | */ |
| 941 | static void |
| 942 | print(m, caption, st, ch, d) |
| 943 | struct match *m; |
| 944 | char *caption; |
| 945 | states st; |
| 946 | int ch; |
| 947 | FILE *d; |
| 948 | { |
| 949 | register struct re_guts *g = m->g; |
| 950 | register int i; |
| 951 | register int first = 1; |
| 952 | char buf[10]; |
| 953 | |
| 954 | if (!(m->eflags&MY_REG_TRACE)) |
| 955 | return; |
| 956 | |
| 957 | fprintf(d, "%s", caption); |
| 958 | if (ch != '\0') |
| 959 | fprintf(d, " %s", printchar(ch,buf)); |
| 960 | for (i = 0; i < g->nstates; i++) |
| 961 | if (ISSET(st, i)) { |
| 962 | fprintf(d, "%s%d", (first) ? "\t" : ", ", i); |
| 963 | first = 0; |
| 964 | } |
| 965 | fprintf(d, "\n"); |
| 966 | } |
| 967 | |
| 968 | /* |
| 969 | - at - print current situation |
no outgoing calls
no test coverage detected