Crossfire Server, Trunk
loader.cpp File Reference
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "global.h"
#include <ctype.h>
#include "loader.h"
#include "newserver.h"
#include "sproto.h"
#include "stringbuffer.h"
#include <unistd.h>
+ Include dependency graph for loader.cpp:

Go to the source code of this file.

Data Structures

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define BEGIN   (yy_start) = 1 + 2 *
 
#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define FLEX_BETA
 
#define FLEX_SCANNER
 
#define FLEXINT_H
 
#define FVAL   atof(yval())
 
#define INITIAL   0
 
#define INT16_MAX   (32767)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MAX   (2147483647)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT8_MIN   (-128)
 
#define IVAL   atoi(yval())
 
#define LORE   2
 
#define MAXDEPTH   10
 
#define MESSAGE   1
 
#define REJECT   reject_used_but_not_detected
 
#define SET_OR_CLEAR_FLAG(op, flag, val)   { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); }
 
#define SET_RESIST(op, type, val)   op->resist[type] = val;
 
#define SIZE_MAX   (~(size_t)0)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define UINT8_MAX   (255U)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define YY_BREAK   /*LINTED*/break;
 
#define YY_BUF_SIZE   16384
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define YY_DECL   int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode, int *ismore, bool arch_init, bool artifact_init)
 
#define YY_DO_BEFORE_ACTION
 
#define YY_END_OF_BUFFER   225
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_EXIT_FAILURE   2
 
#define YY_EXTRA_TYPE   void *
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   6
 
#define YY_FLEX_SUBMINOR_VERSION   4
 
#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER )
 
#define YY_INPUT(buf, result, max_size)
 
#define YY_INT_ALIGNED   short int
 
#define YY_LESS_LINENO(n)
 
#define YY_LINENO_REWIND_TO(ptr)
 
#define YY_MORE_ADJ   0
 
#define yy_new_buffer   yy_create_buffer
 
#define YY_NEW_FILE   yyrestart( yyin )
 
#define YY_NO_INPUT   1
 
#define YY_NULL   0
 
#define YY_NUM_RULES   224
 
#define YY_READ_BUF_SIZE   8192
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define YY_RULE_SETUP
 
#define YY_SC_TO_UI(c)   ((YY_CHAR) (c))
 
#define yy_set_bol(at_bol)
 
#define yy_set_interactive(is_interactive)
 
#define YY_SKIP_YYWRAP
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YY_START_STACK_INCR   25
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define YY_USER_ACTION
 
#define yyconst   const
 
#define yyless(n)
 
#define yyless(n)
 
#define yymore()   yymore_used_but_not_detected
 
#define yynoreturn
 
#define YYSTATE   YY_START
 
#define YYTABLES_NAME   "yytables"
 
#define yyterminate()   return YY_NULL
 
#define yytext_ptr   yytext
 
#define yywrap()   (/*CONSTCOND*/1)
 

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_stateYY_BUFFER_STATE
 
typedef flex_uint8_t YY_CHAR
 
typedef size_t yy_size_t
 
typedef int yy_state_type
 

Functions

static void add_key_value (object *op)
 
static void check_loaded_object (object *op, bool arch_init)
 
void free_loader (void)
 
 if (!(yy_init))
 
int load_object (FILE *fp, object *op, int bufstate, int map_flags, bool artifact_init)
 
int load_object_from_reader (BufferReader *reader, object *op, int map_flags, bool arch_init, bool artifact_init)
 
static void reverse_ob_inv (object *op)
 
static void reverse_ob_key_values (object *op)
 
static void set_body_info (object *op, char *params)
 
static void set_move (MoveType *mt, char *params, const char *prefix)
 
int set_variable (object *op, const char *buf)
 
 while (1)
 
static char * yval (void)
 
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)
 
static void yy_load_buffer_state (void)
 
static void yy_pop_state (void)
 
static void yy_push_state (int _new_state)
 
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 void yyensure_buffer_stack (void)
 
void yyfree (void *)
 
int yyget_debug (void)
 
YY_EXTRA_TYPE yyget_extra (void)
 
FILE * yyget_in (void)
 
int yyget_leng (void)
 
int yyget_lineno (void)
 
FILE * yyget_out (void)
 
char * yyget_text (void)
 
int yylex_destroy (void)
 
