TeX in C
Explore TeX with modern c compiler.
str.c 文件参考
#include <string.h>
#include "error.h"
#include "hash.h"
#include "print.h"
#include "io.h"
#include "str_pool_init.h"
#include "dump.h"
#include "str.h"
str.c 的引用(Include)关系图:

宏定义

#define str_end(x)   (str_start[(x) + 1])
 

函数

int str_length (StrNumber x)
 [#40]: the number of characters in string number x. 更多...
 
int cur_length ()
 [#41]: The length of the current string. 更多...
 
void append_char (ASCIICode s)
 [#42]: put ASCII code s at the end of str_pool. 更多...
 
void flush_char (void)
 [#42]: forget the last character in the pool. 更多...
 
void str_room (StrNumber l)
 [#42]: make sure that the pool hasn’t overflowed. 更多...
 
StrNumber makestring (void)
 [#43]: current string enters the pool. 更多...
 
void flush_string (void)
 [#44]: destroy the most recently made string. 更多...
 
int str_cmp (StrNumber s, StrNumber t)
 比较两个 str 的差别。返回 0 为相同,非 0 为有差异。 更多...
 
Boolean str_eq_str (StrNumber s, StrNumber t)
 [p21#46]: test equality of strings。 更多...
 
Boolean get_strings_started (void)
 [#47]: initializes the string pool, but returns false if something goes wrong. 更多...
 
static void app_lc_hex (UChar l)
 [#48] int to hex 更多...
 
Boolean str_pool_init (void)
 [p21#47] Make the first 256 strings, and copy all string in pool_strs[] to string pool. 更多...
 
void slow_print (StrNumber s)
 #60: prints string s 更多...
 
void printcurrentstring (void)
 [#70] prints a yet-unmade string. 更多...
 
int str_getc (StrNumber s, int k)
 
void str_set_init_ptrs (void)
 
StrPoolPtr str_mark (void)
 
void str_map_from_mark (StrPoolPtr b, void(*f)(ASCIICode))
 
void str_print_stats (FILE *f_log_file)
 
int str_undump (FILE *fmt_file, FILE *_not_use_)
 
void str_dump (FILE *fmt_file)
 
Integer str_adjust_to_room (Integer len)
 
void str_cur_map (void(*f)(ASCIICode))
 
void str_map (StrNumber str, void(*f)(ASCIICode))
 
void str_print (StrNumber s)
 
static void f_pool_helper (ASCIICode c)
 
void f_pool (StrNumber s)
 
StrNumber idlookup_s (StrNumber s, Boolean no_new_cs)
 
int str_valid (StrNumber s)
 
int str_scmp (StrNumber s, short *buffp)
 
Boolean str_bcmp (ASCIICode buffp[], long l, StrNumber s)
 
StrNumber str_ins (short *buffp, long l)
 
StrNumber str_insert (ASCIICode buffp[], Integer l)
 

变量

static ASCIICode str_pool [POOL_SIZE+1]
 [#39] the characters. 更多...
 
static PoolPtr str_start [MAX_STRINGS+1]
 [#39] the starting pointers. 更多...
 
static PoolPtr pool_ptr
 [#39] first unused position in str_pool. 更多...
 
static StrNumber str_ptr
 [#39] number of the current string being created. 更多...
 
static PoolPtr init_pool_ptr
 [#39] the starting value of pool_ptr. 更多...
 
static StrNumber init_str_ptr
 [#39] the starting value of str_ptr. 更多...
 

宏定义说明

◆ str_end

#define str_end (   x)    (str_start[(x) + 1])

函数说明

◆ f_pool()

void f_pool ( StrNumber  s)

◆ f_pool_helper()

static void f_pool_helper ( ASCIICode  c)
static

◆ idlookup_s()

StrNumber idlookup_s ( StrNumber  s,
Boolean  no_new_cs 
)

◆ printcurrentstring()

void printcurrentstring ( void  )

[#70] prints a yet-unmade string.

◆ slow_print()

void slow_print ( StrNumber  s)

#60: prints string s

◆ str_adjust_to_room()

Integer str_adjust_to_room ( Integer  len)

◆ str_bcmp()

Boolean str_bcmp ( ASCIICode  buffp[],
long  l,
StrNumber  s 
)

◆ str_cur_map()

void str_cur_map ( void(*)(ASCIICode f)

◆ str_dump()

void str_dump ( FILE *  fmt_file)

◆ str_getc()

int str_getc ( StrNumber  s,
int  k 
)

◆ str_ins()

StrNumber str_ins ( short *  buffp,
long  l 
)

◆ str_insert()

StrNumber str_insert ( ASCIICode  buffp[],
Integer  l 
)

◆ str_map()

void str_map ( StrNumber  str,
void(*)(ASCIICode f 
)

◆ str_map_from_mark()

void str_map_from_mark ( StrPoolPtr  b,
void(*)(ASCIICode f 
)

◆ str_mark()

StrPoolPtr str_mark ( void  )

◆ str_print()

void str_print ( StrNumber  s)

◆ str_print_stats()

void str_print_stats ( FILE *  f_log_file)

◆ str_scmp()

int str_scmp ( StrNumber  s,
short *  buffp 
)

◆ str_set_init_ptrs()

void str_set_init_ptrs ( void  )

◆ str_undump()

int str_undump ( FILE *  fmt_file,
FILE *  _not_use_ 
)

◆ str_valid()

int str_valid ( StrNumber  s)