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)  

ctangleboot.c 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 ctangleboot.c:

Go to the source code of this file.

Classes

struct  name_info
 
struct  text
 
struct  output_state
 

Macros

#define HAVE_GETTEXT   0
 
#define gettext(A)   A
 
#define banner
 
#define _(S)   gettext(S) \
 
#define and_and   04
 
#define lt_lt   020
 
#define gt_gt   021
 
#define plus_plus   013
 
#define minus_minus   01
 
#define minus_gt   031
 
#define non_eq   032
 
#define lt_eq   034
 
#define gt_eq   035
 
#define eq_eq   036
 
#define or_or   037
 
#define dot_dot_dot   016
 
#define colon_colon   06
 
#define period_ast   026
 
#define minus_gt_ast   027 \
 
#define xisalpha(c)   (isalpha((eight_bits) c) &&((eight_bits) c<0200) )
 
#define xisdigit(c)   (isdigit((eight_bits) c) &&((eight_bits) c<0200) )
 
#define xisspace(c)   (isspace((eight_bits) c) &&((eight_bits) c<0200) )
 
#define xislower(c)   (islower((eight_bits) c) &&((eight_bits) c<0200) )
 
#define xisupper(c)   (isupper((eight_bits) c) &&((eight_bits) c<0200) )
 
#define xisxdigit(c)   (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \
 
#define max_include_depth   10 \
 
#define max_file_name_length   1024
 
#define cur_file   file[include_depth]
 
#define cur_file_name   file_name[include_depth]
 
#define cur_line   line[include_depth]
 
#define web_file   file[0]
 
#define web_file_name   file_name[0] \
 
#define length(c)   (size_t) ((c+1) ->byte_start-(c) ->byte_start)
 
#define print_id(c)   term_write((c) ->byte_start,length((c) ) )
 
#define llink   link
 
#define rlink   dummy.Rlink
 
#define root
 
#define spotless   0
 
#define harmless_message   1
 
#define error_message   2
 
#define fatal_message   3
 
#define mark_harmless   {if(history==spotless) history= harmless_message;}
 
#define mark_error   history= error_message
 
#define confusion(s)
 
#define show_banner   flags['b']
 
#define show_progress   flags['p']
 
#define show_stats   flags['s']
 
#define show_happiness   flags['h']
 
#define temporary_output   flags['t']
 
#define make_xrefs   flags['x'] \
 
#define update_terminal   fflush(stdout)
 
#define new_line   putchar('\n')
 
#define putxchar   putchar
 
#define term_write(a, b)   fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)
 
#define C_printf(c, a)   fprintf(C_file,c,a)
 
#define C_putc(c)   putc(c,C_file) \
 
#define max_bytes   1000000 \
 
#define max_toks   1000000
 
#define max_names   10239 \
 
#define max_sections   4000
 
#define max_texts   10239
 
#define longest_name   10000
 
#define stack_size   500
 
#define buf_size   1000
 
#define long_buf_size   (buf_size+longest_name) \
 
#define equiv   equiv_or_xref \
 
#define section_flag   max_texts \
 
#define string   02
 
#define join   0177
 
#define output_defs_flag   (2*024000-1) \
 
#define cur_end   cur_state.end_field
 
#define cur_byte   cur_state.byte_field
 
#define cur_name   cur_state.name_field
 
#define cur_repl   cur_state.repl_field
 
#define cur_section   cur_state.section_field \
 
#define section_number   0201
 
#define identifier   0202 \
 
#define normal   0
 
#define num_or_id   1
 
#define post_slash   2
 
#define unbreakable   3
 
#define verbatim   4 \
 
#define max_files   256
 
#define translit_length   10 \
 
#define ignore   0
 
#define ord   0302
 
#define control_text   0303
 
#define translit_code   0304
 
#define output_defs_code   0305
 
#define format_code   0306
 
#define definition   0307
 
#define begin_C   0310
 
#define section_name   0311
 
#define new_section   0312 \
 
#define constant   03 \
 
#define isxalpha(c)   ((c) =='_'||(c) =='$') \
 
#define ishigh(c)
 
#define compress(c)   if(loc++<=limit) return c \
 
#define macro   0
 
#define app_repl(c)   {if(tok_ptr==tok_mem_end) overflow(_("token") ) ;*tok_ptr++= c;} \
 
#define max_banner   50 \
 

Typedefs

typedef Bool__ boolean
 
typedef uint8_t eight_bits
 
typedef uint16_t sixteen_bits
 
typedef struct name_info name_info
 
typedef name_infoname_pointer
 
