Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lisp.c File Reference

#include "config.h"
#include "misc.h"
#include "lisp.h"
#include "game.h"

Include dependency graph for lisp.c:

Include dependency graph

Namespaces

namespace  Xconq

Defines

#define BIGBUF   1000
#define CONSIFY_IF_NUMBER(lispeval, lisptmp)   (numberp((lisptmp) = (lispeval)) ? cons(lisptmp, lispnil) : lisptmp)

Functions

void init_lisp (void)
Obj * read_form (FILE *fp, int *p1, int *p2)
Obj * read_form_from_string (char *str, int *p1, int *p2, char **endstr)
int length (Obj *list)
Obj * new_string (char *str)
Obj * new_number (int num)
Obj * new_utype (int u)
Obj * new_mtype (int m)
Obj * new_ttype (int t)
Obj * new_atype (int a)
Obj * new_pointer (Obj *sym, char *ptr)
Obj * cons (Obj *x, Obj *y)
void type_warning (char *funname, Obj *x, char *errtype, Obj *subst)
Obj * car (Obj *x)
Obj * cdr (Obj *x)
Obj * cadr (Obj *x)
Obj * cddr (Obj *x)
Obj * caddr (Obj *x)
Obj * cdddr (Obj *x)
void set_cdr (Obj *x, Obj *v)
char * c_string (Obj *x)
int c_number (Obj *x)
Obj * intern_symbol (char *str)
Obj * symbol_value (Obj *sym)
Obj * setq (Obj *sym, Obj *x)
void makunbound (Obj *sym)
void flag_as_constant (Obj *sym)
int constantp (Obj *sym)
int numberp (Obj *x)
int stringp (Obj *x)
int symbolp (Obj *x)
int consp (Obj *x)
int utypep (Obj *x)
int mtypep (Obj *x)
int ttypep (Obj *x)
int atypep (Obj *x)
int pointerp (Obj *x)
int boundp (Obj *sym)
int numberishp (Obj *x)
int listp (Obj *x)
int equal (Obj *x, Obj *y)
int member (Obj *x, Obj *lis)
Obj * elt (Obj *lis, int n)
Obj * reverse (Obj *lis)
Obj * find_at_key (Obj *lis, char *key)
Obj * replace_at_key (Obj *lis, char *key, Obj *newval)
int is_quoted_lisp (Obj *x)
void fprint_num_or_dice (FILE *fp, int x, int valtype)
 Print dice spec or a straight integer.

void fprinttable (FILE *fp, int n)
void fprintlisp (FILE *fp, Obj *oobj)
void fprint_list (FILE *fp, Obj *obj)
void sprintlisp (char *buf, Obj *obj, int maxlen)
void sprint_list (char *buf, Obj *obj, int maxlen)
char * escaped_symbol (char *str)
char * escaped_string (char *str)
char * safe_escaped_string (char *str, int len)
void dlisp (Obj *x)
void print_form_and_value (FILE *fp, Obj *form)
Obj * append_two_lists (Obj *x1, Obj *x2)
Obj * append_lists (Obj *lis)
Obj * remove_from_list (Obj *element, Obj *lis)
Obj * remove_list_from_list (Obj *rlist, Obj *slist)
void push_binding (Obj **lis, Obj *key, Obj *val)
void push_cdr_binding (Obj **lis, Obj *key, Obj *val)
void push_int_binding (Obj **lis, Obj *key, int val)
void push_key_binding (Obj **lis, int key, Obj *val)
void push_key_cdr_binding (Obj **lis, int key, Obj *val)
void push_key_int_binding (Obj **lis, int key, int val)
Obj * eval (Obj *x)
Obj * eval_symbol (Obj *sym)
Obj * eval_list (Obj *lis)
Obj * eval_boolean_expression (Obj *expr)
int eval_boolean_expression (Obj *expr, int(*fn)(Obj *), int dflt)
int eval_boolean_expression (Obj *expr, int(*fn)(Obj *, ParamBox *), int dflt, ParamBox *pbox)
int eval_number (Obj *val, int *isnumber)
Obj * eval_arithmetic_expression (Obj *expr)
Obj * eval_arithmetic_comparison_expression (Obj *expr)
Obj * choose_from_weighted_list (Obj *lis, int *totalweightp, int flat)
int interpolate_in_list (int val, Obj *lis, int *rslt)
int interpolate_in_list_ext (int val, Obj *lis, int mindo, int minval, int minrslt, int maxdo, int maxval, int maxrslt, int *rslt)
void interp_short_array (short *arr, Obj *lis, int n)
void interp_long_array (long *arr, Obj *lis, int n)
char * get_string (Obj *lis)

Variables

Obj * lispnil
 Lisp nil object pointer.

Obj * lispeof
 Lisp end-of-file.

Obj * lispclosingparen
Obj * lispunbound
int numsymbols = 0
int lispmalloc = 0
int commentdepth = 0
int actually_read_lisp = TRUE

Define Documentation

#define BIGBUF   1000
 

#define CONSIFY_IF_NUMBER (  lispeval,
lisptmp   )     (numberp((lisptmp) = (lispeval)) ? cons(lisptmp, lispnil) : lisptmp)
 


Function Documentation

Obj* append_lists (  Obj *  lis  ) 
 

Obj* append_two_lists (  Obj *  x1,
Obj *  x2
) 
 

int atypep (  Obj *  x  ) 
 

int boundp (  Obj *  sym  ) 
 

int c_number (  Obj *  x  ) 
 

char* c_string (  Obj *  x  ) 
 

Obj* caddr (  Obj *  x  ) 
 

Obj* cadr (  Obj *  x  ) 
 

Obj* car (  Obj *  x  ) 
 

Obj* cdddr (  Obj *  x  ) 
 

