TeX in C
Explore TeX with modern c compiler.
str.h 文件参考
#include <stdio.h>
#include <stdint.h>
#include "global.h"
#include "charset.h"
str.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

结构体

struct  StrPoolPtr
 

宏定义

#define STR_H
 
#define MAX_STRINGS   300000
 [#11] maximum number of strings; must not exceed MAX_HALF_WORD. 更多...
 
#define STRING_VACANCIES   8000
 [#11] the minimum number of characters that should be available for the user’s control sequences and font names, after TEX’s own error messages are stored. 更多...
 
#define POOL_SIZE   (1024 * 1024 * 4 - 1)
 [#11] maximum number of characters in strings. 更多...
 
#define POOLPOINTER_IS_POINTER   1
 
#define POOL_TOP   (str_pool + POOL_SIZE)
 
#define POOL_ELEM(x, y)   ((x)[(y)])
 
#define S(x)   (x)
 标记字符串序号 更多...
 

类型定义

typedef ASCIICodePoolPtr
 [#38] for variables that point into str_pool. 更多...
 
typedef uint_fast32_t StrNumber
 
typedef char * Str
 real string. 更多...
 

函数

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

宏定义说明

◆ STR_H

#define STR_H

函数说明

◆ 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  k,
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)