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)  

tie.c File Reference
#include <stdio.h>
#include <malloc.h>
Include dependency graph for tie.c:

Go to the source code of this file.

Classes

struct  _idsc
 

Macros

#define banner   "This is TIE, CWEB Version 2.4."
 
#define copyright
 
#define incr(v)   v+= 1
 
#define decr(v)   v-= 1
 
#define loop   while(1)
 
#define do_nothing
 
#define false   0
 
#define true   1
 
#define spotless   0
 
#define troublesome   1
 
#define fatal   2 \
 
#define first_text_char   0
 
#define last_text_char   255 \
 
#define map_xchr(c)   (text_char)(c) \
 
#define map_xord(c)
 
#define tab_mark   9
 
#define nl_mark   10
 
#define form_feed
 
#define term_out   stdout
 
#define print(a)   fprintf(term_out,a)
 
#define print2(a, b)   fprintf(term_out,a,b)
 
#define print3(a, b, c)   fprintf(term_out,a,b,c)
 
#define print_c(v)   fputc(v,term_out);
 
#define new_line(v)   fputc('\n',v)
 
#define term_new_line   new_line(term_out) \
 
#define print_ln(v)   {fprintf(term_out,v);term_new_line;} \
 
#define print2_ln(a, b)   {print2(a,b);term_new_line;}
 
#define print3_ln(a, b, c)   {print3(a,b,c);term_new_line;} \
 
#define print_nl(v)   {term_new_line;print(v);} \
 
#define print2_nl(a, b)
 
#define update_terminal
 
#define error_loc(m)   err_loc(m);history= troublesome;}
 
#define err_print(m)   {print_nl(m);error_loc \
 
#define fatal_error(m)
 
#define jump_out()
 
#define none   (max_file_index+1) \
 
#define buf_size   512
 
#define max_file_index   9
 
#define max_ASCII   (126+1)
 
#define search   0
 
#define test   1
 
#define reading   2
 
#define ignore   3
 
#define unknown   0
 
#define master   1
 
#define chf   2
 
#define normal   0
 
#define pre   1
 
#define post   2
 

Typedefs

typedef int boolean
 
typedef char * string
 
typedef unsigned char ASCII_Code
 
typedef unsigned char text_char
 
typedef FILEtext_file
 
typedef int in_file_modes
 
typedef int file_types
 
typedef int out_md_type
 
typedef int buffer_index
 
typedef int file_index
 
typedef struct _idsc input_description
 

Functions

void err_loc (int i)
 
void get_line (file_index i)
 
boolean lines_dont_match (file_index i, file_index j)
 
void init_change_file (file_index i, boolean b)
 
void put_line (file_index j)
 
boolean e_of_ch_module (file_index i)
 
boolean e_of_ch_preamble (file_index i)
 
void usage ()
 
 main (int argc, string *argv)
 

Variables

static int history = 0
 
static ASCII_Code xord [255+1]
 
static text_char xchr [(126+1)+1]
 
static file_index actual_input
 
static file_index test_input
 
static file_index no_ch
 
static file_types prod_chf = 0
 
static out_md_type out_mode
 
static input_descriptioninput_organization [9+1]
 
static boolean input_has_ended = 0
 
static text_file out_file
 
static string out_name
 

Macro Definition Documentation

◆ banner

#define banner   "This is TIE, CWEB Version 2.4."

Definition at line 1 of file tie.c.

◆ buf_size

#define buf_size   512

Definition at line 94 of file tie.c.

◆ chf

#define chf   2

Definition at line 135 of file tie.c.

◆ copyright

#define copyright
Value:
"Copyright (c) 1989,1992 by THD/ITI. All rights reserved." \
\

Definition at line 2 of file tie.c.

◆ decr

#define decr (   v)    v-= 1

Definition at line 7 of file tie.c.

◆ do_nothing

#define do_nothing (   void)

Definition at line 9 of file tie.c.

◆ err_print

#define err_print (   m)    {print_nl(m);error_loc \

Definition at line 54 of file tie.c.

◆ error_loc

#define error_loc (   m)    err_loc(m);history= troublesome;}

Definition at line 53 of file tie.c.

◆ false

#define false   0

Definition at line 10 of file tie.c.

◆ fatal

