#define ISSEP(x) \
((x) == ' ' || (x) == '\t' || (x) == ',' || (x) == '"' || (x) == ';' \
|| (x) == ')' || (x) == '(' \
- || ((macro_alternate || macro_mri) && ((x) == '<' || (x) == '>')))
+ || ((macro_alternate || flag_mri) && ((x) == '<' || (x) == '>')))
#define ISBASE(x) \
((x) == 'b' || (x) == 'B' \
static int macro_alternate;
-/* Whether we are in MRI mode. */
-
-static int macro_mri;
-
/* Whether we should strip '@' characters. */
#define macro_strip_at false
/* Initialize macro processing. */
void
-macro_init (int alternate, int mri)
+macro_init (int alternate)
{
macro_hash = htab_create_alloc (16, hash_string_tuple, eq_string_tuple,
macro_del_f, notes_calloc, NULL);
macro_defined = 0;
macro_alternate = alternate;
- macro_mri = mri;
}
void
macro_alternate = alternate;
}
-/* Switch in and out of MRI mode on the fly. */
-
-void
-macro_mri_mode (int mri)
-{
- macro_mri = mri;
-}
-
/* Read input lines till we get to a TO string.
Increase nesting depth if we get a FROM string.
Put the results into sb at PTR.
if (i < ptr->len && (ptr->ptr[i] == '.'
|| NO_PSEUDO_DOT
- || macro_mri))
+ || flag_mri))
{
if (! flag_m68k_mri && ptr->ptr[i] == '.')
i++;
{
while (idx < in->len
&& (in->ptr[idx] == '"'
- || (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
+ || (in->ptr[idx] == '<' && (macro_alternate || flag_mri))
|| (in->ptr[idx] == '\'' && macro_alternate)))
{
if (in->ptr[idx] == '<')
sb_add_string (out, buf);
}
else if (in->ptr[idx] == '"'
- || (in->ptr[idx] == '<' && (macro_alternate || macro_mri))
+ || (in->ptr[idx] == '<' && (macro_alternate || flag_mri))
|| (macro_alternate && in->ptr[idx] == '\''))
{
if (macro_alternate && ! macro_strip_at && in->ptr[idx] != '<')
&& in->ptr[idx] != '\t'))
&& in->ptr[idx] != ','
&& (in->ptr[idx] != '<'
- || (! macro_alternate && ! macro_mri)))
+ || (! macro_alternate && ! flag_mri)))
{
char tchar = in->ptr[idx];
idx = sb_skip_white (idx, in);
/* This is a formal. */
name = sb_terminate (&formal->name);
- if (! macro_mri
+ if (! flag_mri
&& idx < in->len
&& in->ptr[idx] == ':'
&& (! is_name_beginner (':')
}
}
- if (macro_mri)
+ if (flag_mri)
{
formal_entry *formal = new_formal ();
idx = get_token (idx, in, name);
if (idx < in->len
&& in->ptr[idx] == kind
- && (! macro_mri || macro_strip_at)
+ && (! flag_mri || macro_strip_at)
&& (! macro_strip_at || kind == '@'))
idx++;
return idx;
if (in->ptr[src] == '&')
{
sb_reset (&t);
- if (macro_mri)
+ if (flag_mri)
{
if (src + 1 < in->len && in->ptr[src + 1] == '&')
src = sub_actual (src + 2, in, &t, formal_hash, '\'', out, 1);
sb_add_char (out, '&');
src++;
}
- else if (macro_mri && src < in->len && ISALNUM (in->ptr[src]))
+ else if (flag_mri && src < in->len && ISALNUM (in->ptr[src]))
{
int ind;
formal_entry *f;
src = sub_actual (src, in, &t, formal_hash, '\'', out, 0);
}
}
- else if ((macro_alternate || macro_mri)
+ else if ((macro_alternate || flag_mri)
&& is_name_beginner (in->ptr[src])
&& (! inquote
|| ! macro_strip_at
}
}
else if (in->ptr[src] == '"'
- || (macro_mri && in->ptr[src] == '\''))
+ || (flag_mri && in->ptr[src] == '\''))
{
inquote = !inquote;
sb_add_char (out, in->ptr[src++]);
++src;
}
}
- else if (macro_mri
+ else if (flag_mri
&& in->ptr[src] == '='
&& src + 1 < in->len
&& in->ptr[src + 1] == '=')
while (f != NULL && f->index < 0)
f = f->next;
- if (macro_mri)
+ if (flag_mri)
{
/* The macro may be called with an optional qualifier, which may
be referred to in the macro body as \0. */
scan = idx;
while (scan < in->len
&& !ISSEP (in->ptr[scan])
- && !(macro_mri && in->ptr[scan] == '\'')
+ && !(flag_mri && in->ptr[scan] == '\'')
&& (!macro_alternate && in->ptr[scan] != '='))
scan++;
if (scan < in->len && !macro_alternate && in->ptr[scan] == '=')
formal_entry **pf;
int c;
- if (!macro_mri)
+ if (!flag_mri)
{
err = _("too many positional arguments");
break;
while (f != NULL && f->index < 0);
}
- if (! macro_mri)
+ if (! flag_mri)
idx = sb_skip_comma (idx, in);
else
{
m->name);
}
- if (macro_mri)
+ if (flag_mri)
{
ptr = str_hash_find (m->formal_hash,
macro_strip_at ? "$NARG" : "NARG");
}
/* Discard any unnamed formal arguments. */
- if (macro_mri)
+ if (flag_mri)
{
formal_entry **pf;
sb line_sb;
if (! is_name_beginner (*line)
- && (! macro_mri || *line != '.'))
+ && (! flag_mri || *line != '.'))
return 0;
s = line + 1;