home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / XLSP21TC.ZIP / XLSPEED.DIF / text0001.txt < prev   
Encoding:
Text File  |  1991-04-14  |  23.4 KB  |  917 lines

  1. diff -c ../xlisp.org/xlftab.c ../xlisp/xlftab.c
  2. *** ../xlisp.org/xlftab.c    Sun May  7 22:25:54 1989
  3. --- ../xlisp/xlftab.c    Wed Apr  5 16:18:28 1989
  4. ***************
  5. *** 11,17 ****
  6.       rmhash(),rmquote(),rmdquote(),rmbquote(),rmcomma(),
  7.       clnew(),clisnew(),clanswer(),
  8.       obisnew(),obclass(),obshow(),
  9. !     rmlpar(),rmrpar(),rmsemi(),
  10.       xeval(),xapply(),xfuncall(),xquote(),xfunction(),xbquote(),
  11.       xlambda(),xset(),xsetq(),xsetf(),xdefun(),xdefmacro(),
  12.       xgensym(),xmakesymbol(),xintern(),
  13. --- 11,17 ----
  14.       rmhash(),rmquote(),rmdquote(),rmbquote(),rmcomma(),
  15.       clnew(),clisnew(),clanswer(),
  16.       obisnew(),obclass(),obshow(),
  17. !     rmlpar(),rmrpar(),rmlbrace(),rmrbrace(),rmsemi(),
  18.       xeval(),xapply(),xfuncall(),xquote(),xfunction(),xbquote(),
  19.       xlambda(),xset(),xsetq(),xsetf(),xdefun(),xdefmacro(),
  20.       xgensym(),xmakesymbol(),xintern(),
  21. ***************
  22. *** 70,76 ****
  23.       xcharp(),xcharint(),xintchar(),
  24.       xmkstrinput(),xmkstroutput(),xgetstroutput(),xgetlstoutput(),
  25.       xgetlambda(),xmacroexpand(),x1macroexpand(),
  26. !     xtrace(),xuntrace();
  27.   
  28.   /* functions specific to xldmem.c */
  29.   LVAL xgc(),xexpand(),xalloc(),xmem();
  30. --- 70,76 ----
  31.       xcharp(),xcharint(),xintchar(),
  32.       xmkstrinput(),xmkstroutput(),xgetstroutput(),xgetlstoutput(),
  33.       xgetlambda(),xmacroexpand(),x1macroexpand(),
  34. !     xtrace(),xuntrace(),xcopyarray();
  35.   
  36.   /* functions specific to xldmem.c */
  37.   LVAL xgc(),xexpand(),xalloc(),xmem();
  38. ***************
  39. *** 90,96 ****
  40.   
  41.   /* the function table */
  42.   FUNDEF funtab[] = {
  43.       /* read macro functions */
  44.   {    NULL,                S, rmhash        }, /*   0 */
  45.   {    NULL,                S, rmquote        }, /*   1 */
  46. --- 90,95 ----
  47. ***************
  48. *** 100,107 ****
  49.   {    NULL,                S, rmlpar        }, /*   5 */
  50.   {    NULL,                S, rmrpar        }, /*   6 */
  51.   {    NULL,                S, rmsemi        }, /*   7 */
  52. ! {    NULL,                S, xnotimp        }, /*   8 */
  53. ! {    NULL,                S, xnotimp        }, /*   9 */
  54.   
  55.       /* methods */
  56.   {    NULL,                S, clnew        }, /*  10 */
  57. --- 99,106 ----
  58.   {    NULL,                S, rmlpar        }, /*   5 */
  59.   {    NULL,                S, rmrpar        }, /*   6 */
  60.   {    NULL,                S, rmsemi        }, /*   7 */
  61. ! {    NULL,                S, rmlbrace        }, /*   8 */
  62. ! {    NULL,                S, rmrbrace        }, /*   9 */
  63.   
  64.       /* methods */
  65.   {    NULL,                S, clnew        }, /*  10 */
  66. ***************
  67. *** 426,432 ****
  68.   {    "SORT",                S, xsort        }, /* 284 */
  69.   
  70.       /* extra table entries */
  71. ! {    NULL,                S, xnotimp        }, /* 285 */
  72.   {    NULL,                S, xnotimp        }, /* 286 */
  73.   {    NULL,                S, xnotimp        }, /* 287 */
  74.   {    NULL,                S, xnotimp        }, /* 288 */
  75. --- 425,431 ----
  76.   {    "SORT",                S, xsort        }, /* 284 */
  77.   
  78.       /* extra table entries */
  79. ! {    "COPY-ARRAY",            S, xcopyarray        }, /* 285 */
  80.   {    NULL,                S, xnotimp        }, /* 286 */
  81.   {    NULL,                S, xnotimp        }, /* 287 */
  82.   {    NULL,                S, xnotimp        }, /* 288 */
  83. ***************
  84. *** 447,453 ****
  85.   
  86.   {0,0,0} /* end of table marker */
  87.   
  88. ! };            
  89.   
  90.   /* xnotimp - function table entries that are currently not implemented */
  91.   LOCAL LVAL xnotimp()
  92. --- 446,452 ----
  93.   
  94.   {0,0,0} /* end of table marker */
  95.   
  96. ! };
  97.   
  98.   /* xnotimp - function table entries that are currently not implemented */
  99.   LOCAL LVAL xnotimp()
  100. diff -c ../xlisp.org/xlglob.c ../xlisp/xlglob.c
  101. *** ../xlisp.org/xlglob.c    Sun May  7 22:25:55 1989
  102. --- ../xlisp/xlglob.c    Wed Apr  5 16:18:28 1989
  103. ***************
  104. *** 22,27 ****
  105. --- 22,28 ----
  106.   LVAL s_1plus=NIL,s_2plus=NIL,s_3plus=NIL;
  107.   LVAL s_1star=NIL,s_2star=NIL,s_3star=NIL;
  108.   LVAL s_minus=NIL,s_printcase=NIL;
  109. + LVAL s_send=NIL,s_sendsuper=NIL;
  110.   
  111.   /* keywords */
  112.   LVAL k_test=NIL,k_tnot=NIL;
  113. diff -c ../xlisp.org/xlimage.c ../xlisp/xlimage.c
  114. *** ../xlisp.org/xlimage.c    Sun May  7 22:25:57 1989
  115. --- ../xlisp/xlimage.c    Wed Apr  5 16:18:28 1989
  116. ***************
  117. *** 22,28 ****
  118.   /* external procedures */
  119.   extern SEGMENT *newsegment();
  120.   extern FILE *osbopen();
  121. ! extern char *malloc();
  122.   
  123.   /* forward declarations */
  124.   OFFTYPE readptr();
  125. --- 22,28 ----
  126.   /* external procedures */
  127.   extern SEGMENT *newsegment();
  128.   extern FILE *osbopen();
  129. ! extern char *xlmalloc();
  130.   
  131.   /* forward declarations */
  132.   OFFTYPE readptr();
  133. ***************
  134. *** 170,176 ****
  135.       case USTREAM:
  136.           p = cviptr(off);
  137.           p->n_type = type;
  138. -         p->n_flags = 0;
  139.           rplaca(p,cviptr(readptr()));
  140.           rplacd(p,cviptr(readptr()));
  141.           off += 2;
  142. --- 170,175 ----
  143. ***************
  144. *** 192,198 ****
  145.           case VECTOR:
  146.           case CLOSURE:
  147.           max = getsize(p);
  148. !         if ((p->n_vdata = (LVAL *)malloc(max * sizeof(LVAL))) == NULL)
  149.               xlfatal("insufficient memory - vector");
  150.           total += (long)(max * sizeof(LVAL));
  151.           for (i = 0; i < max; ++i)
  152. --- 191,197 ----
  153.           case VECTOR:
  154.           case CLOSURE:
  155.           max = getsize(p);
  156. !         if ((p->n_vdata = (LVAL *)xlmalloc(max * sizeof(LVAL))) == NULL)
  157.               xlfatal("insufficient memory - vector");
  158.           total += (long)(max * sizeof(LVAL));
  159.           for (i = 0; i < max; ++i)
  160. ***************
  161. *** 200,206 ****
  162.           break;
  163.           case STRING:
  164.           max = getslength(p);
  165. !         if ((p->n_string = (unsigned char *)malloc(max)) == NULL)
  166.               xlfatal("insufficient memory - string");
  167.           total += (long)max;
  168.           for (cp = getstring(p); --max >= 0; )
  169. --- 199,205 ----
  170.           break;
  171.           case STRING:
  172.           max = getslength(p);
  173. !         if ((p->n_string = (unsigned char *)xlmalloc(max)) == NULL)
  174.               xlfatal("insufficient memory - string");
  175.           total += (long)max;
  176.           for (cp = getstring(p); --max >= 0; )
  177. ***************
  178. *** 247,257 ****
  179.           case VECTOR:
  180.           case CLOSURE:
  181.           if (p->n_vsize)
  182. !             free(p->n_vdata);
  183.           break;
  184.           case STRING:
  185.           if (getslength(p))
  186. !             free(getstring(p));
  187.           break;
  188.           case STREAM:
  189.           if ((fp = getfile(p)) && (fp != stdin && fp != stdout))
  190. --- 246,256 ----
  191.           case VECTOR:
  192.           case CLOSURE:
  193.           if (p->n_vsize)
  194. !             xlfree(p->n_vdata);
  195.           break;
  196.           case STRING:
  197.           if (getslength(p))
  198. !             xlfree(getstring(p));
  199.           break;
  200.           case STREAM:
  201.           if ((fp = getfile(p)) && (fp != stdin && fp != stdout))
  202. ***************
  203. *** 259,265 ****
  204.           break;
  205.           }
  206.       next = seg->sg_next;
  207. !     free(seg);
  208.       }
  209.   }
  210.   
  211. --- 258,264 ----
  212.           break;
  213.           }
  214.       next = seg->sg_next;
  215. !     xlfree(seg);
  216.       }
  217.   }
  218.   
  219. ***************
  220. *** 302,308 ****
  221.       char *p = (char *)&node->n_info;
  222.       int n = sizeof(union ninfo);
  223.       node->n_type = type;
  224. -     node->n_flags = 0;
  225.       while (--n >= 0)
  226.       *p++ = osbgetc(fp);
  227.   }
  228. --- 301,306 ----
  229. diff -c ../xlisp.org/xlinit.c ../xlisp/xlinit.c
  230. *** ../xlisp.org/xlinit.c    Sun May  7 22:25:59 1989
  231. --- ../xlisp/xlinit.c    Wed Apr  5 16:18:29 1989
  232. ***************
  233. *** 27,32 ****
  234. --- 27,33 ----
  235.   extern LVAL a_fixnum,a_flonum,a_string,a_stream,a_object;
  236.   extern LVAL a_vector,a_closure,a_char,a_ustream;
  237.   extern LVAL s_gcflag,s_gchook;
  238. + extern LVAL s_send,s_sendsuper;
  239.   extern FUNDEF funtab[];
  240.   
  241.   /* xlinit - xlisp initialization routine */
  242. ***************
  243. *** 106,111 ****
  244. --- 107,114 ----
  245.       s_eql    = xlenter("EQL");
  246.       s_ifmt    = xlenter("*INTEGER-FORMAT*");
  247.       s_ffmt    = xlenter("*FLOAT-FORMAT*");
  248. +     s_send    = xlenter("SEND");
  249. +     s_sendsuper = xlenter("SEND-SUPER");
  250.   
  251.       /* symbols set by the read-eval-print loop */
  252.       s_1plus    = xlenter("+");
  253. diff -c ../xlisp.org/xlisp.c ../xlisp/xlisp.c
  254. *** ../xlisp.org/xlisp.c    Sun May  7 22:26:02 1989
  255. --- ../xlisp/xlisp.c    Thu Apr  6 10:06:46 1989
  256. ***************
  257. *** 6,12 ****
  258.   #include "xlisp.h"
  259.   
  260.   /* define the banner line string */
  261. ! #define BANNER    "XLISP version 2.0, Copyright (c) 1988, by David Betz"
  262.   
  263.   /* global variables */
  264.   jmp_buf top_level;
  265. --- 6,12 ----
  266.   #include "xlisp.h"
  267.   
  268.   /* define the banner line string */
  269. ! #define BANNER    "XLISP version 2.0w, Copyright (c) 1988, by David Betz"
  270.   
  271.   /* global variables */
  272.   jmp_buf top_level;
  273. ***************
  274. *** 52,60 ****
  275.           }
  276.   #endif
  277.   
  278.       /* initialize and print the banner line */
  279.       osinit(BANNER);
  280.       /* setup initialization error handler */
  281.       xlbegin(&cntxt,CF_TOPLEVEL|CF_CLEANUP|CF_BRKLEVEL,(LVAL)1);
  282.       if (setjmp(cntxt.c_jmpbuf))
  283. --- 52,63 ----
  284.           }
  285.   #endif
  286.   
  287. + #ifdef    X11
  288. +     parse_args(&argc,argv);
  289. + #endif
  290.       /* initialize and print the banner line */
  291.       osinit(BANNER);
  292.       /* setup initialization error handler */
  293.       xlbegin(&cntxt,CF_TOPLEVEL|CF_CLEANUP|CF_BRKLEVEL,(LVAL)1);
  294.       if (setjmp(cntxt.c_jmpbuf))
  295. ***************
  296. *** 61,67 ****
  297.       xlfatal("fatal initialization error");
  298.       if (setjmp(top_level))
  299.       xlfatal("RESTORE not allowed during initialization");
  300.       /* initialize xlisp */
  301.       xlinit();
  302.       xlend(&cntxt);
  303. --- 64,69 ----
  304. diff -c ../xlisp.org/xlisp.h ../xlisp/xlisp.h
  305. *** ../xlisp.org/xlisp.h    Sun May  7 22:26:12 1989
  306. --- ../xlisp/xlisp.h    Wed Apr  5 16:23:51 1989
  307. ***************
  308. *** 4,10 ****
  309.       Permission is granted for unrestricted non-commercial use    */
  310.   
  311.   /* system specific definitions */
  312. ! /* #define UNIX */
  313.   
  314.   #include <stdio.h>
  315.   #include <ctype.h>
  316. --- 4,11 ----
  317.       Permission is granted for unrestricted non-commercial use    */
  318.   
  319.   /* system specific definitions */
  320. ! #define X11
  321. ! /* #define    ADEBUG */
  322.   
  323.   #include <stdio.h>
  324.   #include <ctype.h>
  325. ***************
  326. *** 24,29 ****
  327. --- 25,35 ----
  328.   /* OFFTYPE    number the size of an address (int) */
  329.   
  330.   /* for the BSD 4.3 system.  Might work for AT&T garbage */
  331. + #ifdef    X11
  332. + #define    UNIX
  333. + #define WINDOWS
  334. + #endif
  335.   #ifdef UNIX
  336.   #define NNODES        2000
  337.   #define SAVERESTORE
  338. ***************
  339. *** 82,87 ****
  340. --- 88,105 ----
  341.   #define OFFTYPE        long
  342.   #endif
  343.   
  344. + #ifdef MSW
  345. + #define NNODES        1000
  346. + #define AFMT        "%lx"
  347. + #define OFFTYPE        long
  348. + #define    WINDOWS
  349. + #define    VMEM
  350. + #define    MSC
  351. + #define    xlmalloc    WMalloc
  352. + #define    xlcalloc    WCalloc
  353. + #define    xlfree        WFree
  354. + #endif
  355.   /* for the Mark Williams C compiler - Atari ST */
  356.   #ifdef MWC
  357.   #define AFMT        "%lx"
  358. ***************
  359. *** 148,153 ****
  360. --- 166,176 ----
  361.   #ifndef UCHAR
  362.   #define UCHAR        unsigned char
  363.   #endif
  364. + #ifndef    xlmalloc
  365. + #define    xlmalloc    malloc
  366. + #define    xlcalloc    calloc
  367. + #define    xlfree        free
  368. + #endif
  369.   
  370.   /* useful definitions */
  371.   #define TRUE    1
  372. ***************
  373. *** 160,166 ****
  374.   #include "xldmem.h"
  375.   
  376.   /* program limits */
  377. ! #define STRMAX        100        /* maximum length of a string constant */
  378.   #define HSIZE        199        /* symbol hash table size */
  379.   #define SAMPLE        100        /* control character sample rate */
  380.   
  381. --- 183,189 ----
  382.   #include "xldmem.h"
  383.   
  384.   /* program limits */
  385. ! #define STRMAX        512        /* maximum length of a string constant */
  386.   #define HSIZE        199        /* symbol hash table size */
  387.   #define SAMPLE        100        /* control character sample rate */
  388.   
  389. ***************
  390. *** 173,178 ****
  391. --- 196,203 ----
  392.   #define FT_RMLPAR    5
  393.   #define FT_RMRPAR    6
  394.   #define FT_RMSEMI    7
  395. + #define    FT_RMLBRACE    8
  396. + #define    FT_RMRBRACE    9
  397.   #define FT_CLNEW    10
  398.   #define FT_CLISNEW    11
  399.   #define FT_CLANSWER    12
  400. ***************
  401. *** 179,191 ****
  402.   #define FT_OBISNEW    13
  403.   #define FT_OBCLASS    14
  404.   #define FT_OBSHOW    15
  405. !     
  406.   /* macro to push a value onto the argument stack */
  407.   #define pusharg(x)    {if (xlsp >= xlargstktop) xlargstkoverflow();\
  408. !              *xlsp++ = (x);}
  409.   
  410.   /* macros to protect pointers */
  411. ! #define xlstkcheck(n)    {if (xlstack - (n) < xlstkbase) xlstkoverflow();}
  412.   #define xlsave(n)    {*--xlstack = &n; n = NIL;}
  413.   #define xlprotect(n)    {*--xlstack = &n;}
  414.   
  415. --- 204,216 ----
  416.   #define FT_OBISNEW    13
  417.   #define FT_OBCLASS    14
  418.   #define FT_OBSHOW    15
  419.   /* macro to push a value onto the argument stack */
  420.   #define pusharg(x)    {if (xlsp >= xlargstktop) xlargstkoverflow();\
  421. !              *(xlsp++) = (x);}
  422.   
  423.   /* macros to protect pointers */
  424. ! #define xlstkcheck(n)    {if ((xlstack - (n)) < xlstkbase) xlstkoverflow();}
  425.   #define xlsave(n)    {*--xlstack = &n; n = NIL;}
  426.   #define xlprotect(n)    {*--xlstack = &n;}
  427.   
  428. ***************
  429. *** 230,235 ****
  430. --- 255,261 ----
  431.   #define ustreamp(x)    ((x) && ntype(x) == USTREAM)
  432.   #define boundp(x)    (getvalue(x) != s_unbound)
  433.   #define fboundp(x)    (getfunction(x) != s_unbound)
  434. + #define    winobjp(x)    ((x) && ntype(x) == WINOBJ)
  435.   
  436.   /* shorthand functions */
  437.   #define consa(x)    cons(x,NIL)
  438. ***************
  439. *** 323,326 ****
  440.   /* error reporting functions (don't *really* return at all) */
  441.   extern LVAL xltoofew();        /* report "too few arguments" error */
  442.   extern LVAL xlbadtype();    /* report "bad argument type" error */
  443. --- 349,351 ----
  444. diff -c ../xlisp.org/xlobj.c ../xlisp/xlobj.c
  445. *** ../xlisp.org/xlobj.c    Sun May  7 22:26:20 1989
  446. --- ../xlisp/xlobj.c    Wed Apr  5 16:18:40 1989
  447. ***************
  448. *** 41,47 ****
  449.   /* xsendsuper - send a message to the superclass of an object */
  450.   LVAL xsendsuper()
  451.   {
  452. !     LVAL env,p;
  453.       for (env = xlenv; env; env = cdr(env))
  454.       if ((p = car(env)) && objectp(car(p)))
  455.           return (sendmsg(car(p),
  456. --- 41,47 ----
  457.   /* xsendsuper - send a message to the superclass of an object */
  458.   LVAL xsendsuper()
  459.   {
  460. !     register LVAL env,p;
  461.       for (env = xlenv; env; env = cdr(env))
  462.       if ((p = car(env)) && objectp(car(p)))
  463.           return (sendmsg(car(p),
  464. ***************
  465. *** 97,104 ****
  466.   int xlobgetvalue(pair,sym,pval)
  467.     LVAL pair,sym,*pval;
  468.   {
  469. !     LVAL cls,names;
  470. !     int ivtotal,n;
  471.   
  472.       /* find the instance or class variable */
  473.       for (cls = cdr(pair); objectp(cls); cls = getivar(cls,SUPERCLASS)) {
  474. --- 97,104 ----
  475.   int xlobgetvalue(pair,sym,pval)
  476.     LVAL pair,sym,*pval;
  477.   {
  478. !     register LVAL cls,names;
  479. !     register int ivtotal,n;
  480.   
  481.       /* find the instance or class variable */
  482.       for (cls = cdr(pair); objectp(cls); cls = getivar(cls,SUPERCLASS)) {
  483. ***************
  484. *** 133,140 ****
  485.   int xlobsetvalue(pair,sym,val)
  486.     LVAL pair,sym,val;
  487.   {
  488. !     LVAL cls,names;
  489. !     int ivtotal,n;
  490.   
  491.       /* find the instance or class variable */
  492.       for (cls = cdr(pair); objectp(cls); cls = getivar(cls,SUPERCLASS)) {
  493. --- 133,140 ----
  494.   int xlobsetvalue(pair,sym,val)
  495.     LVAL pair,sym,val;
  496.   {
  497. !     register LVAL cls,names;
  498. !     register int ivtotal,n;
  499.   
  500.       /* find the instance or class variable */
  501.       for (cls = cdr(pair); objectp(cls); cls = getivar(cls,SUPERCLASS)) {
  502. ***************
  503. *** 309,315 ****
  504.   LOCAL LVAL sendmsg(obj,cls,sym)
  505.     LVAL obj,cls,sym;
  506.   {
  507. !     LVAL msg,msgcls,method,val,p;
  508.   
  509.       /* look for the message in the class or superclasses */
  510.       for (msgcls = cls; msgcls; ) {
  511. --- 309,316 ----
  512.   LOCAL LVAL sendmsg(obj,cls,sym)
  513.     LVAL obj,cls,sym;
  514.   {
  515. !     LVAL method,val;
  516. !     register LVAL msg,msgcls,p;
  517.   
  518.       /* look for the message in the class or superclasses */
  519.       for (msgcls = cls; msgcls; ) {
  520. ***************
  521. *** 316,322 ****
  522.   
  523.       /* lookup the message in this class */
  524.       for (p = getivar(msgcls,MESSAGES); p; p = cdr(p))
  525. !         if ((msg = car(p)) && car(msg) == sym)
  526.           goto send_message;
  527.   
  528.       /* look in class's superclass */
  529. --- 317,323 ----
  530.   
  531.       /* lookup the message in this class */
  532.       for (p = getivar(msgcls,MESSAGES); p; p = cdr(p))
  533. !         if ((msg = car(p)) ? car(msg) == sym : 0)
  534.           goto send_message;
  535.   
  536.       /* look in class's superclass */
  537. ***************
  538. *** 363,369 ****
  539.   LOCAL LVAL evmethod(obj,msgcls,method)
  540.     LVAL obj,msgcls,method;
  541.   {
  542. !     LVAL oldenv,oldfenv,cptr,name,val;
  543.       CONTEXT cntxt;
  544.   
  545.       /* protect some pointers */
  546. --- 364,370 ----
  547.   LOCAL LVAL evmethod(obj,msgcls,method)
  548.     LVAL obj,msgcls,method;
  549.   {
  550. !     LVAL oldenv,oldfenv,name,cptr,val;
  551.       CONTEXT cntxt;
  552.   
  553.       /* protect some pointers */
  554. ***************
  555. *** 420,428 ****
  556.   
  557.   /* listlength - find the length of a list */
  558.   LOCAL int listlength(list)
  559. !   LVAL list;
  560.   {
  561. !     int len;
  562.       for (len = 0; consp(list); len++)
  563.       list = cdr(list);
  564.       return (len);
  565. --- 421,429 ----
  566.   
  567.   /* listlength - find the length of a list */
  568.   LOCAL int listlength(list)
  569. ! register LVAL list;
  570.   {
  571. !     register int len;
  572.       for (len = 0; consp(list); len++)
  573.       list = cdr(list);
  574.       return (len);
  575. ***************
  576. *** 470,473 ****
  577.       xladdmsg(object,":CLASS",FT_OBCLASS);
  578.       xladdmsg(object,":SHOW",FT_OBSHOW);
  579.   }
  580. --- 471,473 ----
  581. diff -c ../xlisp.org/xlprin.c ../xlisp/xlprin.c
  582. *** ../xlisp.org/xlprin.c    Sun May  7 22:26:23 1989
  583. --- ../xlisp/xlprin.c    Fri May  5 13:35:51 1989
  584. ***************
  585. *** 33,38 ****
  586. --- 33,41 ----
  587.       case FSUBR:
  588.           putsubr(fptr,"FSubr",vptr);
  589.           break;
  590. +     case WINOBJ:
  591. +         putsymbol(fptr,"<Windows object>",flag);
  592. +         break;
  593.       case CONS:
  594.           xlputc(fptr,'(');
  595.           for (nptr = vptr; nptr != NIL; nptr = next) {
  596. diff -c ../xlisp.org/xlread.c ../xlisp/xlread.c
  597. *** ../xlisp.org/xlread.c    Sun May  7 22:26:26 1989
  598. --- ../xlisp/xlread.c    Wed Apr  5 16:18:41 1989
  599. ***************
  600. *** 15,20 ****
  601. --- 15,21 ----
  602.   extern LVAL s_quote,s_function,s_bquote,s_comma,s_comat;
  603.   extern LVAL s_rtable,k_wspace,k_const,k_nmacro,k_tmacro;
  604.   extern LVAL k_sescape,k_mescape;
  605. + extern LVAL s_send, s_sendsuper;
  606.   extern char buf[];
  607.   
  608.   /* external routines */
  609. ***************
  610. *** 29,35 ****
  611.   /* forward declarations */
  612.   FORWARD LVAL callmacro();
  613.   FORWARD LVAL psymbol(),punintern();
  614. ! FORWARD LVAL pnumber(),pquote(),plist(),pvector();
  615.   FORWARD LVAL tentry();
  616.   
  617.   /* xlload - load a file of xlisp expressions */
  618. --- 30,36 ----
  619.   /* forward declarations */
  620.   FORWARD LVAL callmacro();
  621.   FORWARD LVAL psymbol(),punintern();
  622. ! FORWARD LVAL pnumber(),pquote(),plist(),pmessage(),pvector();
  623.   FORWARD LVAL tentry();
  624.   
  625.   /* xlload - load a file of xlisp expressions */
  626. ***************
  627. *** 366,371 ****
  628. --- 367,386 ----
  629.       return (consa(plist(fptr)));
  630.   }
  631.   
  632. + /* rmlbrace - read macro for '{' */
  633. + LVAL rmlbrace()
  634. + {
  635. +     LVAL fptr,mch;
  636. +     /* get the file and macro character */
  637. +     fptr = xlgetfile();
  638. +     mch = xlgachar();
  639. +     xllastarg();
  640. +     /* make the return value */
  641. +     return (consa(pmessage(fptr)));
  642. + }
  643.   /* rmrpar - read macro for ')' */
  644.   LVAL rmrpar()
  645.   {
  646. ***************
  647. *** 372,377 ****
  648. --- 387,398 ----
  649.       xlfail("misplaced right paren");
  650.   }
  651.   
  652. + /* rmbrace - read macro for '}' */
  653. + LVAL rmrbrace()
  654. + {
  655. +     xlfail("misplaced right brace");
  656. + }
  657.   /* rmsemi - read macro for ';' */
  658.   LVAL rmsemi()
  659.   {
  660. ***************
  661. *** 485,490 ****
  662. --- 506,555 ----
  663.       return (val);
  664.   }
  665.   
  666. + /* plist - parse a message */
  667. + LOCAL LVAL pmessage(fptr)
  668. +   LVAL fptr;
  669. + {
  670. +     LVAL val,expr,lastnptr,nptr;
  671. +     LVAL mess = s_send;
  672. +     /* protect some pointers */
  673. +     xlstkcheck(2);
  674. +     xlsave(val);
  675. +     xlsave(expr);
  676. +     if (nextch(fptr) == '+') { /* Look for super class message */
  677. +     mess = s_sendsuper;
  678. +     xlgetc(fptr);
  679. +     }
  680. +     /* keep appending nodes until a closing paren is found */
  681. +     for (lastnptr = NIL; nextch(fptr) != '}'; )
  682. +     /* get the next expression */
  683. +     if (readone(fptr,&expr) == EOF)
  684. +         badeof(fptr);
  685. +     else {
  686. +         nptr = consa(expr);
  687. +         if (lastnptr == NIL)
  688. +         val = nptr;
  689. +         else
  690. +         rplacd(lastnptr,nptr);
  691. +         lastnptr = nptr;
  692. +         }
  693. +     /* skip the closing bracket */
  694. +     xlgetc(fptr);
  695. +     val = cons(mess,val);
  696. +     /* restore the stack */
  697. +     xlpopn(2);
  698. +     /* return successfully */
  699. +     return (val);
  700. + }
  701.   /* pvector - parse a vector */
  702.   LOCAL LVAL pvector(fptr)
  703.     LVAL fptr;
  704. ***************
  705. *** 807,811 ****
  706. --- 872,878 ----
  707.       defmacro('(', k_tmacro,FT_RMLPAR);
  708.       defmacro(')', k_tmacro,FT_RMRPAR);
  709.       defmacro(';', k_tmacro,FT_RMSEMI);
  710. +     defmacro('{', k_tmacro,FT_RMLBRACE);
  711. +     defmacro('}', k_tmacro,FT_RMRBRACE);
  712.   }
  713.   
  714. diff -c ../xlisp.org/xlsym.c ../xlisp/xlsym.c
  715. *** ../xlisp.org/xlsym.c    Sun May  7 22:26:32 1989
  716. --- ../xlisp/xlsym.c    Wed Apr  5 16:18:43 1989
  717. ***************
  718. *** 4,10 ****
  719.       Permission is granted for unrestricted non-commercial use    */
  720.   
  721.   #include "xlisp.h"
  722.   /* external variables */
  723.   extern LVAL obarray,s_unbound;
  724.   extern LVAL xlenv,xlfenv,xldenv;
  725. --- 4,11 ----
  726.       Permission is granted for unrestricted non-commercial use    */
  727.   
  728.   #include "xlisp.h"
  729. ! #undef HSIZE
  730. ! #define HSIZE 399
  731.   /* external variables */
  732.   extern LVAL obarray,s_unbound;
  733.   extern LVAL xlenv,xlfenv,xldenv;
  734. ***************
  735. *** 16,22 ****
  736.   LVAL xlenter(name)
  737.     char *name;
  738.   {
  739. !     LVAL sym,array;
  740.       int i;
  741.   
  742.       /* check for nil */
  743. --- 17,24 ----
  744.   LVAL xlenter(name)
  745.     char *name;
  746.   {
  747. !     register LVAL sym,array;
  748. !     LVAL sym2;
  749.       int i;
  750.   
  751.       /* check for nil */
  752. ***************
  753. *** 31,44 ****
  754.           return (car(sym));
  755.   
  756.       /* make a new symbol node and link it into the list */
  757. !     xlsave1(sym);
  758. !     sym = consd(getelement(array,i));
  759. !     rplaca(sym,xlmakesym(name));
  760. !     setelement(array,i,sym);
  761.       xlpop();
  762.       /* return the new symbol */
  763. !     return (car(sym));
  764.   }
  765.   
  766.   /* xlmakesym - make a new symbol node */
  767. --- 33,45 ----
  768.           return (car(sym));
  769.   
  770.       /* make a new symbol node and link it into the list */
  771. !     xlsave1(sym2);
  772. !     sym2 = consd(getelement(array,i));
  773. !     rplaca(sym2,xlmakesym(name));
  774. !     setelement(array,i,sym2);
  775.       xlpop();
  776.       /* return the new symbol */
  777. !     return (car(sym2));
  778.   }
  779.   
  780.   /* xlmakesym - make a new symbol node */
  781. ***************
  782. *** 68,74 ****
  783.   
  784.   /* xlxgetvalue - get the value of a symbol */
  785.   LVAL xlxgetvalue(sym)
  786. !   LVAL sym;
  787.   {
  788.       register LVAL fp,ep;
  789.       LVAL val;
  790. --- 69,75 ----
  791.   
  792.   /* xlxgetvalue - get the value of a symbol */
  793.   LVAL xlxgetvalue(sym)
  794. ! register LVAL sym;
  795.   {
  796.       register LVAL fp,ep;
  797.       LVAL val;
  798. ***************
  799. *** 95,101 ****
  800.   
  801.   /* xlsetvalue - set the value of a symbol */
  802.   xlsetvalue(sym,val)
  803. !   LVAL sym,val;
  804.   {
  805.       register LVAL fp,ep;
  806.   
  807. --- 96,103 ----
  808.   
  809.   /* xlsetvalue - set the value of a symbol */
  810.   xlsetvalue(sym,val)
  811. !   register LVAL sym;
  812. !   LVAL val;
  813.   {
  814.       register LVAL fp,ep;
  815.   
  816. ***************
  817. *** 137,143 ****
  818.   
  819.   /* xlxgetfunction - get the functional value of a symbol */
  820.   LVAL xlxgetfunction(sym)
  821. !   LVAL sym;
  822.   {
  823.       register LVAL fp,ep;
  824.   
  825. --- 139,145 ----
  826.   
  827.   /* xlxgetfunction - get the functional value of a symbol */
  828.   LVAL xlxgetfunction(sym)
  829. ! register  LVAL sym;
  830.   {
  831.       register LVAL fp,ep;
  832.   
  833. ***************
  834. *** 192,198 ****
  835.   xlremprop(sym,prp)
  836.     LVAL sym,prp;
  837.   {
  838. !     LVAL last,p;
  839.       last = NIL;
  840.       for (p = getplist(sym); consp(p) && consp(cdr(p)); p = cdr(last)) {
  841.       if (car(p) == prp)
  842. --- 194,200 ----
  843.   xlremprop(sym,prp)
  844.     LVAL sym,prp;
  845.   {
  846. !     register LVAL last,p;
  847.       last = NIL;
  848.       for (p = getplist(sym); consp(p) && consp(cdr(p)); p = cdr(last)) {
  849.       if (car(p) == prp)
  850. ***************
  851. *** 208,214 ****
  852.   LOCAL LVAL findprop(sym,prp)
  853.     LVAL sym,prp;
  854.   {
  855. !     LVAL p;
  856.       for (p = getplist(sym); consp(p) && consp(cdr(p)); p = cdr(cdr(p)))
  857.       if (car(p) == prp)
  858.           return (cdr(p));
  859. --- 210,216 ----
  860.   LOCAL LVAL findprop(sym,prp)
  861.     LVAL sym,prp;
  862.   {
  863. !     register LVAL p;
  864.       for (p = getplist(sym); consp(p) && consp(cdr(p)); p = cdr(cdr(p)))
  865.       if (car(p) == prp)
  866.           return (cdr(p));
  867. ***************
  868. *** 217,226 ****
  869.   
  870.   /* hash - hash a symbol name string */
  871.   int hash(str,len)
  872. !   char *str;
  873.   {
  874. !     int i;
  875. !     for (i = 0; *str; )
  876.       i = (i << 2) ^ *str++;
  877.       i %= len;
  878.       return (i < 0 ? -i : i);
  879. --- 219,228 ----
  880.   
  881.   /* hash - hash a symbol name string */
  882.   int hash(str,len)
  883. ! register char *str;
  884.   {
  885. !     register int i = 0;
  886. !     while (*str)
  887.       i = (i << 2) ^ *str++;
  888.       i %= len;
  889.       return (i < 0 ? -i : i);
  890.  
  891.  
  892.  
  893.