summaryrefslogtreecommitdiff
path: root/txtile.bas
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-29 13:37:11 -0400
committerJeffrey Armstrong <jeffrey.armstrong@approximatrix.com>2016-10-29 13:37:11 -0400
commite69b7ccee31b9827536c320ad6c68bda98329f4a (patch)
tree6febad7198a7f5b5ca7e913fcfef2b217d1a3824 /txtile.bas
parentef4863661495fd5c8a570b3233eb7581040e69cb (diff)
downloadgwblog-e69b7ccee31b9827536c320ad6c68bda98329f4a.tar.gz
gwblog-e69b7ccee31b9827536c320ad6c68bda98329f4a.zip
Fixed string length issues with template and textile processor routines. Fixed array assignments for building page list. Removed dead txtdir.bas.
Diffstat (limited to 'txtile.bas')
-rw-r--r--txtile.bas18
1 files changed, 12 insertions, 6 deletions
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$ = "<p>":POSTOP$="</p>":GOTO 12700
12570 IF LASTOP$ = "##.bq" THEN PREOP$ = "<blockquote><p>":POSTOP$="</p></blockquote>":GOTO 12700
12580 IF LASTOP$ = "##.bc" THEN PREOP$ = "<pre><code>":POSTOP$="</code></pre>":GOTO 12700
@@ -171,6 +171,12 @@
12610 IF MID$(LASTOP$,1,4) = "##.*" OR MID$(LASTOP$,1,4) = "##.#" THEN PREOP$ = "<li>":POSTOP$="</li>":GOTO 12700
12620 IF MID$(LASTOP$,1,4) = "##.u" THEN PREOP$ = "</ul>":POSTOP$="":OPARG$="":GOTO 12700
12630 IF MID$(LASTOP$,1,4) = "##.o" THEN PREOP$ = "</ol>":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
+