Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
8d084de8
Commit
8d084de8
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Fixed the ioctl defn stuff.
parent
e91c3037
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/unix.lisp
+31
-30
31 additions, 30 deletions
code/unix.lisp
with
31 additions
and
30 deletions
code/unix.lisp
+
31
−
30
View file @
8d084de8
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.
2
1992/01/24 0
5:07
:2
9
wlott Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.
3
1992/01/24 0
7:10
:2
3
wlott Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -889,13 +889,6 @@
...
@@ -889,13 +889,6 @@
;;; Unix-ioctl is used to change parameters of devices in a device
;;; Unix-ioctl is used to change parameters of devices in a device
;;; dependent way.
;;; dependent way.
(
eval-when
(
compile
load
eval
)
(
defconstant
iocparm-mask
#x7f
)
(
defconstant
ioc_void
#x20000000
)
(
defconstant
ioc_out
#x40000000
)
(
defconstant
ioc_in
#x80000000
)
(
defconstant
ioc_inout
(
logior
ioc_in
ioc_out
))
)
(
defconstant
terminal-speeds
(
defconstant
terminal-speeds
'#(
nil
50
75
110
nil
150
200
300
600
1200
1800
2400
4800
9600
nil
nil
))
'#(
nil
50
75
110
nil
150
200
300
600
1200
1800
2400
4800
9600
nil
nil
))
...
@@ -909,37 +902,45 @@
...
@@ -909,37 +902,45 @@
(
eval-when
(
compile
load
eval
)
(
eval-when
(
compile
load
eval
)
(
defconstant
iocparm-mask
#x7f
)
(
defconstant
ioc_void
#x20000000
)
(
defconstant
ioc_out
#x40000000
)
(
defconstant
ioc_in
#x80000000
)
(
defconstant
ioc_inout
(
logior
ioc_in
ioc_out
))
(
defmacro
define-ioctl-command
(
name
dev
cmd
arg
&optional
(
parm-type
:void
))
(
defmacro
define-ioctl-command
(
name
dev
cmd
arg
&optional
(
parm-type
:void
))
(
declare
(
fixnum
cmd
))
(
let*
((
ptype
(
ecase
parm-type
(
let*
((
rsize
(
get
arg
'record-size
))
(
ptype
(
case
parm-type
(
:void
ioc_void
)
(
:void
ioc_void
)
(
:in
ioc_in
)
(
:in
ioc_in
)
(
:out
ioc_out
)
(
:out
ioc_out
)
(
:inout
ioc_inout
)
(
:inout
ioc_inout
)))
(
t
(
error
"Parameter type ~A is illegal."
parm-type
))))
(
code
(
logior
(
ash
(
char-code
dev
)
8
)
cmd
ptype
)))
(
code
(
logior
(
the
fixnum
(
ash
(
char-code
dev
)
8
))
cmd
ptype
)))
(
when
arg
(
if
(
null
rsize
)
(
setq
rsize
0
))
(
setf
code
`
(
logior
(
ash
(
logand
(
alien-size
,
arg
:bytes
)
,
iocparm-mask
)
16
)
,
code
)))
`
(
eval-when
(
eval
load
compile
)
`
(
eval-when
(
eval
load
compile
)
(
defconstant
,
name
,
(
logior
(
ash
(
logand
(
truncate
rsize
8
)
(
defconstant
,
name
,
code
)))
)
iocparm-mask
)
16
)
code
)))))
)
)
;;; TTY ioctl commands.
;;; TTY ioctl commands.
(
define-ioctl-command
TIOCGETP
#\t
8
sgtty
:out
)
(
define-ioctl-command
TIOCGETP
#\t
8
(
struct
sgtty
b
)
:out
)
(
define-ioctl-command
TIOCSETP
#\t
9
sgtty
:in
)
(
define-ioctl-command
TIOCSETP
#\t
9
(
struct
sgtty
b
)
:in
)
(
define-ioctl-command
TIOCFLUSH
#\t
16
int
1
:in
)
(
define-ioctl-command
TIOCFLUSH
#\t
16
int
:in
)
(
define-ioctl-command
TIOCSETC
#\t
17
tchars
:in
)
(
define-ioctl-command
TIOCSETC
#\t
17
(
struct
tchars
)
:in
)
(
define-ioctl-command
TIOCGETC
#\t
18
tchars
:out
)
(
define-ioctl-command
TIOCGETC
#\t
18
(
struct
tchars
)
:out
)
(
define-ioctl-command
TIOCGWINSZ
#\t
104
winsize
:out
)
(
define-ioctl-command
TIOCGWINSZ
#\t
104
(
struct
winsize
)
:out
)
(
define-ioctl-command
TIOCSWINSZ
#\t
103
winsize
:in
)
(
define-ioctl-command
TIOCSWINSZ
#\t
103
(
struct
winsize
)
:in
)
(
define-ioctl-command
TIOCNOTTY
#\t
113
nil
:void
)
(
define-ioctl-command
TIOCNOTTY
#\t
113
nil
:void
)
(
define-ioctl-command
TIOCSLTC
#\t
117
ltchars
:in
)
(
define-ioctl-command
TIOCSLTC
#\t
117
ltchars
:in
)
(
define-ioctl-command
TIOCGLTC
#\t
116
ltchars
:out
)
(
define-ioctl-command
TIOCGLTC
#\t
116
ltchars
:out
)
(
define-ioctl-command
TIOCSPGRP
#\t
118
int
1
:in
)
(
define-ioctl-command
TIOCSPGRP
#\t
118
int
:in
)
(
define-ioctl-command
TIOCGPGRP
#\t
119
int
1
:out
)
(
define-ioctl-command
TIOCGPGRP
#\t
119
int
:out
)
;;; Keyboard iotctl commands.
;;; Keyboard iotctl commands.
(
define-ioctl-command
KBDCGET
#\k
0
kbdarg
:inout
)
(
define-ioctl-command
KBDCGET
#\k
0
kbdarg
:inout
)
...
@@ -947,12 +948,12 @@
...
@@ -947,12 +948,12 @@
(
define-ioctl-command
KBDCRESET
#\k
2
nil
:void
)
(
define-ioctl-command
KBDCRESET
#\k
2
nil
:void
)
(
define-ioctl-command
KBDCRST
#\k
3
nil
:void
)
(
define-ioctl-command
KBDCRST
#\k
3
nil
:void
)
(
define-ioctl-command
KBDCSSTD
#\k
4
nil
:void
)
(
define-ioctl-command
KBDCSSTD
#\k
4
nil
:void
)
(
define-ioctl-command
KBDSGET
#\k
5
int
1
:out
)
(
define-ioctl-command
KBDSGET
#\k
5
int
:out
)
(
define-ioctl-command
KBDGCLICK
#\k
6
int
1
:out
)
(
define-ioctl-command
KBDGCLICK
#\k
6
int
:out
)
(
define-ioctl-command
KBDSCLICK
#\k
7
int
1
:in
)
(
define-ioctl-command
KBDSCLICK
#\k
7
int
:in
)
;;; File ioctl commands.
;;; File ioctl commands.
(
define-ioctl-command
FIONREAD
#\f
127
int
1
:out
)
(
define-ioctl-command
FIONREAD
#\f
127
int
:out
)
(
defun
unix-ioctl
(
fd
cmd
arg
)
(
defun
unix-ioctl
(
fd
cmd
arg
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment