summaryrefslogtreecommitdiff
path: root/devel/noweb/files/patch-c_modules.nw
blob: c46d2d83ca8a001ef091c469c1e02212cada9e17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- c/modules.nw.orig	Wed Mar 28 14:44:00 2001
+++ c/modules.nw	Mon Nov 10 09:25:05 2003
@@ -197,11 +197,17 @@
 out as a special case.
 This change probably blows the case where the module being expanded is
 empty.
+
+If the lookup fails then the module (or chunk) is an undefined name.
+We complain about it but want to output the original source.
+We just wrap it in the bogus chunk name in the angle brackets 
+that it must have had in the input and output it. (Tim Daly Nov 13, 2002)
 <<expand a module>>=
 newmod = lookup(p->contents);
 if (newmod==NULL) {
-    errormsg (Error, "undefined chunk name: @<<%s@>>", p->contents);
+    errormsg (Error, "ignoring undefined chunk name: @<<%s@>>", p->contents);
     error=Error;
+    printf("@<<%s@>>",p->contents);
 } else {
     int retcode;
     if (*locformat == 0 && partial_distance == 0) {