void yypop_buffer_state (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 lex_error = 0
 
static char lorebuf [HUGE_BUF]
 
static char msgbuf [HUGE_BUF]
 
size_t msglen = 0
 
static bool seen_object = false
 
size_t total_msglen = 0
 
static const flex_int16_t yy_accept [2024]
 
int yy_act
 
char * yy_bp
 
static YY_BUFFER_STATEyy_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
 
char * yy_cp
 
 YY_DECL
 
static int yy_did_buffer_switch_on_eof
 
int yy_flex_debug = 0
 
static char yy_hold_char
 
static int yy_init = 0
 
static int yy_n_chars
 
static const yy_state_type yy_NUL_trans [2024]
 
static const flex_int16_t yy_nxt [][128]
 
static int yy_start = 0
 
static int * yy_start_stack = NULL
 
static int yy_start_stack_depth = 0
 
static int yy_start_stack_ptr = 0
 
FILE * yyin = NULL
 
int yyleng
 
int yylineno = 1
 
FILE * yyout = NULL
 
char * yytext
 

Macro Definition Documentation

◆ BEGIN

#define BEGIN   (yy_start) = 1 + 2 *

Definition at line 118 of file loader.cpp.

◆ ECHO

#define ECHO   do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)

Definition at line 36332 of file loader.cpp.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 162 of file loader.cpp.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 163 of file loader.cpp.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 164 of file loader.cpp.

◆ FLEX_BETA

#define FLEX_BETA

Definition at line 14 of file loader.cpp.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 9 of file loader.cpp.

◆ FLEXINT_H

#define FLEXINT_H

Definition at line 30 of file loader.cpp.

◆ FVAL

#define FVAL   atof(yval())

Next value as float.

Definition at line 35894 of file loader.cpp.

◆ INITIAL

#define INITIAL   0

Definition at line 36229 of file loader.cpp.

◆ INT16_MAX

#define INT16_MAX   (32767)

Definition at line 72 of file loader.cpp.

◆ INT16_MIN

#define INT16_MIN   (-32767-1)

Definition at line 63 of file loader.cpp.

◆ INT32_MAX

#define INT32_MAX   (2147483647)

Definition at line 75 of file loader.cpp.

◆ INT32_MIN

#define INT32_MIN   (-2147483647-1)

Definition at line 66 of file loader.cpp.

◆ INT8_MAX

#define INT8_MAX   (127)

Definition at line 69 of file loader.cpp.

◆ INT8_MIN

#define INT8_MIN   (-128)

Definition at line 60 of file loader.cpp.

◆ IVAL

#define IVAL   atoi(yval())

Next value as integer.

Definition at line 35892 of file loader.cpp.

◆ LORE

#define LORE   2

Definition at line 36231 of file loader.cpp.

◆ MAXDEPTH

#define MAXDEPTH   10

◆ MESSAGE

#define MESSAGE   1

Definition at line 36230 of file loader.cpp.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 35846 of file loader.cpp.

◆ SET_OR_CLEAR_FLAG

#define SET_OR_CLEAR_FLAG (   op,
  flag,
  val 
)    { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); }

Utility macro to transform a bit into a flag.

Definition at line 35885 of file loader.cpp.

◆ SET_RESIST

#define SET_RESIST (   op,
  type,
  val 
)    op->resist[type] = val;

Definition at line 35888 of file loader.cpp.

◆ SIZE_MAX

#define SIZE_MAX   (~(size_t)0)

Definition at line 88 of file loader.cpp.

◆ UINT16_MAX

#define UINT16_MAX   (65535U)

Definition at line 81 of file loader.cpp.

◆ UINT32_MAX

#define UINT32_MAX   (4294967295U)

Definition at line 84 of file loader.cpp.

◆ UINT8_MAX

#define UINT8_MAX   (255U)

Definition at line 78 of file loader.cpp.

◆ unput

#define unput (   c)    yyunput( c, (yytext_ptr) )

Definition at line 182 of file loader.cpp.

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Definition at line 323 of file loader.cpp.

◆ YY_BREAK

#define YY_BREAK   /*LINTED*/break;

Definition at line 36411 of file loader.cpp.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 140 of file loader.cpp.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 244 of file loader.cpp.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 232 of file loader.cpp.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 233 of file loader.cpp.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER
Value:

Definition at line 260 of file loader.cpp.

◆ YY_CURRENT_BUFFER_LVALUE

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Definition at line 266 of file loader.cpp.

◆ YY_DECL

#define YY_DECL   int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode, int *ismore, bool arch_init, bool artifact_init)

Definition at line 35875 of file loader.cpp.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
yyleng = (int) (yy_cp - yy_bp); \
*yy_cp = '\0'; \

Definition at line 35371 of file loader.cpp.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   225

Definition at line 35378 of file loader.cpp.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 129 of file loader.cpp.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 38665 of file loader.cpp.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 36242 of file loader.cpp.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 36386 of file loader.cpp.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 10 of file loader.cpp.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   6

Definition at line 11 of file loader.cpp.

◆ YY_FLEX_SUBMINOR_VERSION

#define YY_FLEX_SUBMINOR_VERSION   4

Definition at line 12 of file loader.cpp.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   yy_flush_buffer( YY_CURRENT_BUFFER )

Definition at line 294 of file loader.cpp.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
if ( c == EOF && ferror( yyin ) ) \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
result = n; \
} \
else \
{ \
errno=0; \
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
{ \
if( errno != EINTR) \
{ \
YY_FATAL_ERROR( "input in flex scanner failed" ); \
break; \
} \
errno=0; \
clearerr(yyin); \
} \
}\
\

Definition at line 36339 of file loader.cpp.

◆ YY_INT_ALIGNED

#define YY_INT_ALIGNED   short int

Definition at line 5 of file loader.cpp.

◆ YY_LESS_LINENO

#define YY_LESS_LINENO (   n)

Definition at line 166 of file loader.cpp.

◆ YY_LINENO_REWIND_TO

#define YY_LINENO_REWIND_TO (   ptr)

Definition at line 167 of file loader.cpp.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   0

Definition at line 35848 of file loader.cpp.

◆ yy_new_buffer

#define yy_new_buffer   yy_create_buffer

Definition at line 304 of file loader.cpp.

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin )

Definition at line 128 of file loader.cpp.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 36226 of file loader.cpp.

