| 124 | } |
| 125 | |
| 126 | staticfn void |
| 127 | enlght_line( |
| 128 | const char *start, |
| 129 | const char *middle, |
| 130 | const char *end, |
| 131 | const char *ps) |
| 132 | { |
| 133 | #ifndef NO_ENLGHT_CONTRACTIONS |
| 134 | static const struct contrctn { |
| 135 | const char *twowords, *contrctn; |
| 136 | } contra[] = { |
| 137 | { " are not ", " aren't " }, |
| 138 | { " were not ", " weren't " }, |
| 139 | { " have not ", " haven't " }, |
| 140 | { " had not ", " hadn't " }, |
| 141 | { " can not ", " can't " }, |
| 142 | { " could not ", " couldn't " }, |
| 143 | }; |
| 144 | int i; |
| 145 | #endif |
| 146 | char buf[BUFSZ]; |
| 147 | |
| 148 | Sprintf(buf, " %s%s%s%s.", start, middle, end, ps); |
| 149 | #ifndef NO_ENLGHT_CONTRACTIONS |
| 150 | if (strstri(buf, " not ")) { /* TODO: switch to libc strstr() */ |
| 151 | for (i = 0; i < SIZE(contra); ++i) |
| 152 | (void) strsubst(buf, contra[i].twowords, contra[i].contrctn); |
| 153 | } |
| 154 | #endif |
| 155 | enlght_out(buf); |
| 156 | } |
| 157 | |
| 158 | /* format increased chance to hit or damage or defense (Protection) */ |
| 159 | staticfn char * |
no test coverage detected