glhead.sl 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. %
  2. % GLHEAD.PSL.9 14 Jan. 1983
  3. %
  4. % HEADER FOR GLISP FOR COMPATIBILITY WITH PORTABLE STANDARD LISP (PSL)
  5. % G. NOVAK 20 OCTOBER 1982
  6. %
  7. (GLOBAL '(GLQUIETFLG GLSEPBITTBL GLUNITPKGS GLSEPMINUS GLOBJECTNAMES
  8. GLTYPENAMES GLBREAKONERROR GLUSERSTRNAMES GLLASTFNCOMPILED
  9. GLLASTSTREDITED GLCAUTIOUSFLG GLLISPDIALECT GLBASICTYPES
  10. GLOBJECTTYPES))
  11. (FLUID '(TTLIST SPECS SOURCE GLGLOBALVARS DOMAINNAME ARGTYPES NOTFLG
  12. GLAMBDAFN ADDISATYPE PAIRLIST PROGG BITTBL KEY Y TYPES
  13. CONTEXT EXPR VALBUSY FAULTFN GLSEPATOM GLSEPPTR *GL* *GLVAL*
  14. GLTOPCTX RESULTTYPE RESULT GLNATOM FIRST OPNDS OPERS
  15. GLEXPR DESLIST EXPRSTACK GLTYPESUBS GLPROGLST))
  16. % CASEQ MACRO FOR PSL
  17. (DM CASEQ (L)
  18. (PROG (CVAR CODE)
  19. (SETQ CVAR (COND ((ATOM (CADR L))(CADR L))
  20. (T 'CASEQSELECTORVAR)))
  21. (SETQ CODE (CONS 'COND (MAPCAR (CDDR L)
  22. (FUNCTION (LAMBDA (X)
  23. (COND ((EQ (CAR X) T) X)
  24. ((ATOM (CAR X))
  25. (CONS (LIST 'EQ CVAR
  26. (LIST 'QUOTE (CAR X)))
  27. (CDR X)))
  28. (T (CONS (LIST 'MEMQ CVAR
  29. (LIST 'QUOTE (CAR X)))
  30. (CDR X)))))))))
  31. (RETURN (COND ((ATOM (CADR L)) CODE)
  32. (T (LIST 'PROG (LIST CVAR)
  33. (LIST 'SETQ CVAR (CADR L))
  34. (LIST 'RETURN CODE)))))))