Skip to content

Commit

Permalink
[CWEB] 'pop_level' is a macro (again).
Browse files Browse the repository at this point in the history
See line 3944 of WEAVE.WEB.

git-svn-id: svn://tug.org/texlive/trunk/Build/source@67646 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed Jul 16, 2023
1 parent 32fe6d5 commit 76f9780
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
5 changes: 5 additions & 0 deletions texk/web2c/cwebdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2023-07-16 Andreas Scherer <https://ascherer.github.io>

* ctwill-mini.ch,
* cweave.w: 'pop_level' is a macro (again).

2023-07-14 Andreas Scherer <https://ascherer.github.io>

* ctwill.bux,
Expand Down
21 changes: 10 additions & 11 deletions texk/web2c/cwebdir/ctwill-mini.ch
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ Section 1.
\else \global\hoffset=-1.54cm \global\voffset=-1.54cm \fi
\fi

@$ctangle {CTWILL}3 \&{enum} \&{cweb}@>
@$ctwill {CTWILL}3 \&{enum} \&{cweb}@>
@$cweave {CTWILL}3 \&{enum} \&{cweb}@>

@$inner {CTWILL}223 \&{enum} \&{mode}@>
@$outer {CTWILL}223 \&{enum} \&{mode}@>

@** Introduction.
@z

Expand Down Expand Up @@ -67,6 +60,13 @@ faithful overall rendering of {\itt CTWILL}'s code, though. \hfill
The ``banner line'' defined here should be changed whenever \.{CTWILL} is
@-banner@>
@$banner {CTWILL}1 =\.{"This\ is\ CTWILL"}@>

@$ctangle {CTWILL}3 \&{enum} \&{cweb}@>
@$ctwill {CTWILL}3 \&{enum} \&{cweb}@>
@$cweave {CTWILL}3 \&{enum} \&{cweb}@>

@$inner {CTWILL}223 \&{enum} \&{mode}@>
@$outer {CTWILL}223 \&{enum} \&{mode}@>
@z

Section 2.
Expand Down Expand Up @@ -1618,11 +1618,10 @@ Section 228.
@x
force when the current level was begun. This subroutine will never be
called when |stack_ptr==1|.
called when |stack_ptr==1|. It is so simple, we declare it as a macro:
@y
force when the current level was begun.
This subroutine will never be called when |stack_ptr==1|.
force when the current level was begun. It is so simple, we declare it as a
macro. This subroutine will never be called when |stack_ptr==1|.
@z
Section 233--234.
Expand Down
13 changes: 3 additions & 10 deletions texk/web2c/cwebdir/cweave.w
Original file line number Diff line number Diff line change
Expand Up @@ -3794,7 +3794,6 @@ max_stack_ptr=stack;

@ @<Predecl...@>=
static void push_level(text_pointer);@/
static void pop_level(void);

@ To insert token-list |p| into the output, the |push_level| subroutine
is called; it saves the old level of output and gets a new one going.
Expand All @@ -3818,15 +3817,9 @@ text_pointer p)

@ Conversely, the |pop_level| routine restores the conditions that were in
force when the current level was begun. This subroutine will never be
called when |stack_ptr==1|.
called when |stack_ptr==1|. It is so simple, we declare it as a macro:

@c
static void
pop_level(void)
{
cur_end=(--stack_ptr)->end_field;
cur_tok=stack_ptr->tok_field; cur_mode=stack_ptr->mode_field;
}
@d pop_level cur_state = *(--stack_ptr)

@ The |get_output| function returns the next byte of output that is not a
reference to a token list. It returns the values |identifier| or |res_word|
Expand All @@ -3852,7 +3845,7 @@ static eight_bits
get_output(void) /* returns the next token of output */
{
sixteen_bits a; /* current item read from |tok_mem| */
restart: while (cur_tok==cur_end) pop_level();
restart: while (cur_tok==cur_end) pop_level;
a=*(cur_tok++);
if (a>=0400) {
cur_name=a % id_flag + name_dir;
Expand Down

0 comments on commit 76f9780

Please sign in to comment.