From e69b7ccee31b9827536c320ad6c68bda98329f4a Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Sat, 29 Oct 2016 13:37:11 -0400 Subject: Fixed string length issues with template and textile processor routines. Fixed array assignments for building page list. Removed dead txtdir.bas. --- txtile.bas | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'txtile.bas') diff --git a/txtile.bas b/txtile.bas index 0ca914d..f9edc43 100644 --- a/txtile.bas +++ b/txtile.bas @@ -4,7 +4,7 @@ 10003 REM INPUT - TFILE$ Textile file to read 10004 REM HFILE$ HTML file to write 10005 REM ======================================= -10010 DIM STK$(20) +10010 DIM STK$(100) 10020 STKPOS = 0:CLEARALL = 0:POPSTOP = 0 10030 OPEN TFILE$ FOR INPUT AS #1 10040 OPEN HFILE$ FOR OUTPUT AS #2 @@ -161,8 +161,8 @@ 12520 WHILE(BACKSTK > 0 AND STK$(BACKSTK) <> LASTOP$) 12530 BACKSTK = BACKSTK - 1 12540 WEND -12550 FOR ISTK = BACKSTK+1 TO STKPOS:OPARG$ = OPARG$ + " " + STK$(ISTK):NEXT ISTK -12555 WHILE(MID$(OPARG$, 1, 1) = " "):OPARG$ = RIGHT$(OPARG$, LEN(OPARG$)-1):WEND +12550 REM FOR ISTK = BACKSTK+1 TO STKPOS:OPARG$ = OPARG$ + " " + STK$(ISTK):NEXT ISTK +12555 REM WHILE(MID$(OPARG$, 1, 1) = " "):OPARG$ = RIGHT$(OPARG$, LEN(OPARG$)-1):WEND 12560 IF LASTOP$ = "##.p" THEN PREOP$ = "

":POSTOP$="

":GOTO 12700 12570 IF LASTOP$ = "##.bq" THEN PREOP$ = "

":POSTOP$="

":GOTO 12700 12580 IF LASTOP$ = "##.bc" THEN PREOP$ = "
":POSTOP$="
":GOTO 12700 @@ -171,6 +171,12 @@ 12610 IF MID$(LASTOP$,1,4) = "##.*" OR MID$(LASTOP$,1,4) = "##.#" THEN PREOP$ = "
  • ":POSTOP$="
  • ":GOTO 12700 12620 IF MID$(LASTOP$,1,4) = "##.u" THEN PREOP$ = "":POSTOP$="":OPARG$="":GOTO 12700 12630 IF MID$(LASTOP$,1,4) = "##.o" THEN PREOP$ = "":POSTOP$="":OPARG$="":GOTO 12700 -12700 STKPOS = BACKSTK-1 -12710 PRINT#2, PREOP$+OPARG$+POSTOP$ -12720 RETURN +12700 REM Write the stack entries out +12710 PRINT#2, PREOP$ +12720 FOR ISTK = BACKSTK+1 TO STKPOS +12730 PRINT#2, STK$(ISTK) +12740 NEXT ISTK +12750 PRINT#2, POSTOP$ +12760 STKPOS = BACKSTK-1 +12770 RETURN + -- cgit v1.2.3