lispio.c
Go to the documentation of this file.
00001 /****************************************************************/
00002 /* lisp I/O functions
00003 /*      Copyright Toshihiro MATSUI, ETL, 1987 
00004 /****************************************************************/
00005 static char *rcsid="@(#)$Id$";
00006 
00007 #include "eus.h"
00008 #include <ctype.h>
00009 
00010 #if vxworks
00011 #undef READ
00012 #else
00013 #include <fcntl.h>
00014 #endif
00015 
00016 extern int errno;
00017 extern enum ch_type chartype[256];
00018 extern pointer QREADTABLE,QTERMIO, oblabels;
00019 extern byte *current_syntax[MAXTHREAD];
00020 extern int written_count[MAXTHREAD];
00021 extern pointer read_delimited_list(context*,pointer,int,char *);
00022 
00023 pointer OPENFILE(ctx,n,argv)
00024 register context *ctx;
00025 int n;
00026 register pointer argv[];
00027 { pointer s;
00028   extern pointer openfile();
00029   s=openfile(ctx,(char*)get_string(argv[0]), ckintval(argv[1]),
00030              ckintval(argv[2]),ckintval(argv[3]));
00031   if (s==0) return(makeint(errno));
00032   return(s);}
00033 
00034 pointer CLOSE(ctx,n,argv)
00035 register context *ctx;
00036 int n;
00037 pointer argv[];
00038 { register pointer s=argv[0];
00039   if (n!=1) error(E_MISMATCHARG);
00040   if (isiostream(s)) {
00041     if (closestream(s->c.iostream.in)<0) return(NIL);
00042     if (closestream(s->c.iostream.out)<0) return(NIL);
00043     return(T);}
00044   else if (isfilestream(s)) {
00045     if (closestream(s)<0) return(NIL);
00046     return(T);}
00047   else error(E_USER,(pointer)"file stream expected");}
00048 
00049 pointer getoutstream(ctx,n,strm)
00050 context *ctx;
00051 int n;
00052 register pointer strm;
00053 { if (n==1 || strm==NIL)  strm=Spevalof(QSTDOUT);
00054   if (strm==T) strm=Spevalof(QTERMIO);
00055   if (isiostream(strm)) strm=strm->c.iostream.out;
00056   if (!isstream(strm)) error(E_STREAM);
00057   if (strm->c.stream.direction!=K_OUT) error(E_IODIRECTION);
00058   return(strm);}
00059 
00060 pointer getinstream(ctx,n,strm)
00061 context *ctx;
00062 int n;
00063 register pointer strm;
00064 { if (n<1 || strm==NIL) strm=Spevalof(QSTDIN);
00065   if (strm==T) strm=Spevalof(QTERMIO);
00066   if (isiostream(strm)) strm=strm->c.iostream.in;
00067   if (!isstream(strm)) error(E_STREAM);
00068   if (strm->c.stream.direction!=K_IN) error(E_IODIRECTION);
00069   return(strm);}
00070 
00071 /****************************************************************/
00072 
00073 pointer PRINT(ctx,n,argv)
00074 register context *ctx;
00075 int n;
00076 pointer argv[];
00077 { pointer s;
00078   int osf;
00079   ckarg2(1,2);
00080   osf=ctx->slashflag;
00081   ctx->slashflag=0;
00082   prinx(ctx,argv[0],s=getoutstream(ctx,n,argv[1])); terpri(s);
00083   ctx->slashflag=osf;
00084   return(argv[0]);}
00085 
00086 pointer PRIN1(ctx,n,argv)
00087 register context *ctx;
00088 int n;
00089 pointer argv[];
00090 { ckarg2(1,2);
00091   int osf;
00092   osf=ctx->slashflag;
00093   ctx->slashflag=0;
00094   prinx(ctx,argv[0],getoutstream(ctx,n,argv[1]));
00095   ctx->slashflag=osf;
00096   return(argv[0]);}
00097 
00098 pointer PRINC(ctx,n,argv)
00099 register context *ctx;
00100 int n;
00101 pointer argv[];
00102 { int osf;
00103   ckarg2(1,2);
00104   osf=ctx->slashflag;
00105   ctx->slashflag=1;
00106   prinx(ctx,argv[0],getoutstream(ctx,n,argv[1]));
00107   ctx->slashflag=osf;
00108   return(argv[0]);}
00109 
00110 pointer TERPRI(ctx,n,argv)
00111 register context *ctx;
00112 int n;
00113 pointer argv[];
00114 { pointer strm;
00115   ckarg2(0,1);
00116   strm=getoutstream(ctx,n+1,argv[0]);
00117   terpri(strm);
00118   return(NIL);}
00119 
00120 static int prsize[MAXTHREAD];
00121 
00122 void prntsize(s,lim)
00123 register pointer s;
00124 int lim;
00125 { char buf[16];
00126   register int i,n,etype;
00127   numunion nu;
00128   if (prsize[thr_self()]>=lim) return;
00129   else if (isint(s)) { sprintf(buf,"%ld",intval(s)); prsize[thr_self()]+=strlen(buf);}
00130   else if (isflt(s)) prsize[thr_self()]+=7;
00131   else if (piscons(s)) {
00132     if (ccar(s)==QUOTE && islist(ccdr(s)) && ccdr(ccdr(s))==NIL) {
00133       prsize[thr_self()]++; prntsize(ccar(ccdr(s)),lim);}  /* ???? */
00134     else {
00135       prsize[thr_self()]+=2;
00136       while (islist(s)) {
00137         prntsize(ccar(s),lim);
00138         if (prsize[thr_self()]>lim) return;
00139         s=ccdr(s);
00140         if (s!=NIL) prsize[thr_self()]++;}
00141       if (s!=NIL) { prntsize(s,lim); prsize[thr_self()]+=2;}}}
00142   else if (pisstring(s)) prsize[thr_self()]+=strlength(s);
00143   else if (pissymbol(s)) prsize[thr_self()]+=strlength(s->c.sym.pname);
00144   else if (pisvector(s)) {
00145     n=vecsize(s); i=0; etype=elmtypeof(s);
00146     switch(etype) {
00147       case ELM_BIT: case ELM_CHAR: case ELM_FOREIGN: prsize[thr_self()]+=2+n; break;
00148       case ELM_BYTE: prsize[thr_self()]+=20; break;     /*detarame*/
00149       case ELM_FLOAT: case ELM_INT: prsize[thr_self()]++;
00150       case ELM_POINTER:
00151             prsize[thr_self()]+=3;
00152             while (i<n) {
00153               if (etype==ELM_FLOAT) prntsize(makeflt(s->c.fvec.fv[i]),lim);
00154               else if (etype==ELM_INT) prntsize(makeint(s->c.ivec.iv[i]),lim);
00155               else prntsize(s->c.vec.v[i],lim);
00156               if (prsize[thr_self()]>lim) return;
00157               prsize[thr_self()]++; i++;}
00158             break;} }
00159   else prsize[thr_self()]+=strlength(classof(s)->c.cls.name->c.sym.pname)+12;}
00160 
00161 pointer PRNTSIZE(ctx,n,argv)
00162 register context *ctx;
00163 int n;
00164 pointer argv[];
00165 { int lim;
00166   prsize[thr_self()]=0;
00167   ckarg2(1,2);
00168   if (n==2) lim=ckintval(argv[1]); else lim=256;
00169   prntsize(argv[0],lim);
00170   return(makeint(prsize[thr_self()]));}
00171 
00172 pointer READ(ctx,n,argv)
00173 register context *ctx;
00174 int n;
00175 pointer argv[];
00176 { pointer strm,eoferrorp=T,eofvalue=NIL,result,recursivep=NIL;
00177   ckarg2(0,4);
00178   strm=getinstream(ctx,n,argv[0]);
00179   if (n>=2) eoferrorp=argv[1];
00180   if (n>=3) eofvalue=argv[2];
00181   if (n==4) recursivep=argv[3];
00182   result=reader(ctx,strm,recursivep);
00183   if (result==(pointer)EOF)
00184     if (eoferrorp==NIL) return(eofvalue);
00185     else error(E_EOF);
00186   return(result);}
00187 
00188 pointer READ_DELIMITED_LIST(ctx,n,argv)
00189 register context *ctx;
00190 int n;
00191 pointer argv[];
00192 { pointer strm,result,recursivep=NIL;
00193   int delim_char;
00194   char token[1024];
00195 
00196   ckarg2(1,3);
00197   delim_char=ckintval(argv[0]);
00198   strm=getinstream(ctx,n-1,argv[1]);
00199   if (n==3) recursivep=argv[2];
00200 
00201   current_syntax[thr_self()]=Spevalof(QREADTABLE)->c.rdtab.syntax->c.str.chars;
00202   if (recursivep==NIL) {
00203     pointer_update(oblabels->c.lab.next,NIL);
00204     result=read_delimited_list(ctx,strm,delim_char,token);
00205     pointer_update(oblabels->c.lab.next,NIL);}
00206   else result=read_delimited_list(ctx,strm,delim_char,token); /*preserve #n= scope*/
00207   return(result);}
00208 
00209 pointer READLINE(ctx,n,argv)
00210 register context *ctx;
00211 int n;
00212 pointer argv[];
00213 { register pointer strm;
00214   pointer eoferrorp=T,eofvalue=NIL;
00215   byte cb[8192];
00216   register int i=0,ch;
00217   ckarg2(0,3);
00218   strm=getinstream(ctx,n,argv[0]);
00219   if (n>=2) eoferrorp=argv[1];
00220   if (n==3) eofvalue=argv[2];
00221   while (i<8192) {
00222     ch=readch(strm);
00223     if (ch=='\n') break;
00224     else if (ch==EOF) {
00225       if (i>0) break;
00226       if (eoferrorp==NIL) return(eofvalue);
00227       else error(E_EOF);}
00228     cb[i++]=ch;}
00229   if (cb[i-1]=='\r' && (i>=1)) i=i-1;
00230   return(makestring((char *)cb,i));}
00231 
00232 pointer READCH(ctx,n,argv)
00233 register context *ctx;
00234 register int n;
00235 register pointer argv[];
00236 { pointer strm,eoferrorp=T,eofvalue=NIL;
00237   register eusinteger_t result;
00238   ckarg2(0,3);
00239   strm=getinstream(ctx,n,argv[0]);
00240   if (n>=2) eoferrorp=argv[1];
00241   if (n==3) eofvalue=argv[2];
00242   result=readch(strm);
00243   if (result==EOF)
00244     if (eoferrorp==NIL) return(eofvalue);
00245     else error(E_EOF);
00246   return(makeint(result));}
00247 
00248 pointer UNREADCH(ctx,n,argv)
00249 register context *ctx;
00250 int n;
00251 register pointer argv[];
00252 { pointer strm;
00253   byte ch;
00254   ckarg2(1,2);
00255   strm=getinstream(ctx,n-1,argv[1]);
00256   ch=ckintval(argv[0]);
00257   unreadch(strm,ch);
00258   return(argv[0]);}
00259 
00260 pointer PEEKCH(ctx,n,argv)
00261 register context *ctx;
00262 int n;
00263 pointer argv[];
00264 { pointer strm,eoferrorp=T,eofvalue=NIL;
00265   eusinteger_t result;
00266   ckarg2(0,3);
00267   strm=getinstream(ctx,n,argv[0]);
00268   if (n>=2) eoferrorp=argv[1];
00269   if (n==3) eofvalue=argv[2];
00270   result=readch(strm);
00271   if (result==EOF)
00272     if (eoferrorp==NIL) return(eofvalue);
00273     else error(E_EOF);
00274   unreadch(strm,result);
00275   return(makeint(result));}
00276 
00277 pointer FINOUT(ctx,n,argv)      /*finish-output*/
00278 register context *ctx;
00279 int n;
00280 pointer argv[];
00281 { pointer strm;
00282   strm=getoutstream(ctx,n+1,argv[0]);
00283   flushstream(strm);
00284   return(NIL);}
00285 
00286 pointer WRTBYTE(ctx,n,argv)
00287 register context *ctx;
00288 int n;
00289 pointer *argv;
00290 { register pointer bytes,strm;
00291   ckarg(2);
00292   strm=getoutstream(ctx,n,argv[1]);
00293   bytes=argv[0];
00294   if (islist(bytes)) 
00295     while (islist(bytes)) {
00296       writech(strm,ckintval(ccar(bytes)));
00297       bytes=ccdr(bytes);}
00298   else writech(strm,ckintval(bytes));
00299   return(argv[0]);}      
00300 
00301 pointer WRTWORD(ctx,n,argv)
00302 register context *ctx;
00303 int n;
00304 pointer *argv;
00305 { register pointer bytes,strm;
00306   union {
00307     short s;
00308     char b[2];} buf;
00309   ckarg(2);
00310   strm=getoutstream(ctx,n,argv[1]);
00311   bytes=argv[0];
00312   if (islist(bytes)) 
00313     while (islist(bytes)) {
00314       buf.s=ckintval(ccar(bytes));
00315       writestr(strm,(byte *)buf.b,2);
00316       bytes=ccdr(bytes);}
00317   else {
00318     buf.s=ckintval(bytes);
00319     writestr(strm,(byte *)buf.b,2);}
00320   return(argv[0]);}
00321 
00322 pointer WRTLONG(ctx,n,argv)
00323 register context *ctx;
00324 int n;
00325 pointer *argv;
00326 { register pointer bytes,strm;
00327   union {
00328     int i;
00329     byte b[4];} buf;
00330   ckarg(2);
00331   strm=getoutstream(ctx,n,argv[1]);
00332   bytes=argv[0];
00333   if (islist(bytes)) 
00334     while (islist(bytes)) {
00335       buf.i=bigintval(ccar(bytes));
00336       writestr(strm,buf.b,4);
00337       bytes=ccdr(bytes);}
00338   else {
00339     buf.i=bigintval(bytes);
00340     writestr(strm,buf.b,4);}
00341   return(argv[0]);}
00342 
00343 pointer SETMACROCH(ctx,n,argv)
00344 register context *ctx;
00345 int n;
00346 pointer argv[];
00347 { int ch;
00348   pointer nontermp=NIL,rdtable;
00349   ckarg2(2,4);
00350   if (isstring(argv[0])) ch=argv[0]->c.str.chars[0];
00351   else ch=ckintval(argv[0]);
00352   if (ch<0 || 256<ch) error(E_CHARRANGE);
00353   if (n>=3) nontermp=argv[2];
00354   if (n==4) rdtable=argv[3];
00355   else rdtable=Spevalof(QREADTABLE);
00356   if (!isreadtable(rdtable)) error(E_USER,(pointer)"readtable expected");
00357   pointer_update(rdtable->c.rdtab.macro->c.vec.v[ch],argv[1]);
00358   if (argv[1]==NIL) rdtable->c.rdtab.syntax->c.str.chars[ch]=(byte)chartype[ch];
00359   else if (nontermp==NIL) rdtable->c.rdtab.syntax->c.str.chars[ch]=(int)ch_termmacro;
00360   else rdtable->c.rdtab.syntax->c.str.chars[ch]=(int)ch_nontermacro;
00361   return(T);}  
00362 
00363 pointer GETMACROCH(ctx,n,argv)
00364 register context *ctx;
00365 pointer argv[];
00366 { pointer rdtable;
00367   ckarg2(1,2);
00368   if (n==2) rdtable=argv[1];
00369   else rdtable=Spevalof(QREADTABLE);
00370   if (!isreadtable(rdtable)) error(E_USER,(pointer)"readtable expected");
00371   return(rdtable->c.rdtab.macro->c.vec.v[max(0,min(255,ckintval(argv[0])))]);}
00372 
00373 pointer SETDISPMACRO(ctx,n,argv)
00374 register context *ctx;
00375 int n;
00376 register pointer argv[];
00377 { int ch;
00378   pointer rdtable,func;
00379   ckarg2(3,4);
00380   if (isstring(argv[1])) ch=argv[1]->c.str.chars[0];
00381   else ch=ckintval(argv[1]);
00382   if (ch<0 || 256<ch) error(E_CHARRANGE);
00383   if (n==4) rdtable=argv[3];
00384   else rdtable=Spevalof(QREADTABLE);
00385   if (!isreadtable(rdtable)) error(E_USER,(pointer)"readtable expected");
00386   pointer_update(rdtable->c.rdtab.dispatch->c.vec.v[ch],/*(pointer (*)())*/argv[2]);
00387   return(T);}
00388 
00389 pointer GETDISPMACRO(ctx,n,argv)
00390 register context *ctx;
00391 int n;
00392 pointer argv[];
00393 { int ch;
00394   pointer rdtable,func;
00395   ckarg2(2,3);
00396   if (isstring(argv[1])) ch=argv[1]->c.str.chars[0];
00397   else ch=ckintval(argv[1]);
00398   if (ch<0 || 256<ch) error(E_CHARRANGE);
00399   if (n==3) rdtable=argv[2];
00400   else rdtable=Spevalof(QREADTABLE);
00401   if (!isreadtable(rdtable)) error(E_USER,(pointer)"readtable expected");
00402   func=rdtable->c.rdtab.dispatch->c.vec.v[ch];
00403   return(func);}
00404 
00405 pointer RESETREADTABLE(ctx,n,argv)
00406 register context *ctx;
00407 int n; /* unused argument */
00408 pointer *argv; /* unused argument */
00409 { initreader(ctx); return(T);}  /* ???? */
00410 
00411 /*****************************************************************/
00412 /*      FORMAT
00413 /*      1986-Nov
00414 /*      T.Matsui
00415 */
00416 
00417 #define nextcch() ((cx>=cmax)?(byte)((eusinteger_t)error(E_FORMATSTRING)):cstr[cx++])
00418 
00419 #define nextfarg() ((fargx>=fargc)?(pointer)error(E_MISMATCHARG):fargv[fargx++])
00420 
00421 /*extern void printnum(context *, pointer, pointer, int, int, int);*/
00422 
00423 pointer XFORMAT(ctx,n,argv)
00424 register context *ctx;
00425 int n;
00426 pointer argv[];
00427 {
00428   register pointer dest,a;
00429   register int i,j,px,l;
00430   int param[10],par;
00431   char buf[256];
00432   eusfloat_t fval;
00433   byte *cstr,cch;
00434   int  cx,cmax;
00435   pointer *fargv, varg;
00436   int fargc,fargx;
00437   int wcount, osf;
00438   numunion nu;
00439   extern double fabs();
00440 
00441   if (n<2) error(E_MISMATCHARG);
00442   dest=argv[0]; a=argv[1];
00443   if (!isstring(a)) error(E_NOSTRING);
00444   cx=0; cstr=a->c.str.chars; cmax=intval(a->c.str.length);
00445   fargv=argv; fargc=n; fargx=2;
00446   
00447   if (dest==NIL) dest=(pointer)mkstream(ctx,K_OUT,makebuffer(64));
00448   else {
00449     if (dest==T) dest=Spevalof(QSTDOUT);
00450     if (isiostream(dest)) dest=dest->c.iostream.out;
00451     if (!isstream(dest)) error(E_STREAM);
00452     if (dest->c.stream.direction!=K_OUT) error(E_IODIRECTION);}
00453   vpush(dest);
00454 
00455   written_count[thr_self()]=0;
00456   while (cx<cmax) {
00457     cch=nextcch();
00458     if (cch=='~') {     /*tilda*/
00459       cch=nextcch();
00460       px=0; param[0]=0; param[1]=1; param[2]=0;
00461       while (isdigit(cch)) {
00462         param[px]=0;
00463         while (isdigit(cch)) {
00464           param[px]=param[px]*10+(cch-'0');
00465           cch=nextcch();}
00466         px++;
00467         if (cch==',') cch=nextcch();}
00468       if (islower(cch)) cch=toupper(cch);
00469       if (cch=='V') {
00470         varg=nextfarg();
00471         param[px++]=ckintval(varg);
00472         cch=nextcch();
00473         if (islower(cch)) cch=toupper(cch);}
00474       switch(cch) {
00475         case 'A':       /*Ascii*/
00476           osf=ctx->slashflag;
00477           ctx->slashflag=1;
00478           written_count[thr_self()]=0;
00479           prinx(ctx,(pointer)nextfarg(),dest);
00480           while (param[0]>written_count[thr_self()]) writech(dest,' ');
00481           ctx->slashflag=osf;
00482           break;
00483         case 'S':       /*S-expression*/
00484           written_count[thr_self()]=0;
00485           prinx(ctx,nextfarg(),dest);
00486           while (param[0]>written_count[thr_self()]) writech(dest,' ');
00487           break;
00488         case 'D':       /*Decimal*/
00489           a=nextfarg();
00490           printnum(ctx,a,dest,10,param[0],param[1]);
00491           break;
00492         case 'X':       /*heXadecimal*/
00493           a=nextfarg();
00494           printnum(ctx,a,dest,16,param[0],param[1]);
00495           break;
00496         case 'O':       /*Octal*/
00497           a=nextfarg();
00498           printnum(ctx,a,dest,8,param[0],param[1]);
00499           break;
00500         case 'C':       /*Character*/
00501           a=nextfarg();
00502           writech(dest,ckintval(a)); break;
00503         case 'F':       /*Fixed-format floating-point*/
00504           a=nextfarg();
00505           fval=ckfltval(a);
00506           sprintf(buf,"%*.*f",param[0],param[1],fval);
00507           writestr(dest,(byte *)buf,strlen(buf)); break;
00508         case 'E':       /*Exponential floating-point*/
00509           a=nextfarg();
00510           fval=ckfltval(a);
00511           sprintf(buf,"%*.*e",param[0],param[1],fval);
00512           writestr(dest,(byte *)buf,strlen(buf)); break;
00513         case 'G':       /*General floating-point*/
00514           a=nextfarg();
00515           fval=ckfltval(a);
00516           if (fval==0.0) writestr(dest,(byte *)"0.0",3);
00517           else {
00518             if (fabs(fval)<0.0001 || fabs(fval)>1.0e+05) {
00519               sprintf(buf,"%*.*e",param[0],param[1],fval); l=strlen(buf);}
00520             else {
00521               sprintf(buf,"%*.*f",param[0],param[1],fval);
00522               l=strlen(buf);
00523               while (l>2 && buf[l-1]=='0' && buf[l-2]!='.') l--;} 
00524             writestr(dest,(byte *)buf,l); }
00525           break;
00526         case '%': case '&':     /*newline*/
00527           for (j=0; j<=param[0]; j++) writech(dest,'\n');
00528           if (argv[0]!=NIL) 
00529             if (flushstream(dest)!=0) error(E_USER,(pointer)"cannot flush stream");
00530           break;
00531         case '~':       /*tilda*/
00532           writech(dest,'~'); break;
00533         case 'T':       /*tabulate*/
00534           writech(dest,9); break;;
00535         default:        break;
00536         }  
00537       }
00538     else writech(dest,cch);}
00539   if (argv[0]==NIL) {
00540     a=makestring((char *)dest->c.stream.buffer->c.str.chars,
00541                  intval(dest->c.stream.count));
00542     vpop();
00543     return(a);}
00544   else { vpop(); return(NIL);}
00545   }
00546 
00547 pointer SIGERROR(ctx,n,argv)
00548 register context *ctx;
00549 register int n;
00550 register pointer *argv;
00551 { register int i;
00552   pointer  msg;
00553   pointer *argb=ctx->vsp;
00554   if (isstring(argv[0])) {
00555      vpush(NIL);
00556      for (i=0; i<n; i++) vpush(argv[i]);
00557      msg=XFORMAT(ctx,n+1,argb);
00558      error(E_USER,(pointer)(msg->c.str.chars),argv[1]);}
00559   else error((enum errorcode)(ckintval(argv[0])),argv[1]);}
00560 
00561 pointer INSTALL_ERRHANDLER(ctx,n,argv)
00562 register context *ctx;
00563 register int n;
00564 register pointer *argv;
00565 { ckarg(1);
00566   ctx->errhandler=argv[0];
00567   return(argv[0]);}
00568 
00569 
00570 void lispio(ctx,mod)
00571 register context *ctx;
00572 pointer mod;
00573 {
00574   pointer_update(Spevalof(PACKAGE),syspkg);
00575   defun(ctx,"OPENFILE",mod,OPENFILE);
00576   pointer_update(Spevalof(PACKAGE),lisppkg);
00577 /*  defun(ctx,"OPEN",mod,OPEN); */
00578   defun(ctx,"CLOSE",mod,CLOSE);
00579   defun(ctx,"READ",mod,READ);
00580   defun(ctx,"READ-DELIMITED-LIST",mod,READ_DELIMITED_LIST);
00581   defun(ctx,"READ-LINE",mod,READLINE);
00582   defun(ctx,"READ-CHAR",mod,READCH);
00583   defun(ctx,"UNREAD-CHAR",mod,UNREADCH);
00584   defun(ctx,"PEEK-CHAR",mod,PEEKCH);
00585   defun(ctx,"PRINT",mod,PRINT);
00586   defun(ctx,"PRIN1",mod,PRIN1);
00587   defun(ctx,"PRINC",mod,PRINC);
00588   defun(ctx,"TERPRI",mod,TERPRI);
00589   defun(ctx,"PRINT-SIZE",mod,PRNTSIZE);
00590   defun(ctx,"FINISH-OUTPUT",mod,FINOUT);
00591   defun(ctx,"WRITE-BYTE",mod,WRTBYTE);
00592   defun(ctx,"WRITE-WORD",mod,WRTWORD);
00593   defun(ctx,"WRITE-LONG",mod,WRTLONG);
00594   defun(ctx,"SET-MACRO-CHARACTER",mod,SETMACROCH);
00595   defun(ctx,"GET-MACRO-CHARACTER",mod,GETMACROCH);
00596   defun(ctx,"SET-DISPATCH-MACRO-CHARACTER",mod,SETDISPMACRO);
00597   defun(ctx,"GET-DISPATCH-MACRO-CHARACTER",mod,GETDISPMACRO);
00598   defunpkg(ctx,"RESET-READTABLE",mod,RESETREADTABLE,syspkg);
00599   defun(ctx,"FORMAT",mod,XFORMAT);
00600   defun(ctx,"ERROR",mod,SIGERROR);
00601   defun(ctx,"INSTALL-ERROR-HANDLER",mod,INSTALL_ERRHANDLER);
00602   }
00603 


euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Sep 3 2015 10:36:20