typedef name_pointerhash_pointer
 
typedef texttext_pointer
 
typedef output_statestack_pointer
 

Enumerations

enum  cweb {
  ctangle , cweave , ctwill , ctangle ,
  cweave , ctwill , ctangle , cweave ,
  ctwill , ctangle , cweave , ctwill ,
  ctangle , cweave , ctwill , ctangle ,
  cweave , ctwill
}
 

Functions

boolean get_line (void)
 
void check_complete (void)
 
void reset_input (void)
 
boolean names_match (name_pointer, const char *, size_t, eight_bits)
 
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)
 
int wrap_up (void)
 
void err_print (const char *)
 
void fatal (const char *, const char *)
 
void overflow (const char *)
 
void common_init (void)
 
void print_stats (void)
 
void cb_show_banner (void)
 
static void store_two_bytes (sixteen_bits)
 
static void push_level (name_pointer)
 
static void pop_level (boolean)
 
static void get_output (void)
 
static void flush_buffer (void)
 
static void phase_two (void)
 
static void output_defs (void)
 
static void out_char (eight_bits)
 
static eight_bits skip_ahead (void)
 
static boolean skip_comment (boolean)
 
static eight_bits get_next (void)
 
static void scan_repl (eight_bits)
 
static void scan_section (void)
 
static void phase_one (void)
 
static void skip_limbo (void)
 
int main (int ac, char **av)
 

Variables

cweb program
 
int phase
 
char section_text []
 
char * section_text_end = section_text+ 10000
 
char * id_first
 
char * id_loc
 
char buffer []
 
char * buffer_end = buffer+ 1000 -2
 
char * loc
 
char * limit
 
int include_depth
 
FILEfile []
 
FILEchange_file
 
char file_name [][1024]
 
char change_file_name []
 
char check_file_name []
 
int line []
 
int change_line
 
int change_depth
 
boolean input_has_ended
 
boolean changing
 
boolean web_file_open = 0
 
sixteen_bits section_count
 
boolean changed_section []
 
boolean change_pending
 
boolean print_where = 0
 
char byte_mem []
 
char * byte_mem_end = byte_mem+ 1000000 -1
 
char * byte_ptr
 
name_info name_dir []
 
name_pointer name_dir_end = name_dir+ 10239 -1
 
name_pointer name_ptr
 
name_pointer hash []
 
hash_pointer hash_end = hash+ 8501 -1
 
hash_pointer h
 
int history
 
int argc
 
char ** argv
 
char C_file_name []
 
char tex_file_name []
 
char idx_file_name []
 
char scn_file_name []
 
boolean flags []
 
const char * use_language = ""
 
FILEC_file
 
FILEtex_file
 
FILEidx_file
 
FILEscn_file
 
FILEactive_file
 
FILEcheck_file
 
char cb_banner []
 
static text text_info [10239]
 
static text_pointer text_info_end = text_info+ 10239 -1
 
static text_pointer text_ptr
 
static eight_bits tok_mem [1000000]
 
static eight_bitstok_mem_end = tok_mem+ 1000000 -1
 
static eight_bitstok_ptr
 
static text_pointer last_unnamed
 
static output_state cur_state
 
static output_state stack [500+1]
 
static stack_pointer stack_end = stack+ 500
 
static stack_pointer stack_ptr
 
static int cur_val
 
static eight_bits out_state
 
static boolean protect
 
static name_pointer output_files [256]
 
static name_pointercur_out_file
 
static name_pointerend_output_files
 
static name_pointeran_output_file
 
static char cur_section_name_char
 
static char output_file_name [10000+1]
 
static boolean output_defs_seen = 0
 
static char translit [128][10]
 
static eight_bits ccode [256]
 
static boolean comment_continues = 0
 
static name_pointer cur_section_name
 
static boolean no_where
 
static text_pointer cur_text
 
static eight_bits next_control
 

Macro Definition Documentation

◆ _

#define _ (   S)    gettext(S) \

Definition at line 31 of file ctangleboot.c.

◆ and_and

#define and_and   04

Definition at line 33 of file ctangleboot.c.

◆ app_repl

#define app_repl (   c)    {if(tok_ptr==tok_mem_end) overflow(_("token") ) ;*tok_ptr++= c;} \

Definition at line 154 of file ctangleboot.c.

◆ banner

#define banner
Value:
"This is CTANGLE, Version 4.2" \
\

Definition at line 28 of file ctangleboot.c.

◆ begin_C

#define begin_C   0310

Definition at line 140 of file ctangleboot.c.

