Skip to content

Commit

Permalink
[CWEB] Move 'print_stats' prototype in common.h.
Browse files Browse the repository at this point in the history
It is used in 'wrap_up'.

Also, add a comment for 'cb_show_banner'.

git-svn-id: svn://tug.org/texlive/trunk/Build/source@67906 c570f23f-e606-0410-a88d-b1316a301751
  • Loading branch information
Andreas Scherer committed Aug 13, 2023
1 parent 8c40e20 commit e852a4b
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 66 deletions.
37 changes: 19 additions & 18 deletions texk/web2c/ctangleboot.cin
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#line 66 "cwebdir/ctangle.w"

/*5:*/
#line 60 "cwebdir/comm-w2c.h"
#line 57 "cwebdir/comm-w2c.h"

#include <ctype.h>
#include <kpathsea/simpletypes.h>
Expand All @@ -15,15 +15,15 @@
#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
#endif
#line 72 "cwebdir/comm-w2c.h"
#line 69 "cwebdir/comm-w2c.h"

#if HAVE_GETTEXT
#include <libintl.h>
#else
#line 76 "cwebdir/comm-w2c.h"
#line 73 "cwebdir/comm-w2c.h"
#define gettext(a) a
#endif
#line 78 "cwebdir/comm-w2c.h"
#line 75 "cwebdir/comm-w2c.h"

/*:5*/
#line 67 "cwebdir/ctangle.w"
Expand Down Expand Up @@ -188,23 +188,23 @@ extern cweb program;
extern int phase;

/*:3*//*6:*/
#line 100 "cwebdir/comm-w2c.h"
#line 97 "cwebdir/comm-w2c.h"

extern char section_text[];
extern char*section_text_end;
extern char*id_first;
extern char*id_loc;

/*:6*//*7:*/
#line 118 "cwebdir/comm-w2c.h"
#line 115 "cwebdir/comm-w2c.h"

extern char buffer[];
extern char*buffer_end;
extern char*loc;
extern char*limit;

/*:7*//*8:*/
#line 135 "cwebdir/comm-w2c.h"
#line 132 "cwebdir/comm-w2c.h"

extern int include_depth;
extern FILE*file[];
Expand All @@ -221,15 +221,15 @@ extern boolean changing;
extern boolean web_file_open;

/*:8*//*10:*/
#line 156 "cwebdir/comm-w2c.h"
#line 153 "cwebdir/comm-w2c.h"

extern sixteen_bits section_count;
extern boolean changed_section[];
extern boolean change_pending;
extern boolean print_where;

/*:10*//*11:*/
#line 171 "cwebdir/comm-w2c.h"
#line 168 "cwebdir/comm-w2c.h"

