#include "conq.h"
#include "kernel.h"
#include "imf.h"
#include "keyword.def"
Include dependency graph for read.c:
Classes | |
struct | a_key |
Defines | |
#define | DEF_KWD(NAME, CODE) { NAME, CODE }, |
#define | TYPEPROP(TYPES, N, DEFNS, I, TYPE) ((TYPE *) &(((char *) (&(TYPES[N])))[DEFNS[I].offset]))[0] |
#define | SYNTAX(X, TEST, MSG) |
#define | SYNTAX_RETURN(X, TEST, MSG, RET) |
#define | TYPECHECK(PRED, X, MSG) |
#define | TYPECHECK_RETURN(PRED, X, MSG, RET) |
#define | PARSE_PROPERTY(BDG, NAME, VAL) |
#define | PARSE_PROPERTY_RETURN(BDG, NAME, VAL, RET) |
#define | INDEXP(typ, x) ((typ == UTYP) ? utypep(x) : ((typ == MTYP) ? mtypep(x) : ((typ == TTYP) ? ttypep(x) : atypep(x)))) |
#define | nonlist(x) (!consp(x) && x != lispnil) |
#define | CHECK_INDEX_1(tbl, x) |
#define | CHECK_INDEX_2(tbl, x) |
#define | CHECK_VALUE(tbl, x) |
#define | CHECK_LISTS(tablename, lis1, lis2) |
#define | CHECK_PERMISSION |
Functions | |
int | keyword_code (char *str) |
char * | keyword_name (enum keywords k) |
void | syntax_error (Obj *x, char *msg) |
void | type_error (Obj *x, char *msg) |
void | init_predefined_symbols (void) |
void | interp_form (Module *module, Obj *form) |
void | interp_game_module (Obj *form, Module *module) |
void | fill_in_side (Side *side, Obj *props, int userdata) |
int | utype_from_name (char *str) |
int | mtype_from_name (char *str) |
int | atype_from_name (char *str) |
int | ttype_from_name (char *str) |
int | utype_from_symbol (Obj *sym) |
void | read_warning (char *str,...) |
int | lookup_task_type (char *name) |
Variables | |
int | actually_read_lisp |
int | nextsideid |
int | force_all_variants = FALSE |
Module * | curmodule |
Obj * | cond_read_stack |
int | midturnrestore = FALSE |
int | numbadterrain = 0 |
int | warnbadterrain = TRUE |
char * | readerrbuf |
Obj * | side_defaults |
int | uxoffset = 0 uyoffset = 0 |
Obj * | unit_specs |
Obj * | last_unit_spec |
Obj * | default_unit_spec |
short | layer_use_default |
int | layer_default |
int | layer_multiplier |
int | layer_adder |
short | layer_area_x |
short | layer_area_y |
short | layer_area_w |
short | layer_area_h |
int | ignore_specials |
a_key | keywordtable [] |
|
Value: if (!INDEXP(tabledefns[tbl].index1, (x))) { \ char errbuf[BUFSIZE]; \ sprintlisp(errbuf, (x), BUFSIZE); \ read_warning("table %s index 1 value `%s' has wrong type, skipping clause", \ tabledefns[tbl].name, errbuf); \ return; \ } |
|
Value: if (!INDEXP(tabledefns[tbl].index2, (x))) { \ char errbuf[BUFSIZE]; \ sprintlisp(errbuf, (x), BUFSIZE); \ read_warning("table %s index 2 value `%s' has wrong type, skipping clause", \ tabledefns[tbl].name, errbuf); \ return; \ } |
|
Value: if (consp(lis2) \ && !list_lengths_match(lis1, lis2, "table", tablename)) { \ return; \ } |
|
Value: if (userdata) { \ permission = FALSE; \ break; \ } |
|
Value: if (!numberishp(x)) { \ read_warning("table %s value is not a number, skipping clause", \ tabledefns[tbl].name); \ return; \ } \ { int checknum = c_number(x); \ if (!between(tabledefns[tbl].lo, checknum, tabledefns[tbl].hi)) { \ read_warning("table %s value %d not within bounds %d to %d, skipping clause", \ tabledefns[tbl].name, checknum, tabledefns[tbl].lo, tabledefns[tbl].hi); \ return; \ } \ } |
|
|
|
|
|
|
|
Value: |
|
Value: |
|
Value: if (!(TEST)) { \ syntax_error((X), (MSG)); \ return; \ } |
|
Value: if (!(TEST)) { \ syntax_error((X), (MSG)); \ return (RET); \ } |
|
Value: if (!PRED(X)) { \ type_error((X), (MSG)); \ return; \ } |
|
Value: if (!PRED(X)) { \ type_error((X), (MSG)); \ return (RET); \ } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mid turn restore flag. ??? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|