Skip to content

Commit

Permalink
[CWEB] Fine print for single '@' characters in TeX text.
Browse files Browse the repository at this point in the history
git-svn-id: svn://tug.org/texlive/trunk/Build/source@57870 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed Feb 24, 2021
1 parent 446d9e0 commit 815e4fe
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
20 changes: 10 additions & 10 deletions texk/web2c/cwebboot.cin
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <string.h>

/*:3*//*89:*/
#line 710 "cwebdir/comm-w2c.ch"
#line 709 "cwebdir/comm-w2c.ch"

#if HAVE_GETTEXT
#include <locale.h>
Expand All @@ -34,7 +34,7 @@
#endif

/*:89*//*91:*/
#line 757 "cwebdir/comm-w2c.ch"
#line 756 "cwebdir/comm-w2c.ch"

typedef bool boolean;
#define HAVE_BOOLEAN
Expand All @@ -44,7 +44,7 @@ typedef bool boolean;
#include <lib/lib.h>

/*:91*//*94:*/
#line 796 "cwebdir/comm-w2c.ch"
#line 795 "cwebdir/comm-w2c.ch"

#define CWEB
#include "help.h"
Expand Down Expand Up @@ -482,7 +482,7 @@ static int section_name_cmp(char**,int,name_pointer);
static void scan_args(void);

/*:75*//*96:*/
#line 809 "cwebdir/comm-w2c.ch"
#line 808 "cwebdir/comm-w2c.ch"

static void cb_usage(const_string str);
static void cb_usagehelp(const_string*message,const_string bug_email);
Expand Down Expand Up @@ -515,7 +515,7 @@ for(h= hash;h<=hash_end;*h++= NULL);
#line 78 "cwebdir/comm-w2c.ch"

/*92:*/
#line 771 "cwebdir/comm-w2c.ch"
#line 770 "cwebdir/comm-w2c.ch"

kpse_set_program_name(argv[0],"cweb");

Expand All @@ -524,7 +524,7 @@ kpse_set_program_name(argv[0],"cweb");

#line 85 "cwebdir/comm-w2c.ch"
/*90:*/
#line 719 "cwebdir/comm-w2c.ch"
#line 718 "cwebdir/comm-w2c.ch"

setlocale(LC_MESSAGES,setlocale(LC_CTYPE,""));
texmf_locale= kpse_var_expand("${TEXMFLOCALEDIR}");
Expand Down Expand Up @@ -1427,7 +1427,7 @@ if((**(++argv)=='-'||**argv=='+')&&*(*argv+1))/*80:*/
if(strcmp("-help",*argv)==0||strcmp("--help",*argv)==0)

/*95:*/
#line 800 "cwebdir/comm-w2c.ch"
#line 799 "cwebdir/comm-w2c.ch"

cb_usagehelp(program==ctangle?CTANGLEHELP:
program==cweave?CWEAVEHELP:CTWILLHELP,NULL);
Expand All @@ -1439,7 +1439,7 @@ program==cweave?CWEAVEHELP:CTWILLHELP,NULL);
if(strcmp("-version",*argv)==0||strcmp("--version",*argv)==0)

/*98:*/
#line 847 "cwebdir/comm-w2c.ch"
#line 846 "cwebdir/comm-w2c.ch"

printversionandexit(cb_banner,
program==ctwill?"Donald E. Knuth":"Silvio Levy and Donald E. Knuth",
Expand Down Expand Up @@ -1618,7 +1618,7 @@ cb_usage(program==ctangle?"ctangle":program==cweave?"cweave":"ctwill");

#line 496 "cwebdir/comm-w2c.ch"
/*:76*//*97:*/
#line 813 "cwebdir/comm-w2c.ch"
#line 812 "cwebdir/comm-w2c.ch"

static void cb_usage(const_string str)
{
Expand Down Expand Up @@ -1651,7 +1651,7 @@ history= spotless;exit(wrap_up());
}

/*:97*//*99:*/
#line 855 "cwebdir/comm-w2c.ch"
#line 854 "cwebdir/comm-w2c.ch"

void cb_show_banner(void)
{
Expand Down
6 changes: 6 additions & 0 deletions texk/web2c/cwebdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2021-02-24 Andreas Scherer <https://ascherer.github.io>

* common.w,
* ctangle.w,
* cweave.w: Fine print for single '@' characters in TeX text.

2021-02-24 Andreas Scherer <https://ascherer.github.io>

* cweave.w: Fix output format when 'tracing @2'.
Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/cwebdir/common.w
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ prepares to read the next line from |change_file|.

When a match is found, the current section is marked as changed unless
the first line after the \.{@@x} and after the \.{@@y} both start with
either |'@@*'| or |'@@ '| (possibly preceded by whitespace).
either `\.{@@*}' or `\.{@@\ }' (possibly preceded by whitespace).

This procedure is called only when |buffer<limit|, i.e., when the
current line is nonempty.
Expand Down
4 changes: 2 additions & 2 deletions texk/web2c/cwebdir/ctangle.w
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ case identifier: a=id_lookup(id_first,id_loc,0)-name_dir;
app_repl(a % 0400); break;
case section_name: if (t!=section_name) goto done;
else {
@<Was an `@@' missed here?@>@;
@<Was an `\.{@@}' missed here?@>@;
a=cur_section_name-name_dir;
app_repl((a / 0400)+0250);
app_repl(a % 0400);
Expand All @@ -1263,7 +1263,7 @@ case definition: case format_code: case begin_C: if (t!=section_name) goto done;
}
case new_section: goto done;

@ @<Was an `@@'...@>= {
@ @<Was an `\.{@@}'...@>= {
char *try_loc=loc;
while (*try_loc==' ' && try_loc<limit) try_loc++;
if (*try_loc=='+' && try_loc<limit) try_loc++;
Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/cwebdir/cweave.w
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ skip_limbo(void) {
while(true) {
if (loc>limit && get_line()==false) return;
*(limit+1)='@@';
while (*loc!='@@') loc++; /* look for '@@', then skip two chars */
while (*loc!='@@') loc++; /* look for `\.{@@}', then skip two chars */
if (loc++ <=limit) { int c=ccode[(eight_bits)*loc++];
if (c==new_section) return;
if (c==noop) skip_restricted();
Expand Down

0 comments on commit 815e4fe

Please sign in to comment.