htext 10656 src/simh/scp.c UNIT *uptr, const char *htext, va_list ap) htext 10677 src/simh/scp.c astrings[asnum++] = (char *) htext; htext 10679 src/simh/scp.c for (hblock = astrings; (htext = *hblock) != NULL; hblock++) { htext 10682 src/simh/scp.c while (*htext) { htext 10686 src/simh/scp.c if (sim_isspace (*htext) || *htext == '+') {/* Topic text, indented topic text */ htext 10688 src/simh/scp.c while (*htext && *htext != '\n') htext 10689 src/simh/scp.c htext++; htext 10690 src/simh/scp.c if (*htext) htext 10691 src/simh/scp.c ++htext; htext 10696 src/simh/scp.c if (*htext == '+') { /* More for each + */ htext 10697 src/simh/scp.c while (*htext == '+') { htext 10700 src/simh/scp.c htext++; htext 10703 src/simh/scp.c while (*htext && *htext != '\n' && sim_isspace (*htext)) htext 10704 src/simh/scp.c htext++; htext 10705 src/simh/scp.c if (!*htext) /* Empty after removing leading spaces */ htext 10707 src/simh/scp.c start = htext; htext 10708 src/simh/scp.c while (*htext) { /* Process line for substitutions */ htext 10709 src/simh/scp.c if (*htext == '%') { htext 10710 src/simh/scp.c appendText (topic, start, htext - start); /* Flush up to escape */ htext 10711 src/simh/scp.c switch (*++htext) { /* Evaluate escape */ htext 10734 src/simh/scp.c if (sim_isdigit (*htext)) { htext 10736 src/simh/scp.c while (sim_isdigit (*htext)) htext 10737 src/simh/scp.c n += (n * 10) + (*htext++ - '0'); htext 10738 src/simh/scp.c if (( *htext != 'H' && *htext != 's') || htext 10741 src/simh/scp.c FAIL (SCPE_ARG, Invalid escape, htext); htext 10747 src/simh/scp.c if (*htext == 'H') { /* Append as more input */ htext 10750 src/simh/scp.c FAIL (SCPE_ARG, Too many blocks, htext); htext 10775 src/simh/scp.c FAIL (SCPE_ARG, Invalid escape, htext); htext 10778 src/simh/scp.c start = ++htext; htext 10781 src/simh/scp.c if (*htext == '\n') { /* End of line, append last segment */ htext 10782 src/simh/scp.c htext++; htext 10783 src/simh/scp.c appendText (topic, start, htext - start); htext 10786 src/simh/scp.c htext++; /* Regular character */ htext 10790 src/simh/scp.c if (sim_isdigit (*htext)) { /* Topic heading */ htext 10796 src/simh/scp.c start = htext; htext 10797 src/simh/scp.c while (sim_isdigit (*htext)) htext 10798 src/simh/scp.c n += (n * 10) + (*htext++ - '0'); htext 10799 src/simh/scp.c if ((htext == start) || !n) { htext 10801 src/simh/scp.c FAIL (SCPE_ARG, Invalid topic heading, htext); htext 10811 src/simh/scp.c FAIL (SCPE_ARG, Level not contiguous, htext); /* E.g. 1 3, not reasonable */ htext 10815 src/simh/scp.c while (*htext && (*htext != '\n') && sim_isspace (*htext)) htext 10816 src/simh/scp.c htext++; htext 10817 src/simh/scp.c if (!*htext || (*htext == '\n')) { /* Name missing */ htext 10819 src/simh/scp.c FAIL (SCPE_ARG, Missing topic name, htext); htext 10822 src/simh/scp.c start = htext; htext 10823 src/simh/scp.c while (*htext && (*htext != '\n')) htext 10824 src/simh/scp.c htext++; htext 10825 src/simh/scp.c if (start == htext) { /* Name NULL */ htext 10827 src/simh/scp.c FAIL (SCPE_ARG, Null topic name, htext); htext 10846 src/simh/scp.c if (*htext) htext 10847 src/simh/scp.c htext++; htext 10857 src/simh/scp.c newt->title = (char *) malloc ((htext - start)+1); htext 10864 src/simh/scp.c memcpy (newt->title, start, htext - start); htext 10865 src/simh/scp.c newt->title[htext - start] = '\0'; htext 10866 src/simh/scp.c if (*htext) htext 10867 src/simh/scp.c htext++; htext 10903 src/simh/scp.c if (*htext == ';') { /* Comment */ htext 10904 src/simh/scp.c while (*htext && *htext != '\n') htext 10905 src/simh/scp.c htext++; htext 10909 src/simh/scp.c FAIL (SCPE_ARG, Unknown line type, htext); /* Unknown line */