◆ buf_size

#define buf_size   1000

Definition at line 104 of file ctangleboot.c.

◆ C_printf

#define C_printf (   c,
  a 
)    fprintf(C_file,c,a)

Definition at line 92 of file ctangleboot.c.

◆ C_putc

#define C_putc (   c)    putc(c,C_file) \

Definition at line 93 of file ctangleboot.c.

◆ colon_colon

#define colon_colon   06

Definition at line 45 of file ctangleboot.c.

◆ compress

#define compress (   c)    if(loc++<=limit) return c \

Definition at line 151 of file ctangleboot.c.

◆ confusion

#define confusion (   s)
Value:
fatal(_("! This can't happen: ") ,s) \
\
#define s
Definition: afcover.h:80
void fatal(const char *, const char *)
Definition: cwebboot.c:1374
#define _(S)
Definition: ctangleboot.c:31

Definition at line 78 of file ctangleboot.c.

◆ constant

#define constant   03 \

Definition at line 144 of file ctangleboot.c.

◆ control_text

#define control_text   0303

Definition at line 135 of file ctangleboot.c.

◆ cur_byte

#define cur_byte   cur_state.byte_field

Definition at line 116 of file ctangleboot.c.

◆ cur_end

#define cur_end   cur_state.end_field

Definition at line 115 of file ctangleboot.c.

◆ cur_file

#define cur_file   file[include_depth]

Definition at line 59 of file ctangleboot.c.

◆ cur_file_name

#define cur_file_name   file_name[include_depth]

Definition at line 60 of file ctangleboot.c.

◆ cur_line

#define cur_line   line[include_depth]

Definition at line 61 of file ctangleboot.c.

◆ cur_name

#define cur_name   cur_state.name_field

Definition at line 117 of file ctangleboot.c.

◆ cur_repl

#define cur_repl   cur_state.repl_field

Definition at line 118 of file ctangleboot.c.

◆ cur_section

#define cur_section   cur_state.section_field \

Definition at line 119 of file ctangleboot.c.

◆ definition

#define definition   0307

Definition at line 139 of file ctangleboot.c.

◆ dot_dot_dot

#define dot_dot_dot   016

Definition at line 44 of file ctangleboot.c.

◆ eq_eq

#define eq_eq   036

Definition at line 42 of file ctangleboot.c.

◆ equiv

#define equiv   equiv_or_xref \

Definition at line 107 of file ctangleboot.c.

◆ error_message

#define error_message   2

Definition at line 74 of file ctangleboot.c.

◆ fatal_message

#define fatal_message   3

Definition at line 75 of file ctangleboot.c.

◆ format_code

#define format_code   0306

Definition at line 138 of file ctangleboot.c.

◆ gettext

#define gettext (   A)    A

Definition at line 14 of file ctangleboot.c.

◆ gt_eq

#define gt_eq   035

Definition at line 41 of file ctangleboot.c.

◆ gt_gt

#define gt_gt   021

Definition at line 35 of file ctangleboot.c.

◆ harmless_message

#define harmless_message   1

Definition at line 73 of file ctangleboot.c.

◆ HAVE_GETTEXT

#define HAVE_GETTEXT   0

Definition at line 8 of file ctangleboot.c.

◆ identifier

#define identifier   0202 \

Definition at line 122 of file ctangleboot.c.

◆ ignore

◆ ishigh

#define ishigh (   c)
Value:
((eight_bits) (c) > 0177) \
\
#define c(n)
Definition: gpos-common.c:150
uint8_t eight_bits
Definition: ctangleboot.c:165

Definition at line 148 of file ctangleboot.c.

◆ isxalpha

#define isxalpha (   c)    ((c) =='_'||(c) =='$') \

Definition at line 146 of file ctangleboot.c.

◆ join

#define join   0177

Definition at line 112 of file ctangleboot.c.

◆ length

◆ llink

#define llink   link

Definition at line 67 of file ctangleboot.c.

◆ long_buf_size

#define long_buf_size   (buf_size+longest_name) \

Definition at line 105 of file ctangleboot.c.

◆ longest_name

#define longest_name   10000

Definition at line 102 of file ctangleboot.c.

◆ lt_eq

#define lt_eq   034

Definition at line 40 of file ctangleboot.c.

◆ lt_lt

#define lt_lt   020

Definition at line 34 of file ctangleboot.c.

◆ macro

#define macro   0

Definition at line 153 of file ctangleboot.c.

◆ make_xrefs

#define make_xrefs   flags['x'] \

Definition at line 86 of file ctangleboot.c.

