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
64564400
Commit
64564400
authored
14 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
Make the docstrings follow the CMUCL convention so that they are lined
up neatly when describe prints them.
parent
f95cf535
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/commandline.lisp
+18
-17
18 additions, 17 deletions
code/commandline.lisp
with
18 additions
and
17 deletions
code/commandline.lisp
+
18
−
17
View file @
64564400
...
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/commandline.lisp,v 1.2
1
2010/05/15 1
2:52:19
rtoy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/commandline.lisp,v 1.2
2
2010/05/15 1
9:36:30
rtoy Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -45,7 +45,7 @@
(
defvar
*batch-mode*
nil
"When True runs lisp with its input coming from standard-input.
If an error is detected returns error code 1, otherwise 0."
)
If an error is detected returns error code 1, otherwise 0."
)
(
defstruct
(
command-line-switch
(
:conc-name
cmd-switch-
)
(
:constructor
make-cmd-switch
...
...
@@ -128,10 +128,10 @@
(
setq
str
(
pop
cmd-strings
))))))))
(
defun
get-command-line-switch
(
sname
)
"Accepts the name of a switch as a string and returns the value of
the
switch. If no value was specified, then any following words are
returned.
If there are no following words, then t is returned. If
the switch was not
specified, then nil is returned."
"Accepts the name of a switch as a string and returns the value of
the
switch. If no value was specified, then any following words are
returned.
If there are no following words, then t is returned. If
the switch was not
specified, then nil is returned."
(
let*
((
name
(
if
(
char=
(
schar
sname
0
)
#\-
)
(
subseq
sname
1
)
sname
))
(
switch
(
find
name
*command-line-switches*
:test
#'
string-equal
...
...
@@ -146,8 +146,8 @@
;;;; Defining Switches and invoking demons.
(
defvar
*complain-about-illegal-switches*
t
"When set, invoking switch demons complains about illegal switches
that have
not been defined with DEFSWITCH."
)
"When set, invoking switch demons complains about illegal switches
that have
not been defined with DEFSWITCH."
)
;;; This is a list of lists consisting of the legal switch names,
;;; switch description, and argument description. The description and
...
...
@@ -183,15 +183,16 @@
(
invoke-demon
switch
))))))
(
defmacro
defswitch
(
name
&optional
function
docstring
arg-name
)
"Associates function with the switch name in *command-switch-demons*. Name
is a simple-string that does not begin with a hyphen, unless the switch name
really does begin with one. Function is optional, but defining the switch
is necessary to keep invoking switch demons from complaining about illegal
switches. This can be inhibited with *complain-about-illegal-switches*.
The optional arguments, arg-name and docstring, are used by -help
to describe the switch. Arg-name is a string naming the argument
(if any) for the switch. Docstring describe the switch."
"Associates function with the switch name in
*command-switch-demons*. Name is a simple-string that does not
begin with a hyphen, unless the switch name really does begin with
one. Function is optional, but defining the switch is necessary to
keep invoking switch demons from complaining about illegal switches.
This can be inhibited with *complain-about-illegal-switches*.
The optional arguments, arg-name and docstring, are used by -help to
describe the switch. Arg-name is a string naming the argument (if
any) for the switch. Docstring describe the switch."
(
let
((
gname
(
gensym
))
(
gfunction
(
gensym
)))
`
(
let
((
,
gname
,
name
)
...
...
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