htext 10271 src/simh/scp.c UNIT *uptr, const char *htext, va_list ap) htext 10292 src/simh/scp.c astrings[asnum++] = (char *) htext; htext 10294 src/simh/scp.c for (hblock = astrings; (htext = *hblock) != NULL; hblock++) { htext 10297 src/simh/scp.c while (*htext) { htext 10301 src/simh/scp.c if (sim_isspace (*htext) || *htext == '+') {/* Topic text, indented topic text */ htext 10303 src/simh/scp.c while (*htext && *htext != '\n') htext 10304 src/simh/scp.c htext++; htext 10305 src/simh/scp.c if (*htext) htext 10306 src/simh/scp.c ++htext; htext 10311 src/simh/scp.c if (*htext == '+') { /* More for each + */ htext 10312 src/simh/scp.c while (*htext == '+') { htext 10315 src/simh/scp.c htext++; htext 10318 src/simh/scp.c while (*htext && *htext != '\n' && sim_isspace (*htext)) htext 10319 src/simh/scp.c htext++; htext 10320 src/simh/scp.c if (!*htext) /* Empty after removing leading spaces */ htext 10322 src/simh/scp.c start = htext; htext 10323 src/simh/scp.c while (*htext) { /* Process line for substitutions */ htext 10324 src/simh/scp.c if (*htext == '%') { htext 10325 src/simh/scp.c appendText (topic, start, htext - start); /* Flush up to escape */ htext 10326 src/simh/scp.c switch (*++htext) { /* Evaluate escape */ htext 10349 src/simh/scp.c if (sim_isdigit (*htext)) { htext 10351 src/simh/scp.c while (sim_isdigit (*htext)) htext 10352 src/simh/scp.c n += (n * 10) + (*htext++ - '0'); htext 10353 src/simh/scp.c if (( *htext != 'H' && *htext != 's') || htext 10356 src/simh/scp.c FAIL (SCPE_ARG, Invalid escape, htext); htext 10362 src/simh/scp.c if (*htext == 'H') { /* Append as more input */ htext 10365 src/simh/scp.c FAIL (SCPE_ARG, Too many blocks, htext); htext 10390 src/simh/scp.c FAIL (SCPE_ARG, Invalid escape, htext); htext 10393 src/simh/scp.c start = ++htext; htext 10396 src/simh/scp.c if (*htext == '\n') { /* End of line, append last segment */ htext 10397 src/simh/scp.c htext++; htext 10398 src/simh/scp.c appendText (topic, start, htext - start); htext 10401 src/simh/scp.c htext++; /* Regular character */ htext 10405 src/simh/scp.c if (sim_isdigit (*htext)) { /* Topic heading */ htext 10411 src/simh/scp.c start = htext; htext 10412 src/simh/scp.c while (sim_isdigit (*htext)) htext 10413 src/simh/scp.c n += (n * 10) + (*htext++ - '0'); htext 10414 src/simh/scp.c if ((htext == start) || !n) { htext 10416 src/simh/scp.c FAIL (SCPE_ARG, Invalid topic heading, htext); htext 10426 src/simh/scp.c FAIL (SCPE_ARG, Level not contiguous, htext); /* E.g. 1 3, not reasonable */ htext 10430 src/simh/scp.c while (*htext && (*htext != '\n') && sim_isspace (*htext)) htext 10431 src/simh/scp.c htext++; htext 10432 src/simh/scp.c if (!*htext || (*htext == '\n')) { /* Name missing */ htext 10434 src/simh/scp.c FAIL (SCPE_ARG, Missing topic name, htext); htext 10437 src/simh/scp.c start = htext; htext 10438 src/simh/scp.c while (*htext && (*htext != '\n')) htext 10439 src/simh/scp.c htext++; htext 10440 src/simh/scp.c if (start == htext) { /* Name NULL */ htext 10442 src/simh/scp.c FAIL (SCPE_ARG, Null topic name, htext); htext 10461 src/simh/scp.c if (*htext) htext 10462 src/simh/scp.c htext++; htext 10472 src/simh/scp.c newt->title = (char *) malloc ((htext - start)+1); htext 10479 src/simh/scp.c memcpy (newt->title, start, htext - start); htext 10480 src/simh/scp.c newt->title[htext - start] = '\0'; htext 10481 src/simh/scp.c if (*htext) htext 10482 src/simh/scp.c htext++; htext 10518 src/simh/scp.c if (*htext == ';') { /* Comment */ htext 10519 src/simh/scp.c while (*htext && *htext != '\n') htext 10520 src/simh/scp.c htext++; htext 10524 src/simh/scp.c FAIL (SCPE_ARG, Unknown line type, htext); /* Unknown line */