◆ mark_error

#define mark_error (   void)    history= error_message

Definition at line 77 of file ctangleboot.c.

◆ mark_harmless

#define mark_harmless   {if(history==spotless) history= harmless_message;}

Definition at line 76 of file ctangleboot.c.

◆ max_banner

#define max_banner   50 \

Definition at line 156 of file ctangleboot.c.

◆ max_bytes

#define max_bytes   1000000 \

Definition at line 95 of file ctangleboot.c.

◆ max_file_name_length

#define max_file_name_length   1024

Definition at line 58 of file ctangleboot.c.

◆ max_files

#define max_files   256

Definition at line 130 of file ctangleboot.c.

◆ max_include_depth

#define max_include_depth   10 \

Definition at line 56 of file ctangleboot.c.

◆ max_names

#define max_names   10239 \

Definition at line 98 of file ctangleboot.c.

◆ max_sections

#define max_sections   4000

Definition at line 100 of file ctangleboot.c.

◆ max_texts

#define max_texts   10239

Definition at line 101 of file ctangleboot.c.

◆ max_toks

#define max_toks   1000000

Definition at line 97 of file ctangleboot.c.

◆ minus_gt

#define minus_gt   031

Definition at line 38 of file ctangleboot.c.

◆ minus_gt_ast

#define minus_gt_ast   027 \

Definition at line 47 of file ctangleboot.c.

◆ minus_minus

#define minus_minus   01

Definition at line 37 of file ctangleboot.c.

◆ new_line

#define new_line (   void)    putchar('\n')

Definition at line 89 of file ctangleboot.c.

◆ new_section

#define new_section   0312 \

Definition at line 142 of file ctangleboot.c.

◆ non_eq

#define non_eq   032

Definition at line 39 of file ctangleboot.c.

◆ normal

#define normal (   void)    0

Definition at line 124 of file ctangleboot.c.

◆ num_or_id

#define num_or_id   1

Definition at line 125 of file ctangleboot.c.

◆ or_or

#define or_or   037

Definition at line 43 of file ctangleboot.c.

◆ ord

#define ord   0302

Definition at line 134 of file ctangleboot.c.

◆ output_defs_code

#define output_defs_code   0305

Definition at line 137 of file ctangleboot.c.

◆ output_defs_flag

#define output_defs_flag   (2*024000-1) \

Definition at line 113 of file ctangleboot.c.

◆ period_ast

#define period_ast   026

Definition at line 46 of file ctangleboot.c.

◆ plus_plus

#define plus_plus   013

Definition at line 36 of file ctangleboot.c.

◆ post_slash

#define post_slash   2

Definition at line 126 of file ctangleboot.c.

◆ print_id

#define print_id (   c)    term_write((c) ->byte_start,length((c) ) )

Definition at line 66 of file ctangleboot.c.

◆ putxchar

#define putxchar   putchar

Definition at line 90 of file ctangleboot.c.

◆ rlink

#define rlink   dummy.Rlink

Definition at line 68 of file ctangleboot.c.

◆ root

#define root
Value:
name_dir->rlink \
\
name_info name_dir[]
Definition: cwebboot.c:349

Definition at line 69 of file ctangleboot.c.

◆ section_flag

#define section_flag   max_texts \

Definition at line 109 of file ctangleboot.c.

◆ section_name

#define section_name   0311

Definition at line 141 of file ctangleboot.c.

◆ section_number

#define section_number   0201

Definition at line 121 of file ctangleboot.c.

◆ show_banner

#define show_banner   flags['b']

Definition at line 81 of file ctangleboot.c.

◆ show_happiness

#define show_happiness   flags['h']

Definition at line 84 of file ctangleboot.c.

◆ show_progress

#define show_progress   flags['p']

Definition at line 82 of file ctangleboot.c.

◆ show_stats

#define show_stats   flags['s']

Definition at line 83 of file ctangleboot.c.

◆ spotless

#define spotless   0

Definition at line 72 of file ctangleboot.c.

◆ stack_size

#define stack_size   500

Definition at line 103 of file ctangleboot.c.

◆ string

#define string   02

Definition at line 111 of file ctangleboot.c.

◆ temporary_output

#define temporary_output   flags['t']

Definition at line 85 of file ctangleboot.c.

◆ term_write

#define term_write (   a,
  b 
)    fflush(stdout) ,fwrite(a,sizeof(char) ,b,stdout)

Definition at line 91 of file ctangleboot.c.

◆ translit_code

#define translit_code   0304

Definition at line 136 of file ctangleboot.c.

