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.

Classes

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 SCRIPT   3
 
#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   224
 
#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   223
 
#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 [2020]
 
int yy_act
 
static const flex_int16_t yy_base [2342]
 
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
 
static const flex_int16_t yy_chk [3739]
 
char * yy_cp
 
 YY_DECL
 
static const flex_int16_t yy_def [2342]
 
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 [60]
 
static int yy_n_chars
 
static const flex_int16_t yy_nxt [3739]
 
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 2485 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 2046 of file loader.cpp.

◆ INITIAL

#define INITIAL   0

Definition at line 2381 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 2044 of file loader.cpp.

◆ LORE

#define LORE   2

Definition at line 2383 of file loader.cpp.

◆ MAXDEPTH

#define MAXDEPTH   10

◆ MESSAGE

#define MESSAGE   1

Definition at line 2382 of file loader.cpp.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 1998 of file loader.cpp.

◆ SCRIPT

#define SCRIPT   3

Definition at line 2384 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 2037 of file loader.cpp.

◆ SET_RESIST

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

Definition at line 2040 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 2564 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 2027 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 352 of file loader.cpp.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   224

Definition at line 359 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 4858 of file loader.cpp.

◆ YY_EXTRA_TYPE

#define YY_EXTRA_TYPE   void *

Definition at line 2395 of file loader.cpp.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 2539 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 2492 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 2000 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 2378 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   223

Definition at line 358 of file loader.cpp.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 2476 of file loader.cpp.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 2001 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 2567 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 2534 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 2559 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 4870 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 4870 of file loader.cpp.

◆ yymore

#define yymore ( )    yymore_used_but_not_detected

Definition at line 1999 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 5070 of file loader.cpp.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 2529 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 2255 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 2130 of file loader.cpp.

References add_string(), arch_init, 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 5267 of file loader.cpp.

References YY_CURRENT_BUFFER, and yy_delete_buffer().

Here is the call graph for this function:

◆ if()

if ( yy_init)

Definition at line 2581 of file loader.cpp.

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.

Here is the call graph for this function:

◆ 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 5137 of file loader.cpp.

References artifact_init, 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().

Here is the call 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 5189 of file loader.cpp.

References arch_init, artifact_init, 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().

Here is the call 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 2061 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 2079 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 2100 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 2326 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 5240 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().

Here is the call graph for this function:

◆ while()

while ( )
Todo:
fix evil const cast

Definition at line 2621 of file loader.cpp.

References add_button_link(), add_friendly_object(), add_key_value(), add_string(), arch_init, artifact_init, 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, 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(), SCRIPT, 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_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(), yyin, yytext, yytext_ptr, and yywrap.

Here is the call 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 5083 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 4542 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 4570 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 4861 of file loader.cpp.

References exit(), navar-midane_pickup::msg, and YY_EXIT_FAILURE.

Here is the call graph for this function:

◆ 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 4617 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 4339 of file loader.cpp.

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:

◆ yy_init_buffer()

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

Definition at line 4589 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 4964 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 4528 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 4849 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 4824 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 4744 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 4794 of file loader.cpp.

References Ice::b, buf, n, 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 4781 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 4497 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 4372 of file loader.cpp.

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:

◆ yyalloc()

void* yyalloc ( yy_size_t  size)

Definition at line 5047 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 4695 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 5065 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 4954 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 4898 of file loader.cpp.

References yyin.

◆ yyget_leng()

int yyget_leng ( void  )

Get the length of the current token.

Definition at line 4914 of file loader.cpp.

References yyleng.

◆ yyget_lineno()

int yyget_lineno ( void  )

Get the current line number.

Definition at line 4889 of file loader.cpp.

References yylineno.

◆ yyget_out()

FILE* yyget_out ( void  )

Get the output stream.

Definition at line 4906 of file loader.cpp.

References yyout.

◆ yyget_text()

char* yyget_text ( void  )

Get the current token.

