summaryrefslogtreecommitdiff
path: root/lang/gforth/patches/patch-ae
blob: f8999a928d90389848254ef19320e706100c5123 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ae,v 1.1 2011/03/29 21:19:20 asau Exp $

Due to the bug there is a finite limit on marker invocations.
Fixed upstream after 0.7.0.

--- extend.fs.orig	2007-12-31 21:19:58.000000000 +0300
+++ extend.fs	2009-08-23 04:42:10.000000000 +0400
@@ -213,15 +213,7 @@
 \ defined afterwards) when executing the mark.
 
 : included-files-mark ( -- u )
-    included-files 2@ nip
-    blk @ 0=
-    if \ not input from blocks
-	source-id 1 -1 within
-	if \ input from file
-	    1- \ do not include the last file (hopefully this is the
-	       \ currently included file)
-	then
-    then ;  
+    included-files 2@ nip ;  
 
 \ hmm, most of the saving appears to be pretty unnecessary: we could
 \ derive the wordlists and the words that have to be kept from the
@@ -247,7 +239,7 @@
 
 : marker! ( mark -- )
     \ reset included files count; resize will happen on next add-included-file
-    included-files 2@ drop over @ included-files 2! cell+
+    included-files 2@ 2 pick @ min included-files 2! cell+
     \ rest of marker!
     dup @ swap cell+ ( here rest-of-marker )
     dup @ voclink ! cell+