typedef struct name_info{
char*byte_start;
Expand All @@ -254,12 +254,12 @@ extern hash_pointer hash_end;
extern hash_pointer h;

/*:11*//*13:*/
#line 216 "cwebdir/comm-w2c.h"
#line 213 "cwebdir/comm-w2c.h"

extern int history;

/*:13*//*15:*/
#line 233 "cwebdir/comm-w2c.h"
#line 234 "cwebdir/comm-w2c.h"

extern int argc;
extern char**argv;
Expand All @@ -272,7 +272,7 @@ extern boolean flags[];
extern const char*use_language;

/*:15*//*16:*/
#line 249 "cwebdir/comm-w2c.h"
#line 250 "cwebdir/comm-w2c.h"

extern FILE*C_file;
extern FILE*tex_file;
Expand Down Expand Up @@ -393,19 +393,16 @@ static eight_bits next_control;
#line 43 "cwebdir/comm-w2c.h"

extern void common_init(void);
extern void cb_show_banner(void);

extern void print_stats(void);

/*:4*//*9:*/
#line 150 "cwebdir/comm-w2c.h"
#line 147 "cwebdir/comm-w2c.h"

extern boolean get_line(void);
extern void check_complete(void);
extern void reset_input(void);

/*:9*//*12:*/
#line 194 "cwebdir/comm-w2c.h"
#line 191 "cwebdir/comm-w2c.h"

extern name_pointer id_lookup(const char*,const char*,eight_bits);

Expand All @@ -419,13 +416,17 @@ extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
extern void init_node(name_pointer);

/*:12*//*14:*/
#line 219 "cwebdir/comm-w2c.h"
#line 216 "cwebdir/comm-w2c.h"

extern int wrap_up(void);
extern void err_print(const char*);
extern void fatal(const char*,const char*);
extern void overflow(const char*);

extern void cb_show_banner(void);

extern void print_stats(void);

/*:14*//*30:*/
#line 242 "cwebdir/ctangle.w"
static void store_two_bytes(sixteen_bits);
Expand Down
37 changes: 19 additions & 18 deletions texk/web2c/cwebboot.cin
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#line 62 "cwebdir/common.w"

/*4:*/
#line 60 "cwebdir/comm-w2c.h"
#line 57 "cwebdir/comm-w2c.h"

#include <ctype.h>
#include <kpathsea/simpletypes.h>
Expand All @@ -15,15 +15,15 @@
#ifndef HAVE_GETTEXT
#define HAVE_GETTEXT 0
#endif
#line 72 "cwebdir/comm-w2c.h"
#line 69 "cwebdir/comm-w2c.h"

#if HAVE_GETTEXT
#include <libintl.h>
#else
#line 76 "cwebdir/comm-w2c.h"
#line 73 "cwebdir/comm-w2c.h"
#define gettext(a) a
#endif
#line 78 "cwebdir/comm-w2c.h"
#line 75 "cwebdir/comm-w2c.h"

/*:4*//*91:*/
#line 738 "cwebdir/comm-w2c.ch"
Expand Down Expand Up @@ -190,23 +190,23 @@ extern cweb program;
extern int phase;

/*:2*//*5:*/
#line 100 "cwebdir/comm-w2c.h"
#line 97 "cwebdir/comm-w2c.h"

extern char section_text[];
extern char*section_text_end;
extern char*id_first;
extern char*id_loc;

/*:5*//*6:*/
#line 118 "cwebdir/comm-w2c.h"
#line 115 "cwebdir/comm-w2c.h"

extern char buffer[];
extern char*buffer_end;
extern char*loc;
extern char*limit;

/*:6*//*7:*/
#line 135 "cwebdir/comm-w2c.h"
#line 132 "cwebdir/comm-w2c.h"

extern int include_depth;
extern FILE*file[];
Expand All @@ -223,15 +223,15 @@ extern boolean changing;
extern boolean web_file_open;

/*:7*//*9:*/
#line 156 "cwebdir/comm-w2c.h"
#line 153 "cwebdir/comm-w2c.h"

extern sixteen_bits section_count;
extern boolean changed_section[];
extern boolean change_pending;
extern boolean print_where;

/*:9*//*10:*/
#line 171 "cwebdir/comm-w2c.h"
#line 168 "cwebdir/comm-w2c.h"

typedef struct name_info{
char*byte_start;
Expand All @@ -256,12 +256,12 @@ extern hash_pointer hash_end;
extern hash_pointer h;

/*:10*//*12:*/
#line 216 "cwebdir/comm-w2c.h"
#line 213 "cwebdir/comm-w2c.h"

extern int history;

/*:12*//*14:*/
#line 233 "cwebdir/comm-w2c.h"
#line 234 "cwebdir/comm-w2c.h"

extern int argc;
extern char**argv;
Expand All @@ -274,7 +274,7 @@ extern boolean flags[];
extern const char*use_language;

/*:14*//*15:*/
#line 249 "cwebdir/comm-w2c.h"
#line 250 "cwebdir/comm-w2c.h"

extern FILE*C_file;
extern FILE*tex_file;
Expand Down Expand Up @@ -425,19 +425,16 @@ string texmf_locale;
#line 43 "cwebdir/comm-w2c.h"

extern void common_init(void);
extern void cb_show_banner(void);

extern void print_stats(void);

/*:3*//*8:*/
#line 150 "cwebdir/comm-w2c.h"
#line 147 "cwebdir/comm-w2c.h"

extern boolean get_line(void);
extern void check_complete(void);
extern void reset_input(void);

/*:8*//*11:*/
#line 194 "cwebdir/comm-w2c.h"
#line 191 "cwebdir/comm-w2c.h"

extern name_pointer id_lookup(const char*,const char*,eight_bits);

Expand All @@ -451,13 +448,17 @@ extern boolean names_match(name_pointer,const char*,size_t,eight_bits);
extern void init_node(name_pointer);

/*:11*//*13:*/
#line 219 "cwebdir/comm-w2c.h"
#line 216 "cwebdir/comm-w2c.h"

extern int wrap_up(void);
extern void err_print(const char*);
extern void fatal(const char*,const char*);
extern void overflow(const char*);

extern void cb_show_banner(void);

extern void print_stats(void);

/*:13*//*24:*/
#line 176 "cwebdir/common.w"
static boolean input_ln(FILE*);
Expand Down
7 changes: 7 additions & 0 deletions texk/web2c/cwebdir/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2023-08-13 Andreas Scherer <https://ascherer.github.io>

* comm-w2c.h,
* common.c,
* common.h,
* ctangle.c: Move 'print_stats' prototype in common.h.

2023-08-11 Andreas Scherer <https://ascherer.github.io>

* ctwill-mini.ch,
Expand Down
7 changes: 4 additions & 3 deletions texk/web2c/cwebdir/comm-w2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ extern int phase; /* which phase are we in? */
@ The procedure that gets everything rolling:
@<Predecl...@>=
extern void common_init(void);@/
extern void cb_show_banner(void);
@#
extern void print_stats(void); /* defined in \.{ctangle.w} and \.{cweave.w} */

@ You may have noticed that almost all \.{"strings"} in the \.{CWEB} sources
are placed in the context of the `|_|'~macro. This is just a shortcut for the
Expand Down Expand Up @@ -221,6 +218,10 @@ extern int wrap_up(void); /* indicate |history| and exit */
extern void err_print(const char *); /* print error message and context */
extern void fatal(const char *,const char *); /* issue error message and die */
extern void overflow(const char *); /* succumb because a table has overflowed */
@#
extern void cb_show_banner(void); /* copy |banner| back to \.{common.w} */
@#
extern void print_stats(void); /* defined in \.{ctangle.w} and \.{cweave.w} */

@ Code related to command line arguments:
@d show_banner flags['b'] /* should the banner line be printed? */
Expand Down
Loading

0 comments on commit e852a4b

Please sign in to comment.