;;; -*- Mode:Common-Lisp; Package:SYSTEM; Base:8; Patch-file:T -*-

;;; Reason: Export MAKE-PIXEL-ARRAY, PIXEL-ARRAY-WIDTH, and PIXEL-ARRAY-HEIGHT from the 
;;; TICL package. [SPR 4675 and 5653]

;;;                           RESTRICTED RIGHTS LEGEND
;;;
;;; Use, duplication, or disclosure by the Government is subject to
;;; restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
;;; Technical Data and Computer Software clause at 52.227-7013.
;;;
;;;   TEXAS INSTRUMENTS INCORPORATED      
;;;   P.O. BOX 2909, M/S 2151             
;;;   AUSTIN, TEXAS 78769                 
;;;
;;; Copyright (C) 1989 Texas Instruments Incorporated.
;;; All rights reserved.

;;; Patch file for REL6H version 6.13
;;; Written 05/08/89 22:18:24 by GRAY,
;;; while running on Kelvin from band LOD2
;;; With Inconsistent REL6H 6.12, Experimental SYSTEM 6.0, Experimental VIRTUAL-MEMORY 6.0,
;;;  Experimental EH 6.0, Experimental MAKE-SYSTEM 6.0, Experimental MICRONET 6.0,
;;;  Experimental LOCAL-FILE 6.0, Experimental BASIC-PATHNAME 6.0, Experimental NETWORK-SUPPORT-COLD 6.0,
;;;  Experimental BASIC-NAMESPACE 6.0, Experimental NETWORK-NAMESPACE 6.0, Experimental DISK-IO 6.0,
;;;  Experimental DISK-LABEL 6.0, Experimental BASIC-FILE 6.0, Experimental MAC-PATHNAME 6.0,
;;;  Experimental NETWORK-PATHNAME 6.0, Experimental COMPILER 6.0, Experimental TV 6.0,
;;;  Experimental DATALINK 6.0, Experimental CHAOSNET 6.0, Experimental GC 6.0, Experimental MEMORY-AUX 6.0,
;;;  Experimental NVRAM 6.0, Experimental SYSLOG 6.0, Experimental STREAMER-TAPE 6.0,
;;;  Experimental CLEH 1.0, Experimental UCL 6.0, Experimental INPUT-EDITOR 6.0, Experimental METER 6.0,
;;;  Experimental ZWEI 6.0, Experimental DEBUG-TOOLS 6.0, Experimental NETWORK-SUPPORT 6.0,
;;;  Experimental NETWORK-SERVICE 6.0, DATALINK-DISPLAYS 6.0, Experimental FONT-EDITOR 6.0,
;;;  Experimental SERIAL 6.0, Experimental PRINTER 6.0, Experimental MAC-PRINTER-TYPES 6.0,
;;;  Experimental PRINTER-TYPES 6.0, Experimental IMAGEN 6.0, Experimental SUGGESTIONS 6.0,
;;;  Experimental MAIL-DAEMON 6.0, Experimental MAIL-READER 6.0, Experimental TELNET 6.0,
;;;  Experimental VT100 6.0, Experimental NAMESPACE-EDITOR 6.0, Experimental PROFILE 6.0,
;;;  VISIDOC 6.0, Experimental TI-CLOS 17.6, Experimental CLX 5.0, Experimental CLUE 20.0,
;;;  Experimental X11M 3.0, Experimental RPC 6.0, Experimental NFS 6.0, Experimental BUG 11.4,
;;;  IP 3.45, Experimental DOCUMENTER 619.0,  microcode 426, Band Name: Rel6H,Scribe,
;;; &c, u426 5/4

#!C
; From file ARRAYS.LISP#> KERNEL; MR-X:
#8R SYSTEM#:
(COMPILER-LET ((*PACKAGE* (FIND-PACKAGE "SYSTEM"))
                          (SI:*LISP-MODE* :COMMON-LISP)
                          (*READTABLE* COMMON-LISP-READTABLE)
                          (SI:*READER-SYMBOL-SUBSTITUTIONS* *COMMON-LISP-SYMBOL-SUBSTITUTIONS*))
  (COMPILER#:PATCH-SOURCE-FILE "SYS: KERNEL; ARRAYS.#"


;;  5/8/89 DNG - Added export so these can be considered extensions instead of 
;;		obsolete.  [SPR 4675 and 5653]
(export '( zlc:make-pixel-array zlc:pixel-array-width zlc:pixel-array-height
	  ticl::pixel-aref)
	"TICL")

(DEFUN zlc:make-pixel-array (width height &rest make-array-options)
  "Make a pixel array of WIDTH by HEIGHT.  You must specify :ELEMENT-TYPE as in MAKE-ARRAY.
This will create an array of the appropriate shape and knows whether
the height is supposed to be the first dimension or the second.
Access the resulting array with PIXEL-AREF. "
  (APPLY #'MAKE-ARRAY (LIST height width) make-array-options))

(comment ; this is the old Zetalisp version.
(DEFUN zlc:make-pixel-array (width height &rest options)
  "Make a pixel array of WIDTH by HEIGHT.  You must specify :TYPE as in MAKE-ARRAY.
This will create an array of the appropriate shape and knows whether
the height is supposed to be the first dimension or the second.
Access the resulting array with AR-2-REVERSE and AS-2-REVERSE to make sure
that accessing also is independent of array dimension order."
  (APPLY 'MAKE-ARRAY (LIST height width) options))
)

;;  5/8/89 DNG - Original.
(compiler-let ((compiler:inhibit-style-warnings-switch t))
(defsubst ticl:pixel-aref (array width-index height-index)
  "Access an element of a pixel array."
  (global:ar-2-reverse array width-index height-index)) )

(proclaim '(inline zlc:pixel-array-height zlc:pixel-array-width)) ; 5/8/89 DNG

(DEFUN zlc:pixel-array-width (ARRAY)
  "Return the width in pixels of an array of pixels."
  (ARRAY-DIMENSION array 1))

(DEFUN zlc:pixel-array-height (ARRAY)
  "Return the height in pixels of an array of pixels."
  (ARRAY-DIMENSION array 0 ))
))
