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
03da76f4
"README.md" did not exist on "0abf1b539018526615334cf2f544184cbe5273ac"
Commit
03da76f4
authored
33 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Added noise to skip over comments, which start with a # and end on the end
of the line.
parent
fe11ebf9
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
hemlock/termcap.lisp
+10
-6
10 additions, 6 deletions
hemlock/termcap.lisp
with
10 additions
and
6 deletions
hemlock/termcap.lisp
+
10
−
6
View file @
03da76f4
...
@@ -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/hemlock/termcap.lisp,v 1.
3
1991/0
2/08 16:38:29 ram
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/termcap.lisp,v 1.
4
1991/0
9/19 22:56:10 wlott
Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -92,12 +92,14 @@
...
@@ -92,12 +92,14 @@
;;; LEX-TERMCAP-NAME gathers characters until the next #\|, which separate
;;; LEX-TERMCAP-NAME gathers characters until the next #\|, which separate
;;; terminal names, or #\:, which terminate terminal names for an entry.
;;; terminal names, or #\:, which terminate terminal names for an entry.
;;; T is returned if the end of the names is reached for the entry.
;;; T is returned if the end of the names is reached for the entry.
;;; If we hit and EOF, act like we found a :.
;;;
;;;
(
defun
lex-termcap-name
(
stream
)
(
defun
lex-termcap-name
(
stream
)
(
init-termcap-string-buffer
)
(
init-termcap-string-buffer
)
(
loop
(
loop
(
let
((
char
(
read-char
stream
)))
(
let
((
char
(
read-char
stream
nil
#\:
)))
(
case
char
(
case
char
(
#\#
(
read-line
stream
nil
))
(
#\|
(
return
nil
))
(
#\|
(
return
nil
))
(
#\:
(
return
t
))
(
#\:
(
return
t
))
(
t
(
store-char
char
))))))
(
t
(
store-char
char
))))))
...
@@ -106,11 +108,11 @@
...
@@ -106,11 +108,11 @@
(
string=
name
*termcap-string-buffer*
:end2
*termcap-string-index*
))
(
string=
name
*termcap-string-buffer*
:end2
*termcap-string-index*
))
;;; SKIP-TERMCAP-NAMES eats characters until the next #\: which terminates
;;; SKIP-TERMCAP-NAMES eats characters until the next #\: which terminates
;;; terminal names for an entry.
;;; terminal names for an entry.
Stop also at EOF.
;;;
;;;
(
defun
skip-termcap-names
(
stream
)
(
defun
skip-termcap-names
(
stream
)
(
loop
(
loop
(
when
(
char=
(
read-char
stream
)
#\:
)
(
when
(
char=
(
read-char
stream
nil
#\:
)
#\:
)
(
return
))))
(
return
))))
;;; SKIP-TERMCAP-FIELDS skips the rest of an entry, returning nil if there
;;; SKIP-TERMCAP-FIELDS skips the rest of an entry, returning nil if there
...
@@ -120,10 +122,12 @@
...
@@ -120,10 +122,12 @@
(
defun
skip-termcap-fields
(
stream
)
(
defun
skip-termcap-fields
(
stream
)
(
loop
(
loop
(
multiple-value-bind
(
line
eofp
)
(
multiple-value-bind
(
line
eofp
)
(
read-line
stream
)
(
read-line
stream
nil
)
(
let
((
len
(
length
line
)))
(
let
((
len
(
length
line
)))
(
declare
(
simple-string
line
))
(
declare
(
simple-string
line
))
(
when
(
char=
(
schar
line
(
1-
len
))
#\:
)
(
when
(
and
(
not
(
zerop
len
))
(
not
(
char=
(
schar
line
0
)
#\#
))
(
char=
(
schar
line
(
1-
len
))
#\:
))
(
if
eofp
(
if
eofp
(
return
nil
)
(
return
nil
)
(
let
((
char
(
read-char
stream
nil
:eof
)))
(
let
((
char
(
read-char
stream
nil
:eof
)))
...
...
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