◆ YY_NULL

#define YY_NULL   0

Definition at line 107 of file loader.cpp.

◆ YY_NUM_RULES

#define YY_NUM_RULES   224

Definition at line 35377 of file loader.cpp.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 36323 of file loader.cpp.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 35849 of file loader.cpp.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP
Value:
if ( yyleng > 0 ) \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION

Definition at line 36414 of file loader.cpp.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    ((YY_CHAR) (c))

Definition at line 112 of file loader.cpp.

◆ yy_set_bol

#define yy_set_bol (   at_bol)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){\
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}

Definition at line 314 of file loader.cpp.

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)
Value:
{ \
if ( ! YY_CURRENT_BUFFER ){ \
yyensure_buffer_stack (); \
YY_CURRENT_BUFFER_LVALUE = \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}

Definition at line 305 of file loader.cpp.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 328 of file loader.cpp.

◆ YY_START

#define YY_START   (((yy_start) - 1) / 2)

Definition at line 123 of file loader.cpp.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 36381 of file loader.cpp.

◆ YY_STATE_BUF_SIZE

#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

Definition at line 146 of file loader.cpp.

◆ YY_STATE_EOF

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 126 of file loader.cpp.

◆ YY_STRUCT_YY_BUFFER_STATE

#define YY_STRUCT_YY_BUFFER_STATE

Definition at line 185 of file loader.cpp.

◆ YY_TYPEDEF_YY_BUFFER_STATE

#define YY_TYPEDEF_YY_BUFFER_STATE

Definition at line 149 of file loader.cpp.

◆ YY_TYPEDEF_YY_SIZE_T

#define YY_TYPEDEF_YY_SIZE_T

Definition at line 154 of file loader.cpp.

◆ YY_USER_ACTION

#define YY_USER_ACTION

Definition at line 36406 of file loader.cpp.

◆ yyconst

#define yyconst   const

Definition at line 98 of file loader.cpp.

◆ yyless [1/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
YY_RESTORE_YY_MORE_OFFSET \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )

Definition at line 38677 of file loader.cpp.

◆ yyless [2/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = (yy_hold_char); \
(yy_c_buf_p) = yytext + yyless_macro_arg; \
*(yy_c_buf_p) = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )

Definition at line 38677 of file loader.cpp.

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

Definition at line 35847 of file loader.cpp.

◆ yynoreturn

#define yynoreturn

Definition at line 103 of file loader.cpp.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 124 of file loader.cpp.

◆ YYTABLES_NAME

#define YYTABLES_NAME   "yytables"

Definition at line 38877 of file loader.cpp.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 36376 of file loader.cpp.

◆ yytext_ptr

#define yytext_ptr   yytext

Definition at line 342 of file loader.cpp.

◆ yywrap

#define yywrap ( )    (/*CONSTCOND*/1)

Definition at line 327 of file loader.cpp.

Typedef Documentation

◆ flex_int16_t

typedef short int flex_int16_t

Definition at line 52 of file loader.cpp.

◆ flex_int32_t

typedef int flex_int32_t

Definition at line 53 of file loader.cpp.

◆ flex_int8_t

typedef signed char flex_int8_t

Definition at line 51 of file loader.cpp.

◆ flex_uint16_t

typedef unsigned short int flex_uint16_t

Definition at line 55 of file loader.cpp.

◆ flex_uint32_t

typedef unsigned int flex_uint32_t

Definition at line 56 of file loader.cpp.

◆ flex_uint8_t

typedef unsigned char flex_uint8_t

Definition at line 54 of file loader.cpp.

◆ YY_BUFFER_STATE

Definition at line 150 of file loader.cpp.

◆ YY_CHAR

Definition at line 329 of file loader.cpp.

◆ yy_size_t

typedef size_t yy_size_t

Definition at line 155 of file loader.cpp.

◆ yy_state_type

typedef int yy_state_type

Definition at line 333 of file loader.cpp.

Function Documentation

◆ add_key_value()

static void add_key_value ( object op)
static

This extracts the key/value from the yytext field - calls object_set_value() to actually set the value. Function basically has to find spaces, strip out extra, etc. strchr doesn't work as good because could also be tabs.

Parameters
opobject in which to insert the value.

Definition at line 36103 of file loader.cpp.

References castle_read::key, object_set_value(), give::op, TRUE, autojail::value, and yytext.

Referenced by while().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ check_loaded_object()

static void check_loaded_object ( object op,
bool  arch_init 
)
static

This function checks the object after it has been loaded (when we get the 'end' in the input stream). This function can be used to deal with legacy objects where fields may have changed. It can also be used to check for objects to make sure there are no common errors.

Parameters
opobject to check.
arch_inittrue if doing archetypes initialisation, false else.

Definition at line 35978 of file loader.cpp.

References add_string(), BOW, buf, cf_random(), CONVERTER, create_archetype_by_object_name(), CREATOR, FABS, FLAG_CONTENT_ON_GEN, FLAG_GENERATOR, FLAG_IDENTIFIED, FLAG_IS_A_TEMPLATE, FLAG_MONSTER, free_string(), get_archetype_struct(), is_type_valid(), IS_WEAPON, llevDebug, llevError, LOG(), MIN_ACTIVE_SPEED, object_can_merge(), object_copy(), object_give_identified_properties(), object_insert_in_ob(), object_set_flag_inv(), object_update_speed(), give::op, QUERY_FLAG, RUNE, set_materialname(), SPELLBOOK, guildbuy::temp, Ice::tmp, and WEAPON.

Referenced by while().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_loader()

void free_loader ( void  )

Frees all memory allocated by the loader.

Definition at line 39074 of file loader.cpp.

References YY_CURRENT_BUFFER, and yy_delete_buffer().

Referenced by cleanup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ if()

◆ load_object()

int load_object ( FILE *  fp,
object op,
int  bufstate,
int  map_flags,
bool  artifact_init 
)

Loads an object from the given file-pointer. Variables will be read and parsed and patched into the object until the string "end" is reached, or the end of the file.

Parameters
fpfile pointer from which to read.
opwhere to read the data.
bufstateused to determine various file attributes:
  • LO_REPATE (0): We are reading from the same buffer as the last call.
  • LO_LINEMODE (1): file that is being read from is multi purpose (ie, other functions will also be reading from this (treasure file, artifacts.)
  • LO_NEWFILE (2): This is the first read from a particular file, so the buffers should be reset.
  • LO_NOREAD (3): Reset the buffers, but don't read from it. (op can be null)
map_flagscombination of Map loading flags flags, though only MAP_STYLE is used.
artifact_initwhether the object is being loaded as part of artifact loading or not.
Returns
  • LL_NORMAL if object was read.
  • LL_EOF if an error occured.
  • LL_MORE if this is a multipart object.

Definition at line 38944 of file loader.cpp.

References LL_EOF, LL_NORMAL, llevDebug, LO_LINEMODE, LO_NEWFILE, LO_NOREAD, LOG(), lorebuf, MAXDEPTH, msgbuf, msglen, give::op, total_msglen, VERY_BIG_BUF, YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, yy_delete_buffer(), yy_scan_string(), and yy_switch_to_buffer().

Referenced by check_login(), load_objects(), and load_unique_objects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_object_from_reader()

int load_object_from_reader ( BufferReader reader,
object op,
int  map_flags,
bool  arch_init,
bool  artifact_init 
)

Load an object from the specified reader, stopping when the object is complete.

Parameters
readerwhere to read from.
opobject to read.
map_flagsone or more map loading flags.
arch_initwhether we are loading archetypes or not.
artifact_initwhether the object is being loaded as part of artifact loading or not.
Returns
LL_NORMAL or LL_MORE if no error, LL_EOF if end of file, will LOG an error if unexpected.
Todo:
loading is inefficient because of bufferreader_get_line(), check use of yy_scan_buffer().

Definition at line 38996 of file loader.cpp.

References buf, bufferreader_get_line(), HUGE_BUF, INITIAL, LL_EOF, LL_MORE, LL_NORMAL, llevError, LOG(), lorebuf, MAXDEPTH, msgbuf, msglen, give::op, total_msglen, YY_CURRENT_BUFFER, yy_delete_buffer(), yy_pop_state(), yy_push_state(), and yy_scan_string().

Referenced by ArtifactLoader::load(), and ArchetypeLoader::load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reverse_ob_inv()

static void reverse_ob_inv ( object op)
static

Destructively reverse the object's inventory. Used to preserve object order as they appear in the file, since linked list insertion is at the beginning.

Parameters
opObject to reverse.

Definition at line 35909 of file loader.cpp.

References object::above, object::below, give::next, and give::op.

Referenced by while().

+ Here is the caller graph for this function:

◆ reverse_ob_key_values()

static void reverse_ob_key_values ( object op)
static

Destructively reverse the object's key value pairs.

Parameters
opObject to reverse.

Definition at line 35927 of file loader.cpp.

References give::next, key_value::next, and give::op.

Referenced by while().

+ Here is the caller graph for this function:

◆ set_body_info()

static void set_body_info ( object op,
char *  params 
)
static

Fills in the body information for one slot.

Parameters
opobject
paramsthe body part, which should be in the body_locations structure.

Definition at line 35948 of file loader.cpp.

References body_locations, llevError, LOG(), NUM_BODY_LOCATIONS, give::op, and roll-o-matic::params.

Referenced by while().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_move()

static void set_move ( MoveType mt,
char *  params,
const char *  prefix 
)
static

Handles the different move types an object can have.

Parameters
mtfield for which we are computing the value, will be set to the result of parsing.
paramsstring containing the definition of the move type to parse.
prefixstring to be displayed in case the move type is invalid, must not be NULL.

Definition at line 36174 of file loader.cpp.

References llevDebug, LOG(), MOVE_ALL, MOVE_FLYING, move_name, roll-o-matic::params, castle_read::prefix, make_face_from_files::str, and strcasecmp().

Referenced by while().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_variable()

int set_variable ( object op,
const char *  buf 
)

This takes a buffer, scans it for variables, and sets those variables as appropriate in op.

This function appears to be used in only 2 places - in crossedit to override values and in c_wiz to mutate values.

Parameters
opobject to alter.
bufmodifications to apply.
Returns
?
Todo:
document return value.

Definition at line 39047 of file loader.cpp.

References buf, INITIAL, lorebuf, MAXDEPTH, msgbuf, msglen, give::op, total_msglen, YY_CURRENT_BUFFER, yy_delete_buffer(), yy_pop_state(), yy_push_state(), yy_scan_string(), and yy_switch_to_buffer().

Referenced by command_create(), command_patch(), and Archetypes::recursive_update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ while()

while ( )
Todo:
fix evil const cast

Definition at line 36468 of file loader.cpp.

References add_button_link(), add_friendly_object(), add_key_value(), add_string(), ATNR_ACID, ATNR_BLIND, ATNR_CANCELLATION, ATNR_CHAOS, ATNR_COLD, ATNR_CONFUSION, ATNR_COUNTERSPELL, ATNR_DEATH, ATNR_DEPLETE, ATNR_DISEASE, ATNR_DRAIN, ATNR_ELECTRICITY, ATNR_FEAR, ATNR_FIRE, ATNR_GHOSTHIT, ATNR_GODPOWER, ATNR_HOLYWORD, ATNR_INTERNAL, ATNR_LIFE_STEALING, ATNR_MAGIC, ATNR_PARALYZE, ATNR_PHYSICAL, ATNR_POISON, ATNR_SLOW, ATNR_TURN_UNDEAD, ATNR_WEAPONMAGIC, BEGIN, check_loaded_object(), CLEAR_FLAG, ECHO, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, find_animation(), find_archetype(), find_artifact(), find_face(), find_treasurelist(), FLAG_ACTIVATE_ON_PUSH, FLAG_ACTIVATE_ON_RELEASE, FLAG_ALIVE, FLAG_ANIMATE, FLAG_APPLIED, FLAG_AUTO_APPLY, FLAG_BEEN_APPLIED, FLAG_BERSERK, FLAG_BLESSED, FLAG_BLIND, FLAG_BLOCKSVIEW, FLAG_CAN_ROLL, FLAG_CAN_USE_SKILL, FLAG_CAST_SPELL, FLAG_CHANGING, FLAG_CLIENT_ANIM_RANDOM, FLAG_CLIENT_ANIM_SYNC, FLAG_CONFUSED, FLAG_CONTENT_ON_GEN, FLAG_CURSED, FLAG_DAMNED, FLAG_FRIENDLY, FLAG_GENERATOR, FLAG_HITBACK, FLAG_IDENTIFIED, FLAG_INV_LOCKED, FLAG_IS_BUILDABLE, FLAG_IS_CAULDRON, FLAG_IS_FLOOR, FLAG_IS_HILLY, FLAG_IS_LIGHTABLE, FLAG_IS_THROWN, FLAG_IS_TURNABLE, FLAG_IS_USED_UP, FLAG_IS_WATER, FLAG_IS_WOODED, FLAG_KNOWN_BLESSED, FLAG_KNOWN_CURSED, FLAG_KNOWN_MAGICAL, FLAG_LIFESAVE, FLAG_MAKE_INVIS, FLAG_MONSTER, FLAG_NEUTRAL, FLAG_NO_ATTACK, FLAG_NO_DAMAGE, FLAG_NO_DROP, FLAG_NO_FIX_PLAYER, FLAG_NO_MAGIC, FLAG_NO_PICK, FLAG_NO_SKILL_IDENT, FLAG_NO_STEAL, FLAG_NO_STRENGTH, FLAG_ONE_HIT, FLAG_ONLY_ATTACK, FLAG_OVERLAY_FLOOR, FLAG_PARALYZED, FLAG_RANDOM_MOVE, FLAG_READY_BOW, FLAG_READY_SCROLL, FLAG_READY_SKILL, FLAG_READY_WEAPON, FLAG_REFL_MISSILE, FLAG_REFL_SPELL, FLAG_REFLECTING, FLAG_SCARED, FLAG_SEE_ANYWHERE, FLAG_SEE_IN_DARK, FLAG_SEE_INVISIBLE, FLAG_SLEEP, FLAG_SPLITTING, FLAG_STAND_STILL, FLAG_STARTEQUIP, FLAG_STEALTH, FLAG_TEAR_DOWN, FLAG_TREASURE, FLAG_UNAGGRESSIVE, FLAG_UNDEAD, FLAG_UNIQUE, FLAG_UNPAID, FLAG_USE_ARMOUR, FLAG_USE_BOW, FLAG_USE_RANGE, FLAG_USE_RING, FLAG_USE_SCROLL, FLAG_USE_SHIELD, FLAG_USE_WEAPON, FLAG_WAS_WIZ, FLAG_WIZ, FLAG_WIZCAST, FLAG_WIZPASS, FLAG_XRAYS, FREE_AND_COPY, FVAL, give_artifact_abilities(), HUGE_BUF, INITIAL, make_face_from_files::int, artifact::item, IVAL, lex_error, LL_EOF, LL_IGNORED, LL_MORE, LL_NORMAL, llevDebug, llevError, LOG(), LORE, lorebuf, map_layer_name, MAP_LAYERS, MAP_STYLE, MESSAGE, MOVE_WALK, msgbuf, msglen, give::name, object_copy(), object_copy_no_speed(), object_insert_in_ob(), object_new(), object_set_msg(), object_update_speed(), give::op, Settings::permanent_exp_ratio, PLAYER, RANDOM, reverse_ob_inv(), reverse_ob_key_values(), safe_strcat(), seen_object, set_body_info(), SET_FLAG, set_move(), SET_OR_CLEAR_FLAG, SET_RESIST, settings, Face::smoothface, strcasecmp(), Ice::tmp, total_msglen, diamondslots::y, yval(), yy_accept, yy_act, YY_AT_BOL, yy_bp, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, yy_cp, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, 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(), yyin, yytext, yytext_ptr, and yywrap.

Referenced by CFMapTransformer.CFMapTransformer::untransformAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yval()

static char * yval ( void  )
static

Returns the next token for lex. Our save file syntax is very simple, so we can use a very simple processing mechanism here instead using something like bison This skips over the space and returns the value, or "" if no value is found. Modified 4/26/2000 to also strip spaces at end of line

Definition at line 38890 of file loader.cpp.

References yytext.

Referenced by while().

+ Here is the caller graph for this function:

◆ yy_create_buffer()

YY_BUFFER_STATE yy_create_buffer ( FILE *  file,
int  size 
)

Allocate and initialize an input buffer state.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
Returns
the allocated buffer state.

Definition at line 38349 of file loader.cpp.

References Ice::b, mad_mage_user::file, YY_FATAL_ERROR, yy_init_buffer(), and yyalloc().

Referenced by if(), load_object(), and yyrestart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_delete_buffer()

void yy_delete_buffer ( YY_BUFFER_STATE  b)

Destroy the buffer.

Parameters
ba buffer created with yy_create_buffer()

Definition at line 38377 of file loader.cpp.

References Ice::b, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyfree().

Referenced by free_loader(), load_object(), load_object_from_reader(), set_variable(), yylex_destroy(), and yypop_buffer_state().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_fatal_error()

static void yynoreturn yy_fatal_error ( const char *  msg)
static

Definition at line 38668 of file loader.cpp.

References navar-midane_pickup::msg, and YY_EXIT_FAILURE.

◆ yy_flush_buffer()

void yy_flush_buffer ( YY_BUFFER_STATE  b)

Discard all buffered characters. On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 38424 of file loader.cpp.

References Ice::b, YY_BUFFER_NEW, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, and yy_load_buffer_state().

Referenced by yy_init_buffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_get_next_buffer()

static int yy_get_next_buffer ( void  )
static

◆ yy_get_previous_state()

static yy_state_type yy_get_previous_state ( void  )
static

Definition at line 38166 of file loader.cpp.

References YY_AT_BOL, yy_c_buf_p, yy_cp, YY_MORE_ADJ, yy_NUL_trans, yy_nxt, YY_SC_TO_UI, yy_start, and yytext_ptr.

Referenced by while().

+ Here is the caller graph for this function:

◆ yy_init_buffer()

static void yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)
static

Definition at line 38396 of file loader.cpp.

References Ice::b, mad_mage_user::file, YY_CURRENT_BUFFER, and yy_flush_buffer().

Referenced by yy_create_buffer(), and yyrestart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_init_globals()

static int yy_init_globals ( void  )
static

Definition at line 38771 of file loader.cpp.

References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, yy_c_buf_p, yy_init, yy_start, yy_start_stack, yy_start_stack_depth, yy_start_stack_ptr, yyin, and yyout.

Referenced by yylex_destroy().

+ Here is the caller graph for this function:

◆ yy_load_buffer_state()

static void yy_load_buffer_state ( void  )
static

Definition at line 38335 of file loader.cpp.

References yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_hold_char, yy_n_chars, yyin, and yytext_ptr.

Referenced by if(), yy_flush_buffer(), yy_switch_to_buffer(), yypop_buffer_state(), yypush_buffer_state(), and yyrestart().

+ Here is the caller graph for this function:

◆ yy_pop_state()

static void yy_pop_state ( void  )
static

Definition at line 38656 of file loader.cpp.

References BEGIN, YY_FATAL_ERROR, yy_start_stack, and yy_start_stack_ptr.

Referenced by load_object_from_reader(), and set_variable().

+ Here is the caller graph for this function:

◆ yy_push_state()

static void yy_push_state ( int  _new_state)
static

Definition at line 38631 of file loader.cpp.

References BEGIN, make_face_from_files::int, YY_FATAL_ERROR, YY_START, yy_start_stack, yy_start_stack_depth, YY_START_STACK_INCR, yy_start_stack_ptr, yyalloc(), and yyrealloc().

Referenced by load_object_from_reader(), and set_variable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_scan_buffer()

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.

Parameters
basethe character buffer
sizethe size in bytes of the character buffer
Returns
the newly allocated buffer state object.

Definition at line 38551 of file loader.cpp.

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().

Referenced by yy_scan_bytes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_scan_bytes()

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.

Parameters
yybytesthe byte buffer to scan
_yybytes_lenthe number of bytes in the buffer pointed to by bytes.
Returns
the newly allocated buffer state object.

Definition at line 38601 of file loader.cpp.

References Ice::b, buf, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_scan_buffer(), and yyalloc().

Referenced by yy_scan_string().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_scan_string()

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.

Parameters
yystra NUL-terminated string to scan
Returns
the newly allocated buffer state object.
Note
If you want to scan bytes that may contain NUL values, then use yy_scan_bytes() instead.

Definition at line 38588 of file loader.cpp.

References yy_scan_bytes().

Referenced by load_object(), load_object_from_reader(), and set_variable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_switch_to_buffer()

void yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Definition at line 38304 of file loader.cpp.

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().

Referenced by load_object(), set_variable(), and yy_scan_buffer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  current_state)
static

