aboutsummaryrefslogtreecommitdiffstats
path: root/externs.h
diff options
context:
space:
mode:
Diffstat (limited to 'externs.h')
-rw-r--r--externs.h52
1 files changed, 44 insertions, 8 deletions
diff --git a/externs.h b/externs.h
index 4b1fc0e..8ea7f69 100644
--- a/externs.h
+++ b/externs.h
@@ -1,7 +1,7 @@
/*@externs.h:External Declarations:Directories and file conventions@**********/
/* */
-/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.39) */
-/* COPYRIGHT (C) 1991, 2008 Jeffrey H. Kingston */
+/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.41) */
+/* COPYRIGHT (C) 1991, 2023 Jeffrey H. Kingston */
/* */
/* Jeffrey H. Kingston (jeff@it.usyd.edu.au) */
/* School of Information Technologies */
@@ -285,7 +285,7 @@ If you're compiling this, you've got the wrong settings in the makefile!
#define BOOLEAN unsigned
#define FALSE 0
#define TRUE 1
-#define bool(x) (x ? AsciiToFull("TRUE") : AsciiToFull("FALSE") )
+#define bool_show(x) (x ? AsciiToFull("TRUE") : AsciiToFull("FALSE") )
#define CHILD 0
#define PARENT 1
#define COLM 0
@@ -1620,7 +1620,7 @@ typedef union rec
FIRST_UNION ou1;
SECOND_UNION ou2;
THIRD_UNION ou3;
- FULL_CHAR ostring[4];
+ FULL_CHAR ostring[];
} os1;
struct closure_type /* all fields of CLOSURE, both as token and object */
@@ -2661,7 +2661,7 @@ typedef struct back_end_rec {
}
#define NewWord(x, typ, len, pos) \
-{ zz_size = sizeof(struct word_type) - 4 + ((len)+1)*sizeof(FULL_CHAR); \
+{ zz_size = sizeof(struct word_type) + ((len)+1) * sizeof(FULL_CHAR); \
/* NB the following line RESETS zz_size */ \
GetMem(zz_hold, ceiling(zz_size, sizeof(ALIGN)), pos); \
checkmem(zz_hold, typ); \
@@ -2764,14 +2764,50 @@ typedef struct back_end_rec {
#define LastUp(x) pred(x, PARENT)
#define PrevUp(x) pred(x, PARENT)
-#define Child(y, link) \
+/* *** moved to child.h
+static OBJECT ZZChild(OBJECT link)
+{
+ OBJECT y;
+ for( y = pred(link, PARENT); type(y) == LINK; y = pred(y, PARENT) );
+ return y;
+}
+
+#define Child(y, link) ((y) = ZZChild(link))
+*** */
+
+/* ***
for( y = pred(link, PARENT); type(y) == LINK; y = pred(y, PARENT) )
+*** */
+
+/* *** moved to count_child.h
+static OBJECT ZZCountChild(OBJECT link, int *i)
+{
+ OBJECT y;
+ for(y=pred(link, PARENT), (*i)=1; type(y)==LINK; y = pred(y, PARENT), (*i)++);
+ return y;
+}
+
+#define CountChild(y, link, i) ((y) = ZZCountChild(link, &(i)))
+*** */
-#define CountChild(y, link, i) \
+/* ***
for( y=pred(link, PARENT), i=1; type(y)==LINK; y = pred(y, PARENT), i++ )
+*** */
+
+/* *** moved to parent.h
+static OBJECT ZZParent(OBJECT link)
+{
+ OBJECT y;
+ for( y = pred(link, CHILD); type(y) == LINK; y = pred(y, CHILD) );
+ return y;
+}
+
+#define Parent(y, link) ((y) = ZZParent(link))
+*** */
-#define Parent(y, link) \
+/* ***
for( y = pred(link, CHILD); type(y) == LINK; y = pred(y, CHILD) )
+*** */
/*@::UpDim(), DownDim(), Link(), DeleteLink(), etc.@**************************/