static int get_token (int, sb *, sb *);
static int getstring (int, sb *, sb *);
-static int get_any_string (int, sb *, sb *, int, int);
+static int get_any_string (int, sb *, sb *);
static formal_entry *new_formal (void);
static void del_formal (formal_entry *);
static int do_formals (macro_entry *, int, sb *);
static int
getstring (int idx, sb *in, sb *acc)
{
- idx = sb_skip_white (idx, in);
-
while (idx < in->len
&& (in->ptr[idx] == '"'
|| (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
*/
static int
-get_any_string (int idx, sb *in, sb *out, int expand, int pretend_quoted)
+get_any_string (int idx, sb *in, sb *out)
{
sb_reset (out);
idx = sb_skip_white (idx, in);
while (!ISSEP (in->ptr[idx]))
sb_add_char (out, in->ptr[idx++]);
}
- else if (in->ptr[idx] == '%'
- && macro_alternate
- && expand)
+ else if (in->ptr[idx] == '%' && macro_alternate)
{
int val;
char buf[20];
|| (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
|| (macro_alternate && in->ptr[idx] == '\''))
{
- if (macro_alternate
- && ! macro_strip_at
- && expand)
+ if (macro_alternate && ! macro_strip_at)
{
/* Keep the quotes. */
sb_add_char (out, '\"');
else
{
while (idx < in->len
- && (in->ptr[idx] == '"'
- || in->ptr[idx] == '\''
- || pretend_quoted
- || (in->ptr[idx] != ' '
- && in->ptr[idx] != '\t'
- && in->ptr[idx] != ','
- && (in->ptr[idx] != '<'
- || (! macro_alternate && ! macro_mri)))))
+ && in->ptr[idx] != ' '
+ && in->ptr[idx] != '\t'
+ && in->ptr[idx] != ','
+ && (in->ptr[idx] != '<'
+ || (! macro_alternate && ! macro_mri)))
{
if (in->ptr[idx] == '"'
|| in->ptr[idx] == '\'')
if (idx < in->len && in->ptr[idx] == '=')
{
/* Got a default. */
- idx = get_any_string (idx + 1, in, &formal->def, 1, 0);
+ idx = get_any_string (idx + 1, in, &formal->def);
idx = sb_skip_white (idx, in);
if (formal->type == FORMAL_REQUIRED)
{
n->next = m->formals;
m->formals = n;
- idx = get_any_string (idx, in, &n->actual, 1, 0);
+ idx = get_any_string (idx, in, &n->actual);
}
}
}
m->name);
sb_reset (&ptr->actual);
}
- idx = get_any_string (idx + 1, in, &ptr->actual, 0, 0);
+ idx = get_any_string (idx + 1, in, &ptr->actual);
if (ptr->actual.len > 0)
++narg;
}
}
if (f->type != FORMAL_VARARG)
- idx = get_any_string (idx, in, &f->actual, 1, 0);
+ idx = get_any_string (idx, in, &f->actual);
else
{
sb_add_buffer (&f->actual, in->ptr + idx, in->len - idx);
while (idx < in->len)
{
if (!irpc)
- idx = get_any_string (idx, in, &f.actual, 1, 0);
+ idx = get_any_string (idx, in, &f.actual);
else
{
if (in->ptr[idx] == '"')