Definition at line 38192 of file loader.cpp.

References yy_NUL_trans.

Referenced by while().

+ Here is the caller graph for this function:

◆ yyalloc()

void * yyalloc ( yy_size_t  size)

Definition at line 38854 of file loader.cpp.

Referenced by yy_create_buffer(), yy_push_state(), yy_scan_buffer(), yy_scan_bytes(), and yyensure_buffer_stack().

+ Here is the caller graph for this function:

◆ yyensure_buffer_stack()

static void yyensure_buffer_stack ( void  )
static

Definition at line 38502 of file loader.cpp.

References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, YY_FATAL_ERROR, yyalloc(), and yyrealloc().

Referenced by if(), yy_switch_to_buffer(), yypush_buffer_state(), and yyrestart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yyfree()

void yyfree ( void *  ptr)

Definition at line 38872 of file loader.cpp.

Referenced by yy_delete_buffer(), and yylex_destroy().

+ Here is the caller graph for this function:

◆ yyget_debug()

int yyget_debug ( void  )

Definition at line 38761 of file loader.cpp.

References yy_flex_debug.

◆ yyget_extra()

YY_EXTRA_TYPE yyget_extra ( void  )

◆ yyget_in()

FILE* yyget_in ( void  )

Get the input stream.

Definition at line 38705 of file loader.cpp.

