Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a5979c0e
Commit
a5979c0e
authored
Oct 16, 2001
by
Miles Bader
Browse files
(scan_c_file): Handle `new style' doc strings in comments [with `doc:'
keyword prefix].
parent
3ddf952f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
lib-src/make-docfile.c
lib-src/make-docfile.c
+24
-9
No files found.
lib-src/make-docfile.c
View file @
a5979c0e
...
...
@@ -401,6 +401,8 @@ scan_c_file (filename, mode)
c
=
'\n'
;
while
(
!
feof
(
infile
))
{
int
doc_keyword
=
0
;
if
(
c
!=
'\n'
&&
c
!=
'\r'
)
{
c
=
getc
(
infile
);
...
...
@@ -467,8 +469,9 @@ scan_c_file (filename, mode)
continue
;
c
=
read_c_string_or_comment
(
infile
,
-
1
,
0
);
/* DEFVAR_LISP ("name", addr /\* doc *\/)
DEFVAR_LISP ("name", addr, doc) */
/* DEFVAR_LISP ("name", addr, "doc")
DEFVAR_LISP ("name", addr /\* doc *\/)
DEFVAR_LISP ("name", addr, doc: /\* doc *\/) */
if
(
defunflag
)
commas
=
5
;
...
...
@@ -507,7 +510,7 @@ scan_c_file (filename, mode)
goto
eof
;
c
=
getc
(
infile
);
}
while
(
c
==
' '
||
c
==
'\n'
||
c
==
'\r'
||
c
==
'\t'
)
c
=
getc
(
infile
);
...
...
@@ -518,9 +521,18 @@ scan_c_file (filename, mode)
c
=
getc
(
infile
);
if
(
c
==
','
)
{
c
=
getc
(
infile
);
while
(
c
==
' '
||
c
==
'\n'
||
c
==
'\r'
||
c
==
'\t'
)
c
=
getc
(
infile
);
c
=
getc
(
infile
);
while
(
c
==
' '
||
c
==
'\n'
||
c
==
'\r'
||
c
==
'\t'
)
c
=
getc
(
infile
);
while
((
c
>=
'a'
&&
c
<=
'z'
)
||
(
c
>=
'Z'
&&
c
<=
'Z'
))
c
=
getc
(
infile
);
if
(
c
==
':'
)
{
doc_keyword
=
1
;
c
=
getc
(
infile
);
while
(
c
==
' '
||
c
==
'\n'
||
c
==
'\r'
||
c
==
'\t'
)
c
=
getc
(
infile
);
}
}
if
(
c
==
'"'
...
...
@@ -544,13 +556,16 @@ scan_c_file (filename, mode)
won't give the names of the arguments, so we shouldn't bother
trying to find them.
Old: DEFUN (..., "DOC") (args)
New: DEFUN (..., /\* DOC *\/ (args)) */
Various doc-string styles:
0: DEFUN (..., "DOC") (args) [!comment]
1: DEFUN (..., /\* DOC *\/ (args)) [comment && !doc_keyword]
2: DEFUN (..., doc: /\* DOC *\/) (args) [comment && doc_keyword]
*/
if
(
defunflag
&&
maxargs
!=
-
1
)
{
char
argbuf
[
1024
],
*
p
=
argbuf
;
if
(
!
comment
)
if
(
!
comment
||
doc_keyword
)
while
(
c
!=
')'
)
{
if
(
c
<
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment