|
Crossfire Server, Trunk
|
#include <stdio.h>#include <string.h>#include <errno.h>#include <stdlib.h>#include <global.h>#include <loader.h>#include <newserver.h>#include <random_map.h>#include <unistd.h>
Include dependency graph for reader.c:Go to the source code of this file.
Data Structures | |
| struct | yy_buffer_state |
| struct | yy_trans_info |
Typedefs | |
| typedef short int | flex_int16_t |
| typedef int | flex_int32_t |
| typedef signed char | flex_int8_t |
| typedef unsigned short int | flex_uint16_t |
| typedef unsigned int | flex_uint32_t |
| typedef unsigned char | flex_uint8_t |
| typedef struct yy_buffer_state * | YY_BUFFER_STATE |
| typedef flex_uint8_t | YY_CHAR |
| typedef size_t | yy_size_t |
| typedef int | yy_state_type |
Functions | |
| if (!(yy_init)) | |
| int | load_parameters (FILE *fp, int bufstate, RMParms *RP) |
| static int | rmap_lex_read (RMParms *RP) |
| static char * | rmap_yval (void) |
| int | set_random_map_variable (RMParms *rp, const char *buf) |
| while (1) | |
| YY_BUFFER_STATE | yy_create_buffer (FILE *file, int size) |
| void | yy_delete_buffer (YY_BUFFER_STATE b) |
| static void yynoreturn | yy_fatal_error (const char *msg) |
| void | yy_flush_buffer (YY_BUFFER_STATE b) |
| static int | yy_get_next_buffer (void) |
| static yy_state_type | yy_get_previous_state (void) |
| static void | yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
| static int | yy_init_globals (void) |
| YY_BUFFER_STATE | yy_scan_buffer (char *base, yy_size_t size) |
| YY_BUFFER_STATE | yy_scan_bytes (const char *bytes, int len) |
| YY_BUFFER_STATE | yy_scan_string (const char *yy_str) |
| void | yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
| static yy_state_type | yy_try_NUL_trans (yy_state_type current_state) |
| void * | yyalloc (yy_size_t) |
| static int | yyerror (const char *s) |
| void | yyfree (void *) |
| void | yypush_buffer_state (YY_BUFFER_STATE new_buffer) |
| void * | yyrealloc (void *, yy_size_t) |
| void | yyrestart (FILE *input_file) |
| void | yyset_debug (int debug_flag) |
| void | yyset_extra (YY_EXTRA_TYPE user_defined) |
| void | yyset_in (FILE *_in_str) |
| void | yyset_lineno (int _line_number) |
| void | yyset_out (FILE *_out_str) |
Variables | |
| static int | rmap_lex_error |
| static const flex_int16_t | yy_accept [390] |
| int | yy_act |
| static const flex_int16_t | yy_base [427] |
| char * | yy_bp |
| static YY_BUFFER_STATE * | yy_buffer_stack = NULL |
| static size_t | yy_buffer_stack_max = 0 |
| static size_t | yy_buffer_stack_top = 0 |
| static char * | yy_c_buf_p = NULL |
| static const flex_int16_t | yy_chk [772] |
| char * | yy_cp |
| YY_DECL | |
| static const flex_int16_t | yy_def [427] |
| static int | yy_did_buffer_switch_on_eof |
| static const YY_CHAR | yy_ec [256] |
| int | yy_flex_debug = 0 |
| static char | yy_hold_char |
| static int | yy_init = 0 |
| static char * | yy_last_accepting_cpos |
| static yy_state_type | yy_last_accepting_state |
| static const YY_CHAR | yy_meta [56] |
| static int | yy_n_chars |
| static const flex_int16_t | yy_nxt [772] |
| static int | yy_start = 0 |
| FILE * | yyin = NULL |
| int | yyleng |
| int | yylineno = 1 |
| FILE * | yyout = NULL |
| char * | yytext |
| #define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
| #define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
| #define YY_CURRENT_BUFFER |
| #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
| #define YY_DECL int rmap_lex_read(RMParms *RP) |
| #define YY_DO_BEFORE_ACTION |
| #define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
| int yy_flex_debug rmap_flex_debug |
Definition at line 20 of file reader.c.
Referenced by yyset_debug().
| #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
| #define YY_INPUT | ( | buf, | |
| result, | |||
| max_size | |||
| ) |
| static void yy_load_buffer_state rmap_load_buffer_state |
Definition at line 15 of file reader.c.
Referenced by if(), yy_flush_buffer(), yy_switch_to_buffer(), yypush_buffer_state(), and yyrestart().
| #define yy_new_buffer yy_create_buffer |
| #define YY_RULE_SETUP |
| #define yy_set_bol | ( | at_bol | ) |
| #define yy_set_interactive | ( | is_interactive | ) |
| #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
| #define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
| static void yyensure_buffer_stack rmapensure_buffer_stack |
Definition at line 19 of file reader.c.
Referenced by if(), yy_switch_to_buffer(), yypush_buffer_state(), and yyrestart().
| YY_EXTRA_TYPE yyget_extra rmapget_extra |
| int yyget_leng | ( | void | ) | rmapget_leng |
| int yyget_lineno | ( | void | ) | rmapget_lineno |
| FILE * yyget_out | ( | void | ) | rmapget_out |
| char * yyget_text | ( | void | ) | rmapget_text |
| FILE * yyin rmapin |
Definition at line 21 of file reader.c.
Referenced by if(), while(), yy_get_next_buffer(), yy_init_globals(), yyrestart(), and yyset_in().
| #define yyless | ( | n | ) |
| #define yyless | ( | n | ) |
| int yylineno rmaplineno |
Definition at line 24 of file reader.c.
Referenced by yyset_lineno().
| FILE * yyout rmapout |
Definition at line 25 of file reader.c.
Referenced by if(), yy_init_globals(), and yyset_out().
| void yypop_buffer_state | ( | void | ) | rmappop_buffer_state |
| char * yytext rmaptext |
Definition at line 27 of file reader.c.
Referenced by rmap_yval(), and yyerror().
| typedef short int flex_int16_t |
| typedef int flex_int32_t |
| typedef signed char flex_int8_t |
| typedef unsigned short int flex_uint16_t |
| typedef unsigned int flex_uint32_t |
| typedef unsigned char flex_uint8_t |
| typedef struct yy_buffer_state* YY_BUFFER_STATE |
| typedef flex_uint8_t YY_CHAR |
| typedef int yy_state_type |
| if | ( | ! | yy_init | ) |
Definition at line 1261 of file reader.c.
References YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init, yy_load_buffer_state, yy_start, yyensure_buffer_stack, yyin, and yyout.
| int load_parameters | ( | FILE * | fp, |
| int | bufstate, | ||
| RMParms * | RP | ||
| ) |
Definition at line 2545 of file reader.c.
References LL_EOF, LL_NORMAL, LO_LINEMODE, LO_NEWFILE, LO_NOREAD, MAX_BUF, rmap_lex_read(), YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, yy_delete_buffer, yy_scan_string, and yy_switch_to_buffer.
Here is the call graph for this function:
|
static |
Referenced by load_parameters(), and set_random_map_variable().
Here is the caller graph for this function:
|
static |
| int set_random_map_variable | ( | RMParms * | rp, |
| const char * | buf | ||
| ) |
Definition at line 2579 of file reader.c.
References buf, rmap_lex_read(), yy_delete_buffer, and yy_scan_string.
Here is the call graph for this function:| while | ( | 1 | ) |
Definition at line 1301 of file reader.c.
References ECHO, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, FVAL, INITIAL, make_face_from_files::int, IVAL, LL_EOF, MESSAGE, RM_SIZE, rmap_lex_error, rmap_yval(), yy_accept, yy_act, YY_AT_BOL, yy_base, yy_bp, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, yy_chk, yy_cp, YY_CURRENT_BUFFER_LVALUE, yy_def, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, yy_last_accepting_cpos, yy_last_accepting_state, yy_meta, YY_MORE_ADJ, yy_n_chars, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yy_start, YY_STATE_EOF, yy_try_NUL_trans(), yyerror(), yyin, yytext_ptr, and yywrap.
Here is the call graph for this function:| YY_BUFFER_STATE yy_create_buffer | ( | FILE * | file, |
| int | size | ||
| ) |
Allocate and initialize an input buffer state.
| file | A readable stream. |
| size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE. |
Definition at line 2037 of file reader.c.
References Ice::b, mad_mage_user::file, YY_FATAL_ERROR, yy_init_buffer, and yyalloc.
| void yy_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Destroy the buffer.
| b | a buffer created with yy_create_buffer() |
Definition at line 2065 of file reader.c.
References Ice::b, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyfree.
|
static |
Definition at line 2323 of file reader.c.
References navar-midane_pickup::msg, and YY_EXIT_FAILURE.
| void yy_flush_buffer | ( | YY_BUFFER_STATE | b | ) |
Discard all buffered characters. On the next scan, YY_INPUT will be called.
| b | the buffer state to be flushed, usually YY_CURRENT_BUFFER. |
Definition at line 2112 of file reader.c.
References Ice::b, YY_BUFFER_NEW, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, and yy_load_buffer_state.
|
static |
Definition at line 1696 of file reader.c.
References Ice::b, convert::dest, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, make_face_from_files::int, YY_BUFFER_EOF_PENDING, yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, YY_INPUT, YY_MORE_ADJ, yy_n_chars, YY_READ_BUF_SIZE, yyin, yyrealloc, yyrestart, and yytext_ptr.
Referenced by while().
Here is the caller graph for this function:
|
static |
Definition at line 1834 of file reader.c.
References make_face_from_files::int, yy_accept, YY_AT_BOL, yy_base, yy_c_buf_p, yy_chk, yy_cp, yy_def, yy_ec, yy_last_accepting_cpos, yy_last_accepting_state, yy_meta, YY_MORE_ADJ, yy_nxt, YY_SC_TO_UI, yy_start, and yytext_ptr.
Referenced by while().
Here is the caller graph for this function:
|
static |
Definition at line 2084 of file reader.c.
References Ice::b, mad_mage_user::file, YY_CURRENT_BUFFER, and yy_flush_buffer.
|
static |
Definition at line 2426 of file reader.c.
References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, yy_c_buf_p, yy_init, yy_start, yyin, and yyout.
| YY_BUFFER_STATE yy_scan_buffer | ( | char * | base, |
| yy_size_t | size | ||
| ) |
Setup the input buffer state to scan directly from a user-specified character buffer.
| base | the character buffer |
| size | the size in bytes of the character buffer |
Definition at line 2239 of file reader.c.
References Ice::b, make_face_from_files::int, YY_BUFFER_NEW, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_switch_to_buffer, and yyalloc.
| YY_BUFFER_STATE yy_scan_bytes | ( | const char * | yybytes, |
| int | _yybytes_len | ||
| ) |
Setup the input buffer state to scan the given bytes. The next call to yylex() will scan from a copy of bytes.
| yybytes | the byte buffer to scan |
| _yybytes_len | the number of bytes in the buffer pointed to by bytes. |
Definition at line 2289 of file reader.c.
References Ice::b, buf, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_scan_buffer, and yyalloc.
| YY_BUFFER_STATE yy_scan_string | ( | const char * | yystr | ) |
Setup the input buffer state to scan a string. The next call to yylex() will scan from a copy of str.
| yystr | a NUL-terminated string to scan |
Definition at line 2276 of file reader.c.
References yy_scan_bytes.
| void yy_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Switch to a different input buffer.
| new_buffer | The new input buffer. |
Definition at line 1992 of file reader.c.
References yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state, yy_n_chars, and yyensure_buffer_stack.
|
static |
Definition at line 1867 of file reader.c.
References make_face_from_files::int, yy_accept, yy_base, yy_c_buf_p, yy_chk, yy_cp, yy_def, yy_last_accepting_cpos, yy_last_accepting_state, yy_meta, and yy_nxt.
Referenced by while().
Here is the caller graph for this function:
|
static |
| void yypush_buffer_state | ( | YY_BUFFER_STATE | new_buffer | ) |
Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.
| new_buffer | The new state. |
Definition at line 2141 of file reader.c.
References yy_buffer_stack_top, yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state, yy_n_chars, and yyensure_buffer_stack.
| void yyrestart | ( | FILE * | input_file | ) |
Immediately switch to a different input stream.
| input_file | A readable stream. |
INITIAL . Definition at line 1975 of file reader.c.
References YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init_buffer, yy_load_buffer_state, yyensure_buffer_stack, and yyin.
| void yyset_debug | ( | int | debug_flag | ) |
Definition at line 2421 of file reader.c.
References yy_flex_debug.
| void yyset_extra | ( | YY_EXTRA_TYPE | user_defined | ) |
| void yyset_in | ( | FILE * | _in_str | ) |
Set the input stream. This does not discard the current input buffer.
| _in_str | A readable stream. |
Definition at line 2406 of file reader.c.
References yyin.
| void yyset_lineno | ( | int | _line_number | ) |
|
static |
Definition at line 625 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 713 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
|
static |
|
static |
index of top of stack.
Definition at line 508 of file reader.c.
Referenced by yy_init_globals(), and yypush_buffer_state().
|
static |
Definition at line 532 of file reader.c.
Referenced by while(), yy_get_next_buffer(), yy_get_previous_state(), yy_init_globals(), yy_switch_to_buffer(), yy_try_NUL_trans(), and yypush_buffer_state().
|
static |
Definition at line 904 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
| char* yy_cp |
Definition at line 1258 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
| YY_DECL |
The main scanner function which does all the work.
|
static |
Definition at line 764 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 539 of file reader.c.
Referenced by while(), yy_switch_to_buffer(), and yypush_buffer_state().
|
static |
Definition at line 671 of file reader.c.
Referenced by while(), and yy_get_previous_state().
|
static |
Definition at line 527 of file reader.c.
Referenced by while(), yy_switch_to_buffer(), and yypush_buffer_state().
|
static |
Definition at line 533 of file reader.c.
Referenced by if(), and yy_init_globals().
|
static |
Definition at line 994 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 993 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 703 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 528 of file reader.c.
Referenced by while(), yy_get_next_buffer(), yy_switch_to_buffer(), and yypush_buffer_state().
|
static |
Definition at line 815 of file reader.c.
Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 534 of file reader.c.
Referenced by if(), while(), yy_get_previous_state(), and yy_init_globals().