/[cmucl]/src/hemlock/charmacs.lisp
ViewVC logotype

Diff of /src/hemlock/charmacs.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.2.1.1 by wlott, Fri Aug 3 10:16:56 1990 UTC revision 1.1.1.9 by ram, Wed Aug 25 02:23:34 1993 UTC
# Line 1  Line 1 
1  ;;; -*- Log: hemlock.log; Package: Hemlock-Internals -*-  ;;; -*- Log: hemlock.log; Package: Hemlock-Internals -*-
2  ;;;  ;;;
3  ;;; **********************************************************************  ;;; **********************************************************************
4  ;;; This code was written as part of the Spice Lisp project at  ;;; This code was written as part of the CMU Common Lisp project at
5  ;;; Carnegie-Mellon University, and has been placed in the public domain.  ;;; Carnegie Mellon University, and has been placed in the public domain.
6  ;;; Spice Lisp is currently incomplete and under active development.  ;;; If you want to use this code or any part of CMU Common Lisp, please contact
7  ;;; If you want to use this code or any part of Spice Lisp, please contact  ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
8  ;;; Scott Fahlman (FAHLMAN@CMUC).  ;;;
9    (ext:file-comment
10      "$Header$")
11    ;;;
12  ;;; **********************************************************************  ;;; **********************************************************************
13  ;;;  ;;;
14  ;;; Implementation specific character-hacking macros and constants.  ;;; Implementation specific character-hacking macros and constants.
15  ;;;  ;;;
16  (in-package 'hemlock-internals)  (in-package "HEMLOCK-INTERNALS")
17  (export ' (syntax-char-code-limit command-char-bits-limit  (export ' (syntax-char-code-limit search-char-code-limit do-alpha-chars))
18             command-char-code-limit search-char-code-limit  
19             do-alpha-chars))  ;;; This file contains various constants and macros which are implementation or
20    ;;; ASCII dependant.  It contains some versions of CHAR-CODE which do not check
21  ;;; This file contains various constants and macros which are  ;;; types and ignore the top bit so that various structures can be allocated
22  ;;; implementation or ASCII dependant.  In particular it contains  ;;; 128 long instead of 256, and we don't get errors if a loser visits a binary
23  ;;; all the character implementation parameters such as  ;;; file.
24  ;;; Command-Char-Bits-Limit, and contains various versions  ;;;
25  ;;; of char-code which don't check types and omit the top bit  ;;; There are so many different constants and macros implemented the same.
26  ;;; so that various structures can be allocated 128 long instead  ;;; This is to separate various mechanisms; for example, in principle the
27  ;;; of 256, and we don't get errors if a loser visits a binary file.  ;;; char-code-limit for the syntax functions is independant of that for the
28    ;;; searching functions
29  ;;; There are so many different constants and macros that do the same  ;;;
30  ;;; thing because in principle the char-code-limit for the syntax  
 ;;; functions is independant of that for the searching functions, etc.  
   
 ;;; This file also contains code which adds any implementation specific  
 ;;; character names to the char file's Char-Name-Alist so that there  
 ;;; is a reasonable read-syntax and print-representation for all  
 ;;; characters a user might run across.  
31    
32    
33  ;;;; Stuff for the Syntax table functions (syntax)  ;;;; Stuff for the Syntax table functions (syntax)
34    
35  (defconstant syntax-char-code-limit 128  (defconstant syntax-char-code-limit char-code-limit
36    "The highest char-code which a character argument to the syntax    "The highest char-code which a character argument to the syntax
37    table functions may have.")    table functions may have.")
 (defconstant syntax-char-code-mask #x+7f  
   "Mask we AND with characters given to syntax table functions to blow away  
   bits we don't want.")  
 (defmacro syntax-char-code (char)  
   `(logand syntax-char-code-mask (char-code ,char)))  
38    
39  ;;;; Stuff for the command interpreter (interp)  (defmacro syntax-char-code (char)
 ;;;  
 ;;;    On the Perq we have bits for command bindings, on the VAX there  
 ;;; aren't.  The code to interpret them is conditionally compiled  
 ;;; so that the VAX isnt't slowed down.  
 ;;;  
 ;;; Make command-char-code-limit 256 instead of 128 for X keyboard scan-codes.  
 (defconstant command-char-code-limit 256  
   "The upper bound on character codes supported for key bindings.")  
 (defconstant command-char-bits-limit 16  
   "The maximum value of character bits supported for key bindings.")  
 (defmacro key-char-bits (char)  
   `(logand (char-bits ,char) #xF))  
 (defmacro key-char-code (char)  
40    `(char-code ,char))    `(char-code ,char))
41    
42    
# Line 80  Line 59 
59  ;;; Doesn't do anything special, but it should fast and not waste any time  ;;; Doesn't do anything special, but it should fast and not waste any time
60  ;;; checking type and whatnot.  ;;; checking type and whatnot.
61  (defmacro search-char-upcase (ch)  (defmacro search-char-upcase (ch)
62    `(char-upcase (the base-character ,ch)))    `(char-upcase (the base-char ,ch)))
63    
64    
65    

Legend:
Removed from v.1.1.1.2.1.1  
changed lines
  Added in v.1.1.1.9

  ViewVC Help
Powered by ViewVC 1.1.5