References yyin.

◆ yyget_leng()

int yyget_leng ( void  )

Get the length of the current token.

Definition at line 38721 of file loader.cpp.

References yyleng.

◆ yyget_lineno()

int yyget_lineno ( void  )

Get the current line number.

Definition at line 38696 of file loader.cpp.

References yylineno.

◆ yyget_out()

FILE* yyget_out ( void  )

Get the output stream.

Definition at line 38713 of file loader.cpp.

References yyout.

◆ yyget_text()

char* yyget_text ( void  )

Get the current token.

Definition at line 38730 of file loader.cpp.

References yytext.

◆ yylex_destroy()

int yylex_destroy ( void  )

Definition at line 38804 of file loader.cpp.

References yy_buffer_stack, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yy_init_globals(), yy_start_stack, yyfree(), and yypop_buffer_state().

+ Here is the call graph for this function:

◆ yypop_buffer_state()

void yypop_buffer_state ( void  )

Removes and deletes the top of the stack, if present. The next element becomes the new top.

Definition at line 38483 of file loader.cpp.

References yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yy_did_buffer_switch_on_eof, and yy_load_buffer_state().

Referenced by yylex_destroy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ yypush_buffer_state()

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.

Parameters
new_bufferThe new state.

Definition at line 38453 of file loader.cpp.

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().

