[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [build-improvements] more character stuff
From: |
Gabriel Dos Reis |
Subject: |
[Axiom-developer] [build-improvements] more character stuff |
Date: |
13 May 2007 07:53:37 -0500 |
Hi,
The previous patch that used the ANSI Lisp character type, in lieu
of the non-standard but cltl conformant string-char, misses a few
places. Fixed thusly.
-- Gaby
2007-05-12 Gabriel Dos Reis <address@hidden>
* metalex.lisp.pamphlet (make-adjustable-string): Use character as
string element type, not string-char.
* parsing.lisp.pamphlet (underscore, make-string-adjustable):
Likewise.
* unlisp.lisp.pamphlet (c-to-lisp-string, |ByteFileReadLine|,
|FullString|): Likewise.
* vmlisp.lisp.pamphlet (make-cvec): Likewise.
*** src/interp/metalex.lisp.pamphlet (revision 15487)
--- src/interp/metalex.lisp.pamphlet (local)
***************
*** 1,15 ****
\documentclass{article}
\usepackage{axiom}
! \begin{document}
\title{\$SPAD/src/interp metalex.lisp}
\author{Timothy Daly}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
;; All rights reserved.
--- 1,20 ----
+ %% Oh Emacs, this is a -*- Lisp -*- file, despite appearance.
\documentclass{article}
\usepackage{axiom}
!
\title{\$SPAD/src/interp metalex.lisp}
\author{Timothy Daly}
+
+ \begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
+
\section{License}
+
<<license>>=
;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
;; All rights reserved.
*************** empty (if File-Closed (return nil))
*** 194,200 ****
(t
'special-char)))
(defun make-adjustable-string (n)
! (make-array (list n) :element-type 'string-char :adjustable t))
(defun get-identifier-token (token)
"Take an identifier off the input stream."
--- 199,205 ----
(t
'special-char)))
(defun make-adjustable-string (n)
! (make-array (list n) :element-type 'character :adjustable t))
(defun get-identifier-token (token)
"Take an identifier off the input stream."
*** src/interp/parsing.lisp.pamphlet (revision 15487)
--- src/interp/parsing.lisp.pamphlet (local)
***************
*** 1,15 ****
\documentclass{article}
\usepackage{axiom}
! \begin{document}
! \title{\$SPAD/src/interp parsing.lisp}
\author{Timothy Daly}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
;; All rights reserved.
--- 1,20 ----
+ %% Oh Emacs, this is a -*- Lisp -*- file, despite appearance.
\documentclass{article}
\usepackage{axiom}
!
! \title{\File{src/interp/parsing.lisp} Pamphlet}
\author{Timothy Daly}
+
+ \begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
+
\section{License}
+
<<license>>=
;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
;; All rights reserved.
*************** the stack, then stack a NIL. Return the
*** 556,562 ****
(if (every #'alpha-char-p string) string
(let* ((size (length string))
(out-string (make-array (* 2 size)
! :element-type 'string-char
:fill-pointer 0))
next-char)
(dotimes (i size)
--- 561,567 ----
(if (every #'alpha-char-p string) string
(let* ((size (length string))
(out-string (make-array (* 2 size)
! :element-type 'character
:fill-pointer 0))
next-char)
(dotimes (i size)
*************** is a token separator, which blank is equ
*** 689,695 ****
(defun make-string-adjustable (s)
(cond ((adjustable-array-p s) s)
! (t (make-array (array-dimensions s) :element-type 'string-char
:adjustable t :initial-contents s))))
(defun get-a-line (stream)
--- 694,700 ----
(defun make-string-adjustable (s)
(cond ((adjustable-array-p s) s)
! (t (make-array (array-dimensions s) :element-type 'character
:adjustable t :initial-contents s))))
(defun get-a-line (stream)
*** src/interp/unlisp.lisp.pamphlet (revision 15487)
--- src/interp/unlisp.lisp.pamphlet (local)
***************
*** 1,14 ****
\documentclass{article}
\usepackage{axiom}
! \begin{document}
! \title{\$SPAD/src/interp unlisp.lisp}
\author{Stephen M. Watt, Timothy Daly}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\begin{verbatim}
Uncommon 1.6
This package is a Boot interface for Common Lisp.
--- 1,18 ----
+ %% Oh Emacs, this is a -*- Lisp -*- file, despite appearance.
\documentclass{article}
\usepackage{axiom}
!
! \title{\File{src/interp/unlisp.lisp} Pamphlet}
\author{Stephen M. Watt, Timothy Daly}
+
+ \begin{document}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
+
\begin{verbatim}
Uncommon 1.6
This package is a Boot interface for Common Lisp.
*************** The following functions are provided:
*** 140,146 ****
(defun c-to-lisp-string (ptr)
(let (str len)
(setq len (strlen ptr))
! (setq str (make-array (list len) :element-type 'string-char))
(sprintf str "%s" ptr) ; Cannot use strcpy because it stops in a \0.
str ))
)
--- 144,150 ----
(defun c-to-lisp-string (ptr)
(let (str len)
(setq len (strlen ptr))
! (setq str (make-array (list len) :element-type 'character))
(sprintf str "%s" ptr) ; Cannot use strcpy because it stops in a \0.
str ))
)
*************** The following functions are provided:
*** 224,249 ****
;;
;;(defun |TextFileOpenIn| (path)
;; (open path
! ;; :element-type 'string-char
;; :direction :input ))
;;
;;(defun |TextFileOpenOut| (path)
;; (open path
! ;; :element-type 'string-char
;; :direction :output
;; :if-exists :supersede
;; :if-does-not-exist :create ))
;;
;;(defun |TextFileOpenIO| (path)
;; (open path
! ;; :element-type 'string-char
;; :direction :io
;; :if-exists :overwrite ; open at beginning
;; :if-does-not-exist :create ))
;;
;;(defun |TextFileOpenAppend| (path)
;; (open path
! ;; :element-type 'string-char
;; :direction :output
;; :if-exists :append
;; :if-does-not-exist :create ))
--- 228,253 ----
;;
;;(defun |TextFileOpenIn| (path)
;; (open path
! ;; :element-type 'character
;; :direction :input ))
;;
;;(defun |TextFileOpenOut| (path)
;; (open path
! ;; :element-type 'character
;; :direction :output
;; :if-exists :supersede
;; :if-does-not-exist :create ))
;;
;;(defun |TextFileOpenIO| (path)
;; (open path
! ;; :element-type 'character
;; :direction :io
;; :if-exists :overwrite ; open at beginning
;; :if-does-not-exist :create ))
;;
;;(defun |TextFileOpenAppend| (path)
;; (open path
! ;; :element-type 'character
;; :direction :output
;; :if-exists :append
;; :if-does-not-exist :create ))
*************** The following functions are provided:
*** 476,482 ****
(defun |ByteFileReadLine| (instream)
(do ((buf (make-array '(80)
! :element-type 'string-char
:fill-pointer 0
:adjustable 't ))
(b (read-byte instream nil nil) (read-byte instream nil nil))
--- 480,486 ----
(defun |ByteFileReadLine| (instream)
(do ((buf (make-array '(80)
! :element-type 'character
:fill-pointer 0
:adjustable 't ))
(b (read-byte instream nil nil) (read-byte instream nil nil))
*************** The following functions are provided:
*** 886,892 ****
(defun |FullString| (size &optional (init #\Space))
(make-array
(list size)
! :element-type 'string-char
:initial-element init ))
(defun |ToString| (ob)
--- 890,896 ----
(defun |FullString| (size &optional (init #\Space))
(make-array
(list size)
! :element-type 'character
:initial-element init ))
(defun |ToString| (ob)
*** src/interp/vmlisp.lisp.pamphlet (revision 15487)
--- src/interp/vmlisp.lisp.pamphlet (local)
*************** Contributed by Juergen Weiss.
*** 1176,1182 ****
(define-function 'strconc #'concat)
! (defun make-cvec (sint) (make-array sint :fill-pointer 0 :element-type
'string-char))
;(define-function 'CVECP #'stringp)
--- 1176,1182 ----
(define-function 'strconc #'concat)
! (defun make-cvec (sint) (make-array sint :fill-pointer 0 :element-type
'character))
;(define-function 'CVECP #'stringp)
- [Axiom-developer] [build-improvements] more character stuff,
Gabriel Dos Reis <=