| 197 | COMMAND(docundone, "i"); |
| 198 | |
| 199 | void docinvalid() |
| 200 | { |
| 201 | vector<const char *> inames, irefs; |
| 202 | enumerate(docidents, docident, d, if(!strchr(d.name, ' ') && !identexists(d.name)) inames.add(d.name);); |
| 203 | inames.sort(stringsort); |
| 204 | if(inames.length()) conoutf("no such ident:"); |
| 205 | loopv(inames) conoutf(" %s", inames[i]); |
| 206 | enumerate(docidents, docident, d, |
| 207 | { |
| 208 | loopv(d.references) if(!identexists(d.references[i])) |
| 209 | { |
| 210 | bool add = true; |
| 211 | loopvj(inames) if(!strcasecmp(inames[j], d.references[i])) add = false; // don't list references to nonexisting but documented entries |
| 212 | if(add) irefs.add(d.references[i]); |
| 213 | } |
| 214 | }); |
| 215 | irefs.sort(stringsort); |
| 216 | if(irefs.length()) conoutf("no such reference:"); |
| 217 | loopv(irefs) conoutf(" %s", irefs[i]); |
| 218 | } |
| 219 | COMMAND(docinvalid, ""); |
| 220 | |
| 221 | void docfind(char *search, int *silent) |