+ Here is the call graph for this function:

◆ yyrealloc()

void * yyrealloc ( void *  ptr,
yy_size_t  size 
)

Definition at line 38859 of file loader.cpp.

Referenced by yy_get_next_buffer(), yy_push_state(), and yyensure_buffer_stack().

+ Here is the caller graph for this function:

◆ yyrestart()

void yyrestart ( FILE *  input_file)

Immediately switch to a different input stream.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .

Definition at line 38287 of file loader.cpp.

Referenced by yy_get_next_buffer().

+ Here is the caller graph for this function:

◆ yyset_debug()

void yyset_debug ( int  debug_flag)

Definition at line 38766 of file loader.cpp.

◆ yyset_extra()

void yyset_extra ( YY_EXTRA_TYPE  user_defined)

◆ yyset_in()

void yyset_in ( FILE *  _in_str)

Set the input stream. This does not discard the current input buffer.

Parameters
_in_strA readable stream.
See also
yy_switch_to_buffer

Definition at line 38751 of file loader.cpp.

◆ yyset_lineno()

void yyset_lineno ( int  _line_number)

Set the current line number.

Parameters
_line_numberline number

Definition at line 38739 of file loader.cpp.

◆ yyset_out()

void yyset_out ( FILE *  _out_str)

Definition at line 38756 of file loader.cpp.

Variable Documentation

◆ lex_error

lex_error = 0
static

Definition at line 35879 of file loader.cpp.

Referenced by while().

◆ lorebuf

char lorebuf[HUGE_BUF]
static

Definition at line 35882 of file loader.cpp.

Referenced by load_object(), load_object_from_reader(), set_variable(), and while().

◆ msgbuf

◆ msglen

size_t msglen = 0

Definition at line 35881 of file loader.cpp.

Referenced by load_object(), load_object_from_reader(), set_variable(), and while().

◆ seen_object

bool seen_object = false
static

Keep track of whether we're currently inside an object...end block. This might have been better designed as a separate start condition, but was added to give a warning when an object started before the previous ended.

Definition at line 35901 of file loader.cpp.

Referenced by while().

◆ total_msglen

size_t total_msglen = 0

Definition at line 35881 of file loader.cpp.

Referenced by load_object(), load_object_from_reader(), set_variable(), and while().

◆ yy_accept

const flex_int16_t yy_accept[2024]
static

Definition at line 35386 of file loader.cpp.

Referenced by while().

◆ yy_act

int yy_act

Definition at line 36426 of file loader.cpp.

Referenced by while().

◆ yy_bp

char * yy_bp

Definition at line 36425 of file loader.cpp.

Referenced by while().

