mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
Support nested parens in make-docfile args
* lib-src/make-docfile.c (scan_c_stream): Allow nested parens. E.g., ‘(Lisp_Object XXX (force))’ for the identifier ‘force’, where XXX is a macro. This is for future changes.
This commit is contained in:
parent
aeab91bc55
commit
19e5d27daf
1 changed files with 3 additions and 2 deletions
|
|
@ -1205,12 +1205,13 @@ scan_c_stream (FILE *infile)
|
|||
c = getc (infile);
|
||||
}
|
||||
/* Copy arguments into ARGBUF. */
|
||||
while (true)
|
||||
for (ptrdiff_t nested = 0; ; )
|
||||
{
|
||||
*p++ = c;
|
||||
if (argbuf + sizeof argbuf <= p)
|
||||
fatal ("argument buffer exhausted");
|
||||
if (c == ')')
|
||||
nested += (c == '(') - (c == ')');
|
||||
if (c == ')' && !nested)
|
||||
break;
|
||||
c = getc (infile);
|
||||
if (c < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue