w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

common.h File Reference
#include <ctype.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for common.h:

Go to the source code of this file.

Typedefs

typedef uint8_t eight_bits
 
typedef uint16_t sixteen_bits
 
typedef name_infoname_pointer
 
typedef name_pointerhash_pointer
 

Functions

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version February (works also with later versions) % Copyright(C) 1987
 
< Predecl...@> void check_complete (void)
 
void reset_input (void)
 
Code related to identifier and section name length ((c))) @d llink link @d rlink dummy.Rlink @d root name_dir -> rlink @< Common code...@>=typedef struct name_info
 
< Predecl...@> name_pointer id_lookup (const char *, const char *, char)
 
name_pointer section_lookup (char *, char *, int)
 
void init_node (name_pointer)
 
void init_p (name_pointer, eight_bits)
 
void print_prefix_name (name_pointer)
 
void print_section_name (name_pointer)
 
void sprint_section_name (char *, name_pointer)
 
< Predecl...@> void err_print (const char *)
 
void fatal (const char *, const char *)
 
void overflow (const char *)
 
Code related to b fflush (stdout)
 
Code related to b fwrite (a, sizeof(char), b, stdout) @d C_printf(c
 
Code related to b a fprintf (C_file, c, a) @d C_putc(c) putc(c
 
void print_stats (void)
 

Variables

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY WARRANTY
 
This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying
 
This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send comments
 
This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send suggestions
 
This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send etc to tex k tug org The next few sections contain stuff from the file common w that has to be included in both ctangle w and cweave w It appears in this file common h
 
This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send etc to tex k tug org The next few sections contain stuff from the file common w that has to be included in both ctangle w and cweave w It appears in this file common which is also included in common w to propagate possible changes from this single source consistently First comes general stuff
 
boolean program
 
int phase
 
Interface to the standard CEE library
 
char * section_text_end
 
char * id_first
 
char * id_loc
 
Code related to input routines
 
char * buffer_end
 
char * loc
 
char * limit
 
Code related to file handling
 
FILEfile []
 
FILEchange_file
 
char file_name [][max_file_name_length]
 
char change_file_name []
 
int line []
 
int change_line
 
int change_depth
 
boolean input_has_ended
 
boolean changing
 
boolean web_file_open
 
Code related to section numbers
 
boolean changed_section []
 
boolean change_pending
 
boolean print_where
 
Code related to identifier and section name storage
 
 name_info
 
char byte_mem []
 
char * byte_mem_end
 
char * byte_ptr
 
name_info name_dir []
 
name_pointer name_dir_end
 
name_pointer name_ptr
 
name_pointer hash []
 
hash_pointer hash_end
 
d mark_error history
 
Code related to command line arguments
 
char ** argv
 
char C_file_name []
 
char tex_file_name []
 
char idx_file_name []
 
char scn_file_name []
 
boolean flags []
 
Code related to output
 
Code related to b a C_file< Common code...@> FILEtex_file
 
FILEidx_file
 
FILEscn_file
 
FILEactive_file
 
The procedure that gets everything rolling
 
The following parameters were sufficient in the original
 

Typedef Documentation

◆ eight_bits

Definition at line 39 of file common.h.

◆ hash_pointer

Definition at line 151 of file common.h.

◆ name_pointer

Definition at line 150 of file common.h.

◆ sixteen_bits

Definition at line 40 of file common.h.

Function Documentation

◆ check_complete()

<Predecl...@> void check_complete ( void  )

Definition at line 942 of file cwebboot.c.

◆ err_print()

<Predecl...@> void err_print ( const char *  s)

Definition at line 1289 of file cwebboot.c.

◆ fatal()

void fatal ( const char *  s,
const char *  t 
)

Definition at line 1374 of file cwebboot.c.

◆ February()

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version February ( works also with later  versions)

◆ fflush()

Code related to b fflush ( stdout  )

◆ fprintf()

Code related to b a fprintf ( C_file  ,
c  ,
a   
)

◆ fwrite()

Code related to b fwrite ( a  ,
sizeof(char)  ,
b  ,
stdout   
)

◆ id_lookup()

<Predecl...@> name_pointer id_lookup ( const char *  first,
const char *  last,
char  t 
)

Definition at line 958 of file cwebboot.c.

◆ init_node()

void init_node ( name_pointer  node)

Definition at line 565 of file ctangleboot.c.

References text_info.

Referenced by main().

◆ init_p()

void init_p ( name_pointer  p,
eight_bits  t 
)

Definition at line 571 of file ctangleboot.c.

References p, and void.

◆ length()

Code related to identifier and section name length ( (c ) -> rlink @<Common code...@>= typedef struct name_info

◆ overflow()

void overflow ( const char *  t)

Definition at line 1385 of file cwebboot.c.

◆ print_prefix_name()

void print_prefix_name ( name_pointer  p)

Definition at line 1058 of file cwebboot.c.

◆ print_section_name()

void print_section_name ( name_pointer  p)

Definition at line 1014 of file cwebboot.c.

◆ print_stats()

void print_stats ( void  )

◆ reset_input()

void reset_input ( void  )

Definition at line 761 of file cwebboot.c.

◆ section_lookup()

name_pointer section_lookup ( char *  first,
char *  last,
int  ispref 
)

Definition at line 1150 of file cwebboot.c.

◆ sprint_section_name()

void sprint_section_name ( char *  dest,
name_pointer  p 
)

Definition at line 1035 of file cwebboot.c.

Variable Documentation

◆ active_file

FILE* active_file
extern

Definition at line 394 of file cwebboot.c.

◆ arguments

Definition at line 192 of file common.h.

◆ argv

char** argv
extern

Definition at line 9 of file config.h.

◆ buffer_end

char* buffer_end
extern

Definition at line 308 of file cwebboot.c.

◆ byte_mem

char byte_mem[]
extern

Definition at line 347 of file cwebboot.c.

◆ byte_mem_end

char* byte_mem_end
extern

Definition at line 348 of file cwebboot.c.

◆ byte_ptr

char* byte_ptr
extern

Definition at line 355 of file cwebboot.c.

◆ C_file_name

char C_file_name[]
extern

Definition at line 375 of file cwebboot.c.

◆ change_depth

int change_depth
extern

Definition at line 324 of file cwebboot.c.

◆ change_file

FILE* change_file
extern

Definition at line 317 of file cwebboot.c.

◆ change_file_name

char change_file_name[]
extern

Definition at line 320 of file cwebboot.c.

◆ change_line

int change_line
extern

Definition at line 323 of file cwebboot.c.

◆ change_pending

boolean change_pending
extern

Definition at line 340 of file cwebboot.c.

◆ changed_section

boolean changed_section[]
extern

Definition at line 339 of file cwebboot.c.

◆ changing

boolean changing
extern

Definition at line 326 of file cwebboot.c.

◆ comments

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send comments

Definition at line 21 of file common.h.

◆ copying

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying

Definition at line 14 of file common.h.

◆ file

FILE* file[]
extern

Definition at line 930 of file t4ht.c.

◆ file_name

char file_name[][max_file_name_length]
extern

Definition at line 318 of file cwebboot.c.

◆ flags

boolean flags[]
extern

Definition at line 1168 of file t4ht.c.

◆ h

Definition at line 25 of file common.h.

◆ handling

Code related to error handling

Definition at line 94 of file common.h.

◆ hash

name_pointer hash[]
extern

Definition at line 361 of file cwebboot.c.

◆ hash_end

hash_pointer hash_end
extern

Definition at line 362 of file cwebboot.c.

◆ history

d mark_error history
Initial value:
@d confusion(s) fatal("! This can't happen: ",s)
@.This can't happen@>
@<Common code...@>=
extern int history
#define s
Definition: afcover.h:80
#define d(n)
Definition: gpos-common.c:151
#define error_message
Definition: ctangleboot.c:74
#define confusion(s)
Definition: ctangleboot.c:78
void fatal(const char *, const char *)
Definition: cwebboot.c:1374

Definition at line 179 of file common.h.

◆ id_first

char* id_first
extern

Definition at line 301 of file cwebboot.c.

◆ id_loc

char* id_loc
extern

Definition at line 302 of file cwebboot.c.

◆ idx_file

FILE* idx_file
extern

Definition at line 389 of file cwebboot.c.

◆ idx_file_name

char idx_file_name[]
extern

Definition at line 377 of file cwebboot.c.

◆ input_has_ended

boolean input_has_ended
extern

Definition at line 179 of file ctie-k.c.

◆ library

Interface to the standard CEE library

Definition at line 44 of file common.h.

◆ limit

char* limit
extern

Definition at line 310 of file cwebboot.c.

◆ line

int line[]
extern

Definition at line 29 of file process_score.c.

◆ loc

char* loc
extern

Definition at line 309 of file cwebboot.c.

◆ name_dir

name_info name_dir[]
extern

Definition at line 349 of file cwebboot.c.

◆ name_dir_end

name_pointer name_dir_end
extern

Definition at line 350 of file cwebboot.c.

◆ name_info

Definition at line 149 of file common.h.

◆ name_ptr

name_pointer name_ptr
extern

Definition at line 356 of file cwebboot.c.

◆ numbers

Code related to section numbers

Definition at line 124 of file common.h.

◆ original

The following parameters were sufficient in the original
Initial value:
{WEB} to
#define TEX
Definition: pmakempx.c:132
real to[600]
Definition: pmxab.c:87

Definition at line 227 of file common.h.

◆ output

Code related to output

Definition at line 208 of file common.h.

Referenced by cl_block(), and compress().

◆ phase

int phase
extern

Definition at line 294 of file cwebboot.c.

◆ print_where

boolean print_where
extern

Definition at line 342 of file cwebboot.c.

◆ program

boolean program
extern

Definition at line 152 of file dv2dt.c.

◆ rolling

The procedure that gets everything rolling

Definition at line 222 of file common.h.

◆ routines

Code related to input routines

Definition at line 80 of file common.h.

◆ scn_file

FILE* scn_file
extern

Definition at line 391 of file cwebboot.c.

◆ scn_file_name

char scn_file_name[]
extern

Definition at line 379 of file cwebboot.c.

◆ section_text_end

char* section_text_end
extern

Definition at line 300 of file cwebboot.c.

◆ storage

Code related to identifier and section name storage

Definition at line 131 of file common.h.

◆ stuff

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send etc to tex k tug org The next few sections contain stuff from the file common w that has to be included in both ctangle w and cweave w It appears in this file common which is also included in common w to propagate possible changes from this single source consistently First comes general stuff

Definition at line 28 of file common.h.

◆ suggestions

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY express or implied Version Silvio Levy and Donald E Knuth Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one Amendments to common h resulting in this updated version were created by numerous collaborators over the course of many years Please send suggestions

Definition at line 21 of file common.h.

◆ tex_file

Code related to b a C_file<Common code...@> FILE* tex_file
extern
Initial value:
=
extern FILE *C_file
FILE * C_file
Definition: cwebboot.c:387
#define FILE
Definition: t1stdio.h:34

Definition at line 388 of file cwebboot.c.

◆ tex_file_name

char tex_file_name[]
extern

Definition at line 376 of file cwebboot.c.

◆ WARRANTY

This file is part of CWEB This program by Silvio Levy and Donald E Knuth is based on a program by Knuth It is distributed WITHOUT ANY WARRANTY

Definition at line 4 of file common.h.

◆ web_file_open

boolean web_file_open
extern

Definition at line 327 of file cwebboot.c.