Definition at line 4923 of file loader.cpp.

References yytext.

◆ yylex_destroy()

int yylex_destroy ( void  )

Definition at line 4997 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 4676 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 4646 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 5052 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 4480 of file loader.cpp.

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.

Referenced by yy_get_next_buffer().

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

◆ yyset_debug()

void yyset_debug ( int  debug_flag)

Definition at line 4959 of file loader.cpp.

References yy_flex_debug.

◆ 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 4944 of file loader.cpp.

References yyin.

◆ yyset_lineno()

void yyset_lineno ( int  _line_number)

Set the current line number.

Parameters
_line_numberline number

Definition at line 4932 of file loader.cpp.

References yylineno.

◆ yyset_out()

void yyset_out ( FILE *  _out_str)

Definition at line 4949 of file loader.cpp.

References yyout.

Variable Documentation

◆ lex_error

lex_error = 0
static

Definition at line 2031 of file loader.cpp.

Referenced by while().

◆ lorebuf

char lorebuf[HUGE_BUF]
static

Definition at line 2034 of file loader.cpp.

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

◆ msgbuf

char msgbuf[HUGE_BUF]
static

Definition at line 2032 of file loader.cpp.

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

◆ msglen

size_t msglen = 0

Definition at line 2033 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 2053 of file loader.cpp.

Referenced by while().

◆ total_msglen

size_t total_msglen = 0

Definition at line 2033 of file loader.cpp.

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

◆ yy_accept

const flex_int16_t yy_accept[2020]
static

Definition at line 367 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_act

int yy_act

Definition at line 2579 of file loader.cpp.

Referenced by while().

◆ yy_base

const flex_int16_t yy_base[2342]
static

Definition at line 635 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_bp

char * yy_bp

Definition at line 2578 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_chk

const flex_int16_t yy_chk[3739]
static

Definition at line 1574 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_cp

char* yy_cp

Definition at line 2578 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ YY_DECL

YY_DECL
Initial value:
{
yy_state_type yy_current_state

The main scanner function which does all the work.

Definition at line 2576 of file loader.cpp.

◆ yy_def

const flex_int16_t yy_def[2342]
static

Definition at line 897 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ 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_ec

const YY_CHAR yy_ec[256]
static

Definition at line 593 of file loader.cpp.

Referenced by while(), and yy_get_previous_state().

◆ yy_flex_debug

int yy_flex_debug = 0

Definition at line 1993 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_last_accepting_cpos

char* yy_last_accepting_cpos
static

Definition at line 1990 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_last_accepting_state

yy_state_type yy_last_accepting_state
static

Definition at line 1989 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_meta

const YY_CHAR yy_meta[60]
static
Initial value:
=
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1
}

Definition at line 625 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_n_chars

int yy_n_chars
static

◆ yy_nxt

const flex_int16_t yy_nxt[3739]
static

Definition at line 1159 of file loader.cpp.

Referenced by while(), yy_get_previous_state(), and yy_try_NUL_trans().

◆ 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 2464 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 2463 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 2462 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 2002 of file loader.cpp.

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

yyleng
int yyleng
Definition: loader.cpp:271
n
based on the size of the this randomly makes land number of spaces randomly lower or higher The default is Note that this is run also based on the the altitude amount will likely be less So if you do something like l and n
Definition: land.6.txt:25
c
static event_registration c
Definition: citylife.cpp:425
yy_size_t
size_t yy_size_t
Definition: loader.c:154
yy_bp
char * yy_bp
Definition: loader.cpp:2578
yy_state_type
int yy_state_type
Definition: loader.c:332
buf
StringBuffer * buf
Definition: readable.cpp:1552
rotate-tower.result
bool result
Definition: rotate-tower.py:13
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:2578
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:2000
YY_CURRENT_BUFFER_LVALUE
#define YY_CURRENT_BUFFER_LVALUE
Definition: loader.cpp:266
yytext
char * yytext
Definition: loader.cpp:2002