home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / 32XLISP.ZIP / XLGLOB.C < prev    next >
C/C++ Source or Header  |  1988-02-11  |  3KB  |  80 lines

  1. /* xlglobals - xlisp global variables */
  2. /*    Copyright (c) 1985, by David Michael Betz
  3.     All Rights Reserved
  4.     Permission is granted for unrestricted non-commercial use    */
  5.  
  6. #include "xlisp.h"
  7.  
  8. /* symbols */
  9. LVAL true=NIL,obarray=NIL;
  10. LVAL s_unbound=NIL,s_dot=NIL;
  11. LVAL s_quote=NIL,s_function=NIL;
  12. LVAL s_bquote=NIL,s_comma=NIL,s_comat=NIL;
  13. LVAL s_evalhook=NIL,s_applyhook=NIL,s_tracelist;
  14. LVAL s_lambda=NIL,s_macro=NIL;
  15. LVAL s_stdin=NIL,s_stdout=NIL,s_stderr=NIL,s_debugio=NIL,s_traceout=NIL;
  16. LVAL s_rtable=NIL;
  17. LVAL s_tracenable=NIL,s_tlimit=NIL,s_breakenable=NIL;
  18. LVAL s_setf=NIL,s_car=NIL,s_cdr=NIL,s_nth=NIL,s_aref=NIL,s_get=NIL;
  19. LVAL s_svalue=NIL,s_sfunction=NIL,s_splist=NIL;
  20. LVAL s_eql=NIL,s_gcflag=NIL,s_gchook=NIL;
  21. LVAL s_ifmt=NIL,s_ffmt=NIL;
  22. LVAL s_1plus=NIL,s_2plus=NIL,s_3plus=NIL;
  23. LVAL s_1star=NIL,s_2star=NIL,s_3star=NIL;
  24. LVAL s_minus=NIL,s_printcase=NIL;
  25.  
  26. /* keywords */
  27. LVAL k_test=NIL,k_tnot=NIL;
  28. LVAL k_wspace=NIL,k_const=NIL,k_nmacro=NIL,k_tmacro=NIL;
  29. LVAL k_sescape=NIL,k_mescape=NIL;
  30. LVAL k_direction=NIL,k_input=NIL,k_output=NIL;
  31. LVAL k_start=NIL,k_end=NIL,k_1start=NIL,k_1end=NIL;
  32. LVAL k_2start=NIL,k_2end=NIL,k_count=NIL,k_key=NIL;
  33. LVAL k_verbose=NIL,k_print=NIL;
  34. LVAL k_upcase=NIL,k_downcase=NIL;
  35.  
  36. /* lambda list keywords */
  37. LVAL lk_optional=NIL,lk_rest=NIL,lk_key=NIL,lk_aux=NIL;
  38. LVAL lk_allow_other_keys=NIL;
  39.  
  40. /* type names */
  41. LVAL a_subr=NIL,a_fsubr=NIL;
  42. LVAL a_cons=NIL,a_symbol=NIL,a_fixnum=NIL,a_flonum=NIL;
  43. LVAL a_string=NIL,a_object=NIL,a_stream=NIL,a_vector=NIL;
  44. LVAL a_closure=NIL,a_char=NIL,a_ustream=NIL;
  45.  
  46. /* evaluation variables */
  47. LVAL **xlstack = NULL,**xlstkbase = NULL,**xlstktop = NULL;
  48. LVAL xlenv=NIL,xlfenv=NIL,xldenv=NIL;
  49.  
  50. /* argument stack */
  51. LVAL *xlargstkbase = NULL;    /* argument stack base */
  52. LVAL *xlargstktop = NULL;    /* argument stack top */
  53. LVAL *xlfp = NULL;        /* argument frame pointer */
  54. LVAL *xlsp = NULL;        /* argument stack pointer */
  55. LVAL *xlargv = NULL;        /* current argument vector */
  56. int xlargc = 0;            /* current argument count */
  57.  
  58. /* exception handling variables */
  59. CONTEXT *xlcontext = NULL;    /* current exception handler */
  60. CONTEXT *xltarget = NULL;    /* target context (for xljump) */
  61. LVAL xlvalue=NIL;        /* exception value (for xljump) */
  62. int xlmask=0;            /* exception type (for xljump) */
  63.  
  64. /* debugging variables */
  65. int xldebug = 0;        /* debug level */
  66. int xlsample = 0;        /* control character sample rate */
  67. int xltrcindent = 0;        /* trace indent level */
  68.  
  69. /* gensym variables */
  70. char gsprefix[STRMAX+1] = { 'G',0 };    /* gensym prefix string */
  71. int gsnumber = 1;        /* gensym number */
  72.  
  73. /* i/o variables */
  74. int xlfsize = 0;        /* flat size of current print call */
  75. FILE *tfp = NULL;        /* transcript file pointer */
  76.  
  77. /* general purpose string buffer */
  78. char buf[STRMAX+1] = { 0 };
  79.  
  80.