◆ translit_length

#define translit_length   10 \

Definition at line 131 of file ctangleboot.c.

◆ unbreakable

#define unbreakable   3

Definition at line 127 of file ctangleboot.c.

◆ update_terminal

#define update_terminal (   void)    fflush(stdout)

Definition at line 88 of file ctangleboot.c.

◆ verbatim

#define verbatim   4 \

Definition at line 128 of file ctangleboot.c.

◆ web_file

#define web_file   file[0]

Definition at line 62 of file ctangleboot.c.

◆ web_file_name

#define web_file_name   file_name[0] \

Definition at line 63 of file ctangleboot.c.

◆ xisalpha

#define xisalpha (   c)    (isalpha((eight_bits) c) &&((eight_bits) c<0200) )

Definition at line 49 of file ctangleboot.c.

◆ xisdigit

#define xisdigit (   c)    (isdigit((eight_bits) c) &&((eight_bits) c<0200) )

Definition at line 50 of file ctangleboot.c.

◆ xislower

#define xislower (   c)    (islower((eight_bits) c) &&((eight_bits) c<0200) )

Definition at line 52 of file ctangleboot.c.

◆ xisspace

#define xisspace (   c)    (isspace((eight_bits) c) &&((eight_bits) c<0200) )

Definition at line 51 of file ctangleboot.c.

◆ xisupper

#define xisupper (   c)    (isupper((eight_bits) c) &&((eight_bits) c<0200) )

Definition at line 53 of file ctangleboot.c.

◆ xisxdigit

#define xisxdigit (   c)    (isxdigit((eight_bits) c) &&((eight_bits) c<0200) ) \

Definition at line 54 of file ctangleboot.c.

Typedef Documentation

◆ boolean

typedef Bool__ boolean

Definition at line 164 of file ctangleboot.c.

◆ eight_bits

Definition at line 165 of file ctangleboot.c.

◆ hash_pointer

Definition at line 228 of file ctangleboot.c.

◆ name_info

typedef struct name_info name_info

◆ name_pointer

Definition at line 227 of file ctangleboot.c.

◆ sixteen_bits

Definition at line 166 of file ctangleboot.c.

◆ stack_pointer

Definition at line 293 of file ctangleboot.c.

◆ text_pointer

typedef text* text_pointer

Definition at line 281 of file ctangleboot.c.

Enumeration Type Documentation

◆ cweb

enum cweb
Enumerator
ctangle 
cweave 
ctwill 
ctangle 
cweave 
ctwill 
ctangle 
cweave 
ctwill 
ctangle 
cweave 
ctwill 
ctangle 
cweave 
ctwill 
ctangle 
cweave 
ctwill 

Definition at line 167 of file ctangleboot.c.

Function Documentation

◆ cb_show_banner()

void cb_show_banner ( void  )

Definition at line 1652 of file cwebboot.c.

References _, assert(), cb_banner, printf(), textdomain, and versionstring.

Referenced by main().

◆ check_complete()

void check_complete ( void  )

Definition at line 942 of file cwebboot.c.

References _, buffer, change_buffer, change_depth, change_limit, changing, err_print(), include_depth, limit, loc, and strncpy().

Referenced by phase_one().

◆ common_init()

◆ err_print()

◆ fatal()

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

Definition at line 1374 of file cwebboot.c.

References err_print(), exit(), fatal_message, history, s, and wrap_up().

Referenced by phase_two().

◆ flush_buffer()

static void flush_buffer ( void  )
static

Definition at line 675 of file ctangleboot.c.

References C_putc, cur_line, printf(), show_progress, and update_terminal.

Referenced by out_char(), output_defs(), and phase_two().

◆ get_line()

boolean get_line ( void  )

Definition at line 807 of file cwebboot.c.

Referenced by get_next(), skip_ahead(), skip_comment(), and skip_limbo().

◆ get_next()

◆ get_output()

◆ id_lookup()

name_pointer id_lookup ( const char *  first,
const char *  last,
char  t 
)

◆ 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.

◆ main()

◆ names_match()

boolean names_match ( name_pointer  p,
const char *  first,
size_t  l,
eight_bits  t 
)

Definition at line 551 of file ctangleboot.c.

References first, cutout::l, length, p, strncmp(), and void.

◆ out_char()

◆ output_defs()

◆ overflow()

◆ phase_one()

static void phase_one ( void  )
static

Definition at line 1850 of file ctangleboot.c.

References check_complete(), input_has_ended, phase, reset_input(), scan_section(), section_count, and skip_limbo().

Referenced by main().

