htext 10718 src/simh/scp.c UNIT *uptr, const char *htext, va_list ap) htext 10739 src/simh/scp.c astrings[asnum++] = (char *) htext; htext 10741 src/simh/scp.c for (hblock = astrings; (htext = *hblock) != NULL; hblock++) { htext 10744 src/simh/scp.c while (*htext) { htext 10748 src/simh/scp.c if (sim_isspace (*htext) || *htext == '+') {/* Topic text, indented topic text */ htext 10750 src/simh/scp.c while (*htext && *htext != '\n') htext 10751 src/simh/scp.c htext++; htext 10752 src/simh/scp.c if (*htext) htext 10753 src/simh/scp.c ++htext; htext 10758 src/simh/scp.c if (*htext == '+') { /* More for each + */ htext 10759 src/simh/scp.c while (*htext == '+') { htext 10762 src/simh/scp.c htext++; htext 10765 src/simh/scp.c while (*htext && *htext != '\n' && sim_isspace (*htext)) htext 10766 src/simh/scp.c htext++; htext 10767 src/simh/scp.c if (!*htext) /* Empty after removing leading spaces */ htext 10769 src/simh/scp.c start = htext; htext 10770 src/simh/scp.c while (*htext) { /* Process line for substitutions */ htext 10771 src/simh/scp.c if (*htext == '%') { htext 10772 src/simh/scp.c appendText (topic, start, htext - start); /* Flush up to escape */ htext 10773 src/simh/scp.c switch (*++htext) { /* Evaluate escape */ htext 10796 src/simh/scp.c if (sim_isdigit (*htext)) { htext 10798 src/simh/scp.c while (sim_isdigit (*htext)) htext 10799 src/simh/scp.c n += (n * 10) + (*htext++ - '0'); htext 10800 src/simh/scp.c if (( *htext != 'H' && *htext != 's') || htext 10803 src/simh/scp.c FAIL (SCPE_ARG, Invalid escape, htext); htext 10809 src/simh/scp.c if (*htext == 'H') { /* Append as more input */ htext 10812 src/simh/scp.c FAIL (SCPE_ARG, Too many blocks, htext); htext 10837 src/simh/scp.c FAIL (SCPE_ARG, Invalid escape, htext); htext 10840 src/simh/scp.c start = ++htext; htext 10843 src/simh/scp.c if (*htext == '\n') { /* End of line, append last segment */ htext 10844 src/simh/scp.c htext++; htext 10845 src/simh/scp.c appendText (topic, start, htext - start); htext 10848 src/simh/scp.c htext++; /* Regular character */ htext 10852 src/simh/scp.c if (sim_isdigit (*htext)) { /* Topic heading */ htext 10858 src/simh/scp.c start = htext; htext 10859 src/simh/scp.c while (sim_isdigit (*htext)) htext 10860 src/simh/scp.c n += (n * 10) + (*htext++ - '0'); htext 10861 src/simh/scp.c if ((htext == start) || !n) { htext 10863 src/simh/scp.c FAIL (SCPE_ARG, Invalid topic heading, htext); htext 10873 src/simh/scp.c FAIL (SCPE_ARG, Level not contiguous, htext); /* E.g. 1 3, not reasonable */ htext 10877 src/simh/scp.c while (*htext && (*htext != '\n') && sim_isspace (*htext)) htext 10878 src/simh/scp.c htext++; htext 10879 src/simh/scp.c if (!*htext || (*htext == '\n')) { /* Name missing */ htext 10881 src/simh/scp.c FAIL (SCPE_ARG, Missing topic name, htext); htext 10884 src/simh/scp.c start = htext; htext 10885 src/simh/scp.c while (*htext && (*htext != '\n')) htext 10886 src/simh/scp.c htext++; htext 10887 src/simh/scp.c if (start == htext) { /* Name NULL */ htext 10889 src/simh/scp.c FAIL (SCPE_ARG, Null topic name, htext); htext 10908 src/simh/scp.c if (*htext) htext 10909 src/simh/scp.c htext++; htext 10919 src/simh/scp.c newt->title = (char *) malloc ((htext - start)+1); htext 10926 src/simh/scp.c memcpy (newt->title, start, htext - start); htext 10927 src/simh/scp.c newt->title[htext - start] = '\0'; htext 10928 src/simh/scp.c if (*htext) htext 10929 src/simh/scp.c htext++; htext 10965 src/simh/scp.c if (*htext == ';') { /* Comment */ htext 10966 src/simh/scp.c while (*htext && *htext != '\n') htext 10967 src/simh/scp.c htext++; htext 10971 src/simh/scp.c FAIL (SCPE_ARG, Unknown line type, htext); /* Unknown line */