◆ yy_buffer_stack

YY_BUFFER_STATE* yy_buffer_stack = NULL
static

Stack as an array.

Definition at line 252 of file loader.cpp.

Referenced by yy_init_globals(), yyensure_buffer_stack(), and yylex_destroy().

◆ yy_buffer_stack_max

size_t yy_buffer_stack_max = 0
static

capacity of stack.

Definition at line 251 of file loader.cpp.

Referenced by yy_init_globals(), and yyensure_buffer_stack().

◆ yy_buffer_stack_top

size_t yy_buffer_stack_top = 0
static

index of top of stack.

Definition at line 250 of file loader.cpp.

Referenced by yy_init_globals(), yyensure_buffer_stack(), yypop_buffer_state(), and yypush_buffer_state().

◆ yy_c_buf_p

◆ yy_cp

char* yy_cp

Definition at line 36425 of file loader.cpp.

Referenced by while(), and yy_get_previous_state().

◆ YY_DECL

YY_DECL
Initial value:
{
yy_state_type yy_current_state

The main scanner function which does all the work.

Definition at line 36423 of file loader.cpp.

◆ yy_did_buffer_switch_on_eof

int yy_did_buffer_switch_on_eof
static

Definition at line 281 of file loader.cpp.

Referenced by while(), yy_switch_to_buffer(), yypop_buffer_state(), and yypush_buffer_state().

◆ yy_flex_debug

int yy_flex_debug = 0

Definition at line 35841 of file loader.cpp.

Referenced by yyget_debug(), and yyset_debug().

◆ yy_hold_char

char yy_hold_char
static

Definition at line 269 of file loader.cpp.

Referenced by while(), yy_load_buffer_state(), yy_switch_to_buffer(), and yypush_buffer_state().

◆ yy_init

int yy_init = 0
static

Definition at line 275 of file loader.cpp.

Referenced by if(), and yy_init_globals().

◆ yy_n_chars

int yy_n_chars
static

◆ yy_NUL_trans

const yy_state_type yy_NUL_trans[2024]
static

Definition at line 35613 of file loader.cpp.

Referenced by yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_nxt

const flex_int16_t yy_nxt[][128]
static

Definition at line 344 of file loader.cpp.

Referenced by while(), and yy_get_previous_state().

◆ yy_start

int yy_start = 0
static

Definition at line 276 of file loader.cpp.

Referenced by if(), while(), yy_get_previous_state(), and yy_init_globals().

◆ yy_start_stack

int* yy_start_stack = NULL
static

Definition at line 36311 of file loader.cpp.

Referenced by yy_init_globals(), yy_pop_state(), yy_push_state(), and yylex_destroy().

◆ yy_start_stack_depth

int yy_start_stack_depth = 0
static

Definition at line 36310 of file loader.cpp.

Referenced by yy_init_globals(), and yy_push_state().

◆ yy_start_stack_ptr

int yy_start_stack_ptr = 0
static

Definition at line 36309 of file loader.cpp.

Referenced by yy_init_globals(), yy_pop_state(), and yy_push_state().

◆ yyin

FILE* yyin = NULL

◆ yyleng

int yyleng

Definition at line 271 of file loader.cpp.

Referenced by yyget_leng().

◆ yylineno

int yylineno = 1

Definition at line 336 of file loader.cpp.

Referenced by yyget_lineno(), and yyset_lineno().

◆ yyout

FILE * yyout = NULL

Definition at line 160 of file loader.cpp.

Referenced by if(), yy_init_globals(), yyget_out(), and yyset_out().

◆ yytext

char* yytext

Definition at line 35850 of file loader.cpp.

Referenced by add_key_value(), while(), yval(), and yyget_text().

yyleng
int yyleng
Definition: loader.cpp:271
c
static event_registration c
Definition: citylife.cpp:425
yy_bp
char * yy_bp
Definition: loader.cpp:36425
yy_size_t
size_t yy_size_t
Definition: loader.cpp:155
buf
StringBuffer * buf
Definition: readable.cpp:1565
rotate-tower.result
bool result
Definition: rotate-tower.py:13
yy_state_type
int yy_state_type
Definition: loader.cpp:333
yy_hold_char
static char yy_hold_char
Definition: loader.cpp:269
yy_buffer_stack
static YY_BUFFER_STATE * yy_buffer_stack
Definition: loader.cpp:252
yy_cp
char * yy_cp
Definition: loader.cpp:36425
yy_c_buf_p
static char * yy_c_buf_p
Definition: loader.cpp:274
YY_CURRENT_BUFFER
#define YY_CURRENT_BUFFER
Definition: loader.cpp:260
yyin
FILE * yyin
Definition: loader.cpp:331
make_face_from_files.int
int
Definition: make_face_from_files.py:32
yy_buffer_stack_top
static size_t yy_buffer_stack_top
Definition: loader.cpp:250
yytext_ptr
#define yytext_ptr
Definition: loader.cpp:342
YY_BUF_SIZE
#define YY_BUF_SIZE
Definition: loader.cpp:140
YY_MORE_ADJ
#define YY_MORE_ADJ
Definition: loader.cpp:35848
YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER_LVALUE
Definition: loader.cpp:266
yytext
char * yytext
Definition: loader.cpp:35850