◆ phase_two()

◆ pop_level()

static void pop_level ( boolean  flag)
static

Definition at line 610 of file ctangleboot.c.

References cur_byte, cur_end, cur_repl, cur_state, section_flag, stack_ptr, and text_info.

Referenced by get_output(), and output_defs().

◆ print_prefix_name()

void print_prefix_name ( name_pointer  p)

Definition at line 1058 of file cwebboot.c.

References name_info::byte_start, first_chunk, cutout::l, p, prefix_length, s, and term_write.

◆ print_section_name()

void print_section_name ( name_pointer  p)

Definition at line 1014 of file cwebboot.c.

References name_info::byte_start, first_chunk, name_dir, NULL, p, q, s, and term_write.

Referenced by get_output().

◆ print_stats()

void print_stats ( void  )

◆ push_level()

static void push_level ( name_pointer  p)
static

Definition at line 591 of file ctangleboot.c.

References _, cur_byte, cur_end, cur_name, cur_repl, cur_section, cur_state, NULL, overflow(), p, stack_end, and stack_ptr.

Referenced by get_output(), and output_defs().

◆ reset_input()

◆ scan_repl()

◆ scan_section()

◆ section_lookup()

◆ skip_ahead()

static eight_bits skip_ahead ( void  )
static

Definition at line 1133 of file ctangleboot.c.

References c, ccode, get_line(), ignore, limit, loc, and new_section.

Referenced by get_next(), scan_section(), and skip_limbo().

◆ skip_comment()

static boolean skip_comment ( boolean  is_long_comment)
static

Definition at line 1150 of file ctangleboot.c.

References _, c, ccode, comment_continues, err_print(), get_line(), limit, loc, and new_section.

Referenced by get_next().

◆ skip_limbo()

◆ sprint_section_name()

void sprint_section_name ( char *  dest,
name_pointer  p 
)

Definition at line 1035 of file cwebboot.c.

References name_info::byte_start, dest, first_chunk, name_dir, p, q, s, and strncpy().

Referenced by phase_two().

◆ store_two_bytes()

static void store_two_bytes ( sixteen_bits  x)
static

Definition at line 577 of file ctangleboot.c.

References _, overflow(), tok_mem_end, tok_ptr, and cordic::x.

Referenced by get_next(), scan_repl(), and scan_section().

◆ wrap_up()

int wrap_up ( void  )

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

References EXIT_FAILURE, EXIT_SUCCESS, fatal, history, printf(), spotless, and troublesome.

Referenced by main().

Variable Documentation

◆ active_file

FILE * active_file
extern

Definition at line 394 of file cwebboot.c.

◆ an_output_file

name_pointer * an_output_file
static

Definition at line 337 of file ctangleboot.c.

Referenced by get_next(), and phase_two().

◆ argc

int argc
extern

Definition at line 1664 of file t4ht.c.

Referenced by main().

◆ argv

char** argv
extern

Definition at line 9 of file config.h.

Referenced by main().

◆ buffer

char buffer[]
extern

Definition at line 182 of file afm2pl.c.

Referenced by get_next().

◆ buffer_end

char * buffer_end = buffer+ 1000 -2
extern

Definition at line 308 of file cwebboot.c.

Referenced by get_line(), and gr_count_unicode_characters().

◆ byte_mem

char byte_mem
extern

Definition at line 347 of file cwebboot.c.

Referenced by print_stats().

◆ byte_mem_end

char * byte_mem_end = byte_mem+ 1000000 -1
extern

Definition at line 348 of file cwebboot.c.

◆ byte_ptr

char * byte_ptr
extern

Definition at line 355 of file cwebboot.c.

Referenced by _trace_mask_to_path(), and print_stats().

◆ C_file

FILE * C_file
extern

Definition at line 387 of file cwebboot.c.

Referenced by phase_two().

◆ C_file_name

char C_file_name
extern

Definition at line 375 of file cwebboot.c.

Referenced by phase_two().

◆ cb_banner

char cb_banner[]
extern

Definition at line 408 of file cwebboot.c.

Referenced by main().

◆ ccode

eight_bits ccode[256]
static

Definition at line 354 of file ctangleboot.c.

Referenced by get_next(), init_change_file(), main(), skip_ahead(), skip_comment(), and skip_limbo().

◆ change_depth

int change_depth
extern

Definition at line 324 of file cwebboot.c.

Referenced by get_next(), and scan_repl().

◆ 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.

Referenced by get_next(), and scan_repl().

◆ change_line

int change_line
extern

Definition at line 323 of file cwebboot.c.

Referenced by get_next(), and scan_repl().

◆ 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.

Referenced by get_next(), and scan_repl().

◆ check_file

FILE * check_file
extern

Definition at line 392 of file cwebboot.c.

Referenced by phase_two().

◆ check_file_name

char check_file_name
extern

Definition at line 380 of file cwebboot.c.

Referenced by phase_two().

◆ comment_continues

boolean comment_continues = 0
static

Definition at line 359 of file ctangleboot.c.

Referenced by get_next(), and skip_comment().

◆ cur_out_file

name_pointer* cur_out_file
static

Definition at line 337 of file ctangleboot.c.

Referenced by get_next(), main(), and phase_two().

◆ cur_section_name

name_pointer cur_section_name
static

Definition at line 364 of file ctangleboot.c.

Referenced by get_next(), scan_repl(), and scan_section().

◆ cur_section_name_char

char cur_section_name_char
static

Definition at line 338 of file ctangleboot.c.

Referenced by get_next().

◆ cur_state

◆ cur_text

text_pointer cur_text
static

◆ cur_val

int cur_val
static

Definition at line 325 of file ctangleboot.c.

Referenced by af_sort_and_quantize_widths(), alter_aux(), alter_box_dimen(), alter_integer(), alter_page_so_far(), alter_prev_graf(), append_discretionary(), append_glue(), append_kern(), append_penalty(), begin_box(), begin_insert_or_adjust(), box_end(), combine_the_toks(), compare_strings(), conditional(), conv_toks(), do_extension(), do_extension_pdf(), do_feedback_pdf(), do_register_command(), do_scan_extdef_del_code(), do_scan_internal(), expand(), find_font_dimen(), get_output(), get_preamble_token(), handle_mark(), init_prim(), initialize(), initialize_commands(), lua_bytecode_call(), lua_function_call(), main_control(), make_accent(), make_font_copy(), make_mark(), math_ac(), math_fraction(), math_left_right(), math_radical(), new_font(), new_hj_code(), new_hyph_exceptions(), new_hyphenation_min(), new_letterspaced_font(), new_post_exhyphen_char(), new_post_hyphen_char(), new_pre_exhyphen_char(), new_pre_hyphen_char(), new_write_whatsit(), open_or_close_in(), out_char(), output_defs(), pdf_include_chars(), prefixed_command(), primitive_(), primitive_def(), read_expand_font(), read_toks(), run_boundary(), run_box_dir(), run_box_direction(), run_char_num(), run_char_num_mmode(), run_move(), run_normal(), run_scan_dimen(), run_scan_glue(), run_scan_int(), scan_action(), scan_alt_rule(), scan_annot(), scan_ascii_num(), scan_char_num(), scan_delimiter(), scan_dimen(), scan_dimen_part(), scan_direction(), scan_eight_bit_int(), scan_expr(), scan_extdef_del_code(), scan_extdef_math_code(), scan_fifteen_bit_int(), scan_font_ident(), scan_four_bit_int(), scan_four_bit_int_or_18(), scan_full_spec(), scan_general_text(), scan_glue(), scan_int(), scan_lua_state(), scan_math(), scan_mathchar(), scan_obj(), scan_pdfdest(), scan_pdfoutline(), scan_pdfrefxform(), scan_pdfrefximage(), scan_pdfxform(), scan_pdfximage(), scan_refobj(), scan_register_num(), scan_rule_spec(), scan_something_internal(), scan_spec(), scan_thread_id(), scan_twenty_seven_bit_int(), show_whatever(), tex_def_font(), the_toks(), trap_zero_glue(), unpackage(), and vsplit().

◆ end_output_files

name_pointer * end_output_files
static

Definition at line 337 of file ctangleboot.c.

Referenced by get_next(), main(), and phase_two().

◆ file

FILE* file[]
extern

Definition at line 930 of file t4ht.c.

◆ file_name

◆ flags

boolean flags[]
extern

Definition at line 1168 of file t4ht.c.

◆ h

hash_pointer h
extern

Definition at line 9 of file dviconv.c.

◆ hash

name_pointer hash[]
extern

Definition at line 361 of file cwebboot.c.

◆ hash_end

hash_pointer hash_end = hash+ 8501 -1
extern

Definition at line 362 of file cwebboot.c.

◆ history

int history
extern

Definition at line 368 of file cwebboot.c.

◆ id_first

char * id_first
extern

Definition at line 301 of file cwebboot.c.

Referenced by get_next(), scan_repl(), and scan_section().

◆ id_loc

