Skip to content

Commit

Permalink
Default output of \tracingmacros as in pdftex; texconfig.trace_extra_…
Browse files Browse the repository at this point in the history
…newline adds a newline in \tracingmacros as before (H.Hagen).

git-svn-id: svn://tug.org/texlive/trunk/Build/source@70262 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
luigiScarso committed Feb 29, 2024
1 parent 613ddcd commit d49a974
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 8 deletions.
4 changes: 4 additions & 0 deletions texk/web2c/luatexdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-02-29 Luigi Scarso <luigi.scarso@gmail.com>
* Default output of \tracingmacros as in pdftex; texconfig.trace_extra_newline adds a newline in \tracingmacros as before (H.Hagen).


2024-02-20 Luigi Scarso <luigi.scarso@gmail.com>
* in kpse mode, --shell-escape enable the standard lfs.* and os.* functions otherwise protected
* fixed lfs.mkdirp return value
Expand Down
3 changes: 3 additions & 0 deletions texk/web2c/luatexdir/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ LuaTeX 1.18.0 2024-02-13
- With --safer, all debug functions except traceback are nil
- New commandline switch --[no-]check-dvi-total-pages exit when DVI exceeds 65535 pages (default: check).
This breaks backward compatibility.
- texconfig.trace_extra_newline adds a newline in \tracingmacros. Default is false, so the
output match pdftex. Previously an extra newline was added and
with texconfig.trace_extra_newline=true it is again inserted as before.
- Some fixes, among others:
* setgentounicode has a glyph_unicode_tree not NULL (thanks M. Chernoff)
* Character index within the limits in defining a Type 3 font (H.Hagen). Thanks M. Chernoff.
Expand Down
3 changes: 3 additions & 0 deletions texk/web2c/luatexdir/lua/luainit.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ void lua_initialize(int ac, char **av)
haltonerrorp = false;
haltingonerrorp = false;
tracefilenames = 1;
traceextranewline = 0;
dump_name = NULL;
/*tex
In the next option 0 means ``disable Synchronize TeXnology''. The
Expand Down Expand Up @@ -1166,6 +1167,8 @@ void lua_initialize(int ac, char **av)
get_lua_boolean("texconfig", "check_dvi_total_pages", &check_dvi_total_pages);
/*tex |prohibit_file_trace| (boolean) */
get_lua_boolean("texconfig", "trace_file_names", &tracefilenames);
/*tex |trace_extra_newline| (boolean) */
get_lua_boolean("texconfig", "trace_extra_newline", &traceextranewline);
/*tex |file_line_error| */
get_lua_boolean("texconfig", "file_line_error", &filelineerrorstylep);
/*tex |halt_on_error| */
Expand Down
2 changes: 1 addition & 1 deletion texk/web2c/luatexdir/luatex_svnversion.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef luatex_svn_revision_h
#define luatex_svn_revision_h
#define luatex_svn_revision 7608
#define luatex_svn_revision 7611
#endif
3 changes: 2 additions & 1 deletion texk/web2c/luatexdir/tex/expand.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,9 @@ void macro_call(void)
if (tracing_macros_par > 0) {
/*tex Show the text of the macro being expanded. */
begin_diagnostic();
if (traceextranewline==false)
print_ln(); /* also see newlines in print_input_level */
print_input_level();
// print_ln();
print_cs(warning_index);
token_show(ref_count);
end_diagnostic(false);
Expand Down
5 changes: 5 additions & 0 deletions texk/web2c/luatexdir/tex/mainbody.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ boolean luainit;

boolean tracefilenames;

/*tex Extra line in tracingmacros? */

boolean traceextranewline;


/*tex
This program has two important variations: (1) There is a long and slow version
Expand Down
5 changes: 3 additions & 2 deletions texk/web2c/luatexdir/tex/mainbody.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ names in this program because they are used with a special meaning.
# define carriage_return '\r' /* ASCII code used at end of line */

/* Global variables */
extern boolean luainit; /* are we using lua for initializations */
extern boolean tracefilenames; /* print file open-close info? */
extern boolean luainit; /* are we using lua for initializations */
extern boolean tracefilenames; /* print file open-close info? */
extern boolean traceextranewline; /* extra line in tracingmacros? */


extern boolean ini_version; /* are we \.{INITEX}? */
Expand Down
13 changes: 9 additions & 4 deletions texk/web2c/luatexdir/tex/printing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,7 @@ void end_diagnostic(boolean blank_line)
/*
Indentation (based on a suggestion by PO on tex-implementors but adapted to
out situation and with built-in limits and so.
It's possible to add an extra newline with texconfig.trace_extra_newline = 1
*/

void print_input_level(void)
Expand All @@ -1330,10 +1331,12 @@ void print_input_level(void)
tprint_nl(s);
free(s);
} else {
print_ln();
if (traceextranewline)
print_ln();
}
} else {
print_ln();
if (traceextranewline)
print_ln();
}
} else {
int m = level_max;
Expand All @@ -1346,14 +1349,16 @@ void print_input_level(void)
print(']');
l = l % m;
} else {
print_ln();
if (traceextranewline)
print_ln();
}
while (l > 0) {
print(c);
l--;
}
} else {
print_ln();
if (traceextranewline)
print_ln();
}
}
}
Expand Down

0 comments on commit d49a974

Please sign in to comment.