Obj* cddr (  Obj *  x  ) 
 

Obj* cdr (  Obj *  x  ) 
 

Obj* choose_from_weighted_list (  Obj *  lis,
int *  totalweightp,
int  flat
) 
 

Obj* cons (  Obj *  x,
Obj *  y
) 
 

int consp (  Obj *  x  ) 
 

int constantp (  Obj *  sym  ) 
 

void dlisp (  Obj *  x  ) 
 

Obj* elt (  Obj *  lis,
int  n
) 
 

int equal (  Obj *  x,
Obj *  y
) 
 

char* escaped_string (  char *  str  ) 
 

char* escaped_symbol (  char *  str  ) 
 

Obj* eval (  Obj *  x  ) 
 

Obj* eval_arithmetic_comparison_expression (  Obj *  expr  ) 
 

Obj* eval_arithmetic_expression (  Obj *  expr  ) 
 

int eval_boolean_expression (  Obj *  expr,
int(*  fn)(Obj *, ParamBox *),
int  dflt,
ParamBox *  pbox
) 
 

int eval_boolean_expression (  Obj *  expr,
int(*  fn)(Obj *),
int  dflt
) 
 

Obj* eval_boolean_expression (  Obj *  expr  ) 
 

Obj* eval_list (  Obj *  lis  ) 
 

int eval_number (  Obj *  val,
int *  isnumber
) 
 

Obj* eval_symbol (  Obj *  sym  ) 
 

Obj* find_at_key (  Obj *  lis,
char *  key
) 
 

void flag_as_constant (  Obj *  sym  ) 
 

void fprint_list (  FILE *  fp,
Obj *  obj
) 
 

void fprint_num_or_dice (  FILE *  fp,
int  x,
int  valtype
) 
 

Print dice spec or a straight integer.

void fprintlisp (  FILE *  fp,
Obj *  oobj
) 
 

void fprinttable (  FILE *  fp,
int  n
) 
 

char* get_string (  Obj *  lis  ) 
 

void init_lisp (  void   ) 
 

Obj* intern_symbol (  char *  str  ) 
 

void interp_long_array (  long *  arr,
Obj *  lis,
int  n
) 
 

void interp_short_array (  short *  arr,
Obj *  lis,
int  n
) 
 

int interpolate_in_list (  int  val,
Obj *  lis,
int *  rslt
) 
 

int interpolate_in_list_ext (  int  val,
Obj *  lis,
int  mindo,
int  minval,
int  minrslt,
int  maxdo,
int  maxval,
int  maxrslt,
int *  rslt
) 
 

int is_quoted_lisp (  Obj *  x  ) 
 

int length (  Obj *  list  ) 
 

int listp (  Obj *  x  ) 
 

void makunbound (  Obj *  sym  ) 
 

int member (  Obj *  x,
Obj *  lis
) 
 

int mtypep (  Obj *  x  ) 
 

Obj* new_atype (  int  a  ) 
 

Obj* new_mtype (  int  m  ) 
 

Obj* new_number (  int  num  ) 
 

Obj* new_pointer (  Obj *  sym,
char *  ptr
) 
 

Obj* new_string (  char *  str  ) 
 

Obj* new_ttype (  int  t  ) 
 

Obj* new_utype (  int  u  ) 
 

int numberishp (  Obj *  x  ) 
 

int numberp (  Obj *  x  ) 
 

int pointerp (  Obj *  x  ) 
 

void print_form_and_value (  FILE *  fp,
Obj *  form
) 
 

void push_binding (  Obj **  lis,
Obj *  key,
Obj *  val
) 
 

void push_cdr_binding (  Obj **  lis,
Obj *  key,
Obj *  val
) 
 

void push_int_binding (  Obj **  lis,
Obj *  key,
int  val
) 
 

void push_key_binding (  Obj **  lis,
int  key,
Obj *  val
) 
 

void push_key_cdr_binding (  Obj **  lis,
int  key,
Obj *  val
) 
 

void push_key_int_binding (  Obj **  lis,
int  key,
int  val
) 
 

Obj* read_form (  FILE *  fp,
int *  p1,
int *  p2
) 
 

Obj* read_form_from_string (  char *  str,
int *  p1,
int *  p2,
char **  endstr
) 
 

Obj* remove_from_list (  Obj *  element,
Obj *  lis
) 
 

Obj* remove_list_from_list (  Obj *  rlist,
Obj *  slist
) 
 

Obj* replace_at_key (  Obj *  lis,
char *  key,
Obj *  newval
) 
 

Obj* reverse (  Obj *  lis  ) 
 

char* safe_escaped_string (  char *  str,
int  len
) 
 

void set_cdr (  Obj *  x,
Obj *  v
) 
 

Obj* setq (  Obj *  sym,
Obj *  x
) 
 

void sprint_list (  char *  buf,
Obj *  obj,
int  maxlen
) 
 

void sprintlisp (  char *  buf,
Obj *  obj,
int  maxlen
) 
 

int stringp (  Obj *  x  ) 
 

Obj* symbol_value (  Obj *  sym  ) 
 

int symbolp (  Obj *  x  ) 
 

int ttypep (  Obj *  x  ) 
 

void type_warning (  char *  funname,
Obj *  x,
char *  errtype,
Obj *  subst
) 
 

int utypep (  Obj *  x  ) 
 


Variable Documentation

int actually_read_lisp = TRUE
 

int commentdepth = 0
 

Obj* lispclosingparen
 

Obj* lispeof
 

Lisp end-of-file.

int lispmalloc = 0
 

Obj* lispnil
 

Lisp nil object pointer.

Obj* lispunbound
 

int numsymbols = 0
 


Generated on Sat Sep 17 10:29:17 2005 for XconqKernel by doxygen 1.3.6