char * id_loc
extern

Definition at line 302 of file cwebboot.c.

Referenced by get_next(), scan_repl(), and scan_section().

◆ 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.

◆ include_depth

int include_depth
extern

Definition at line 315 of file cwebboot.c.

Referenced by get_next(), and scan_repl().

◆ input_has_ended

boolean input_has_ended
extern

Definition at line 325 of file cwebboot.c.

Referenced by phase_one().

◆ last_unnamed

text_pointer last_unnamed
static

Definition at line 311 of file ctangleboot.c.

Referenced by main(), and scan_section().

◆ limit

char* limit
extern

Definition at line 310 of file cwebboot.c.

Referenced by get_next(), scan_repl(), skip_ahead(), skip_comment(), and skip_limbo().

◆ 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.

Referenced by get_next(), scan_repl(), scan_section(), skip_ahead(), skip_comment(), and skip_limbo().

◆ name_dir

◆ name_dir_end

name_pointer name_dir_end = name_dir+ 10239 -1
extern

Definition at line 350 of file cwebboot.c.

◆ name_ptr

name_pointer name_ptr
extern

Definition at line 356 of file cwebboot.c.

Referenced by print_stats().

◆ next_control

eight_bits next_control
static

Definition at line 371 of file ctangleboot.c.

Referenced by scan_repl(), and scan_section().

◆ no_where

boolean no_where
static

Definition at line 365 of file ctangleboot.c.

Referenced by get_next(), and scan_section().

◆ out_state

eight_bits out_state
static

Definition at line 330 of file ctangleboot.c.

Referenced by get_output(), out_char(), and output_defs().

◆ output_defs_seen

boolean output_defs_seen = 0
static

Definition at line 344 of file ctangleboot.c.

Referenced by phase_two(), and scan_repl().

◆ output_file_name

char output_file_name[10000+1]
static

◆ output_files

name_pointer output_files[256]
static

Definition at line 336 of file ctangleboot.c.

Referenced by get_next(), and main().

◆ phase

int phase
extern

Definition at line 294 of file cwebboot.c.

Referenced by phase_one().

◆ print_where

boolean print_where = 0
extern

Definition at line 342 of file cwebboot.c.

Referenced by get_next(), and scan_section().

◆ program

cweb program
extern

Definition at line 152 of file dv2dt.c.

Referenced by main().

◆ protect

boolean protect
static

Definition at line 331 of file ctangleboot.c.

Referenced by out_char(), and output_defs().

◆ 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_count

sixteen_bits section_count
extern

Definition at line 338 of file cwebboot.c.

Referenced by phase_one(), and scan_section().

◆ section_text

char section_text
extern

Definition at line 299 of file cwebboot.c.

Referenced by get_next(), and main().

◆ section_text_end

char * section_text_end = section_text+ 10000
extern

Definition at line 300 of file cwebboot.c.

Referenced by get_next().

◆ stack

output_state stack[500+1]
static

Definition at line 318 of file ctangleboot.c.

◆ stack_end

stack_pointer stack_end = stack+ 500
static

Definition at line 319 of file ctangleboot.c.

Referenced by push_level().

◆ stack_ptr

stack_pointer stack_ptr
static

Definition at line 320 of file ctangleboot.c.

Referenced by get_output(), phase_two(), pop_level(), and push_level().

◆ tex_file

FILE * tex_file
extern

Definition at line 388 of file cwebboot.c.

◆ tex_file_name

char tex_file_name
extern

Definition at line 376 of file cwebboot.c.

◆ text_info

text text_info[10239]
static

◆ text_info_end

text_pointer text_info_end = text_info+ 10239 -1
static

Definition at line 302 of file ctangleboot.c.

Referenced by scan_repl().

◆ text_ptr

◆ tok_mem

eight_bits tok_mem[1000000]
static

Definition at line 304 of file ctangleboot.c.

Referenced by main(), and print_stats().

◆ tok_mem_end

eight_bits* tok_mem_end = tok_mem+ 1000000 -1
static

Definition at line 305 of file ctangleboot.c.

Referenced by store_two_bytes().

◆ tok_ptr

eight_bits* tok_ptr
static

Definition at line 306 of file ctangleboot.c.

Referenced by main(), print_stats(), scan_repl(), and store_two_bytes().

◆ translit

char translit[128][10]
static

◆ use_language

const char * use_language = ""
extern

Definition at line 402 of file cwebboot.c.

◆ web_file_open

boolean web_file_open = 0
extern

Definition at line 327 of file cwebboot.c.

Referenced by phase_two().