#define fatal   2 \

Definition at line 14 of file tie.c.

◆ fatal_error

#define fatal_error (   m)
Value:
{ \
print(m);print_c('.');history= fatal; \
term_new_line;jump_out(); \
} \
\
#define print_c(v)
Definition: tie.c:33
static int history
Definition: tie.c:175
#define jump_out()
Definition: tie.c:62
#define fatal
Definition: tie.c:14
m
Definition: tex4ht.c:3990

Definition at line 56 of file tie.c.

◆ first_text_char

#define first_text_char   0

Definition at line 16 of file tie.c.

◆ form_feed

#define form_feed
Value:
12 \
\

Definition at line 26 of file tie.c.

◆ ignore

#define ignore (   void)    3

Definition at line 131 of file tie.c.

◆ incr

#define incr (   v)    v+= 1

Definition at line 6 of file tie.c.

◆ jump_out

#define jump_out (   void)
Value:
exit(1) \
\
\
\
\
void exit()

Definition at line 62 of file tie.c.

◆ last_text_char

#define last_text_char   255 \

Definition at line 17 of file tie.c.

◆ loop

#define loop   while(1)

Definition at line 8 of file tie.c.

◆ map_xchr

#define map_xchr (   c)    (text_char)(c) \

Definition at line 19 of file tie.c.

◆ map_xord

#define map_xord (   c)
Value:
\
#define c(n)
Definition: gpos-common.c:150
unsigned char ASCII_Code
Definition: tie.c:114

Definition at line 21 of file tie.c.

◆ master

#define master   1

Definition at line 134 of file tie.c.

◆ max_ASCII

#define max_ASCII   (126+1)

Definition at line 113 of file tie.c.

◆ max_file_index

#define max_file_index   9

Definition at line 95 of file tie.c.

◆ new_line

#define new_line (   v)    fputc('\n',v)

Definition at line 34 of file tie.c.

◆ nl_mark

#define nl_mark   10

Definition at line 25 of file tie.c.

◆ none

#define none   (max_file_index+1) \

Definition at line 68 of file tie.c.

◆ normal

#define normal (   void)    0

Definition at line 142 of file tie.c.

◆ post

◆ pre

#define pre   1

Definition at line 143 of file tie.c.

◆ print

#define print (   a)    fprintf(term_out,a)

Definition at line 30 of file tie.c.

◆ print2

#define print2 (   a,
  b 
)    fprintf(term_out,a,b)

Definition at line 31 of file tie.c.

◆ print2_ln

#define print2_ln (   a,
  b 
)    {print2(a,b);term_new_line;}

Definition at line 39 of file tie.c.

◆ print2_nl

#define print2_nl (   a,
  b 
)
Value:
\
#define b
Definition: jpegint.h:372
#define a(n)
Definition: gpos-common.c:148
#define print2(a, b)
Definition: tie.c:31
#define term_new_line
Definition: tie.c:35

Definition at line 44 of file tie.c.

◆ print3

#define print3 (   a,
  b,
  c 
)    fprintf(term_out,a,b,c)

Definition at line 32 of file tie.c.

◆ print3_ln

#define print3_ln (   a,
  b,
  c 
)    {print3(a,b,c);term_new_line;} \

Definition at line 40 of file tie.c.

◆ print_c

#define print_c (   v)    fputc(v,term_out);

Definition at line 33 of file tie.c.

◆ print_ln

#define print_ln (   v)    {fprintf(term_out,v);term_new_line;} \

Definition at line 37 of file tie.c.

◆ print_nl

#define print_nl (   v)    {term_new_line;print(v);} \

Definition at line 42 of file tie.c.

◆ reading

#define reading   2

Definition at line 130 of file tie.c.

◆ search

#define search   0

Definition at line 128 of file tie.c.

◆ spotless

#define spotless   0

Definition at line 12 of file tie.c.

◆ tab_mark

#define tab_mark   9

Definition at line 24 of file tie.c.

◆ term_new_line

#define term_new_line   new_line(term_out) \

Definition at line 35 of file tie.c.

◆ term_out

#define term_out   stdout

Definition at line 29 of file tie.c.

◆ test

#define test   1

Definition at line 129 of file tie.c.

◆ troublesome

#define troublesome   1

Definition at line 13 of file tie.c.

◆ true

#define true   1

Definition at line 11 of file tie.c.

◆ unknown

#define unknown   0

Definition at line 133 of file tie.c.

◆ update_terminal

#define update_terminal (   void)
Value:
\
\
\
\
#define fflush
Definition: xxstdio.h:24
#define term_out
Definition: tie.c:29

Definition at line 47 of file tie.c.

Typedef Documentation

◆ ASCII_Code

typedef unsigned char ASCII_Code

Definition at line 114 of file tie.c.

◆ boolean

typedef int boolean

Definition at line 106 of file tie.c.

◆ buffer_index

typedef int buffer_index

Definition at line 151 of file tie.c.

◆ file_index

typedef int file_index

Definition at line 152 of file tie.c.

◆ file_types

typedef int file_types

Definition at line 136 of file tie.c.

◆ in_file_modes

typedef int in_file_modes

Definition at line 132 of file tie.c.

◆ input_description

typedef struct _idsc input_description

◆ out_md_type

typedef int out_md_type

Definition at line 145 of file tie.c.

◆ string

typedef char* string

Definition at line 107 of file tie.c.

◆ text_char

typedef unsigned char text_char

Definition at line 121 of file tie.c.

◆ text_file

typedef FILE* text_file

Definition at line 122 of file tie.c.

Function Documentation

◆ e_of_ch_module()

boolean e_of_ch_module ( file_index  i)

Definition at line 413 of file tie.c.

References _idsc::buffer, i, input_organization, _idsc::limit, name_of_file, print2, print_nl, and term_new_line.

Referenced by main().

◆ e_of_ch_preamble()

boolean e_of_ch_preamble ( file_index  i)

Definition at line 432 of file tie.c.

References _idsc::buffer, i, input_organization, and _idsc::limit.

Referenced by main().

◆ err_loc()

void err_loc ( int  i)

Definition at line 224 of file tie.c.

References i, input_organization, name_of_file, and print3_ln.

Referenced by main().

◆ get_line()

◆ init_change_file()

void init_change_file ( file_index  i,
boolean  b 
)

Definition at line 351 of file tie.c.

References b, _idsc::buffer, c, err_print, get_line(), i, ignore, input_organization, _idsc::limit, loop, and _idsc::mode.

Referenced by main().

◆ lines_dont_match()

boolean lines_dont_match ( file_index  i,
file_index  j 
)

Definition at line 334 of file tie.c.

References i, input_organization, j, k, limit, and _idsc::limit.

Referenced by main().

◆ main()

◆ put_line()

void put_line ( file_index  j)

Definition at line 398 of file tie.c.

References _idsc::buffer, i, input_organization, j, _idsc::limit, map_xchr, new_line, out_file, and p.

Referenced by main().

◆ usage()

void usage ( void  uerr)

Definition at line 445 of file tie.c.

References jump_out, print, and term_new_line.

Referenced by main().

Variable Documentation

◆ actual_input

file_index actual_input
static

Definition at line 191 of file tie.c.

Referenced by main().

◆ history

int history = 0
static

Definition at line 175 of file tie.c.

Referenced by main().

◆ input_has_ended

boolean input_has_ended = 0
static

Definition at line 208 of file tie.c.

Referenced by get_line(), and main().

◆ input_organization

input_description* input_organization[9+1]
static

◆ no_ch

file_index no_ch
static

Definition at line 191 of file tie.c.

Referenced by main().

◆ out_file

text_file out_file
static

Definition at line 214 of file tie.c.

Referenced by main(), and put_line().

◆ out_mode

out_md_type out_mode
static

Definition at line 193 of file tie.c.

Referenced by main().

◆ out_name

string out_name
static

Definition at line 215 of file tie.c.

Referenced by main().

◆ prod_chf

file_types prod_chf = 0
static

Definition at line 192 of file tie.c.

Referenced by main().

◆ test_input

file_index test_input
static

Definition at line 191 of file tie.c.

Referenced by main().

◆ xchr

text_char xchr[(126+1)+1]
static

Definition at line 184 of file tie.c.

Referenced by main().

◆ xord

ASCII_Code xord[255+1]
static

Definition at line 182 of file tie.c.

Referenced by main().