* src/scan-code.l: Remove useless braces.
Formatting changes.
Prefer NULL to 0.
* src/muscle-tab.c, src/system.h: Formatting changes.
muscle_grow (key, "]]", "");
}
-#define MUSCLE_COMMON_DECODE(Value) \
- case '$': \
- aver (*++(Value) == ']'); \
- aver (*++(Value) == '['); \
- obstack_sgrow (&muscle_obstack, "$"); \
- break; \
- case '@': \
- switch (*++(Value)) \
- { \
- case '@': obstack_sgrow (&muscle_obstack, "@" ); break; \
- case '{': obstack_sgrow (&muscle_obstack, "[" ); break; \
- case '}': obstack_sgrow (&muscle_obstack, "]" ); break; \
- default: aver (false); break; \
- } \
- break; \
- default: \
- obstack_1grow (&muscle_obstack, *(Value)); \
+#define MUSCLE_COMMON_DECODE(Value) \
+ case '$': \
+ aver (*++(Value) == ']'); \
+ aver (*++(Value) == '['); \
+ obstack_sgrow (&muscle_obstack, "$"); \
+ break; \
+ case '@': \
+ switch (*++(Value)) \
+ { \
+ case '@': obstack_sgrow (&muscle_obstack, "@" ); break; \
+ case '{': obstack_sgrow (&muscle_obstack, "[" ); break; \
+ case '}': obstack_sgrow (&muscle_obstack, "]" ); break; \
+ default: aver (false); break; \
+ } \
+ break; \
+ default: \
+ obstack_1grow (&muscle_obstack, *(Value)); \
break;
/* Reverse of MUSCLE_OBSTACK_SGROW. */
/* An obstack dedicated to receive muscle keys and values. */
extern struct obstack muscle_obstack;
-#define MUSCLE_INSERT_BOOL(Key, Value) \
-do { \
- int v = Value; \
- MUSCLE_INSERT_INT (Key, v); \
-} while(0)
-
-#define MUSCLE_INSERT_INT(Key, Value) \
-do { \
- obstack_fgrow1 (&muscle_obstack, "%d", Value); \
- obstack_1grow (&muscle_obstack, 0); \
- muscle_insert (Key, obstack_finish (&muscle_obstack)); \
-} while(0)
-
-#define MUSCLE_INSERT_LONG_INT(Key, Value) \
-do { \
- obstack_fgrow1 (&muscle_obstack, "%ld", Value); \
- obstack_1grow (&muscle_obstack, 0); \
- muscle_insert (Key, obstack_finish (&muscle_obstack)); \
-} while(0)
-
-#define MUSCLE_INSERT_STRING_RAW(Key, Value) \
-do { \
- obstack_sgrow (&muscle_obstack, Value); \
- obstack_1grow (&muscle_obstack, 0); \
- muscle_insert (Key, obstack_finish (&muscle_obstack)); \
-} while(0)
-
-#define MUSCLE_INSERT_STRING(Key, Value) \
-do { \
- MUSCLE_OBSTACK_SGROW (&muscle_obstack, Value); \
- obstack_1grow (&muscle_obstack, 0); \
- muscle_insert (Key, obstack_finish (&muscle_obstack)); \
-} while(0)
-
-#define MUSCLE_OBSTACK_SGROW(Obstack, Value) \
-do { \
- char const *p; \
- for (p = Value; *p; p++) \
- switch (*p) \
- { \
- case '$': obstack_sgrow (Obstack, "$]["); break; \
- case '@': obstack_sgrow (Obstack, "@@" ); break; \
- case '[': obstack_sgrow (Obstack, "@{" ); break; \
- case ']': obstack_sgrow (Obstack, "@}" ); break; \
- default: obstack_1grow (Obstack, *p); break; \
- } \
-} while(0)
-
-#define MUSCLE_INSERT_C_STRING(Key, Value) \
-do { \
- MUSCLE_OBSTACK_SGROW (&muscle_obstack, \
- quotearg_style (c_quoting_style, \
- Value)); \
- obstack_1grow (&muscle_obstack, 0); \
- muscle_insert (Key, obstack_finish (&muscle_obstack)); \
-} while(0)
+#define MUSCLE_INSERT_BOOL(Key, Value) \
+ do { \
+ int v = Value; \
+ MUSCLE_INSERT_INT (Key, v); \
+ } while (0)
+
+#define MUSCLE_INSERT_INT(Key, Value) \
+ do { \
+ obstack_fgrow1 (&muscle_obstack, "%d", Value); \
+ obstack_1grow (&muscle_obstack, 0); \
+ muscle_insert (Key, obstack_finish (&muscle_obstack)); \
+ } while (0)
+
+#define MUSCLE_INSERT_LONG_INT(Key, Value) \
+ do { \
+ obstack_fgrow1 (&muscle_obstack, "%ld", Value); \
+ obstack_1grow (&muscle_obstack, 0); \
+ muscle_insert (Key, obstack_finish (&muscle_obstack)); \
+ } while (0)
+
+#define MUSCLE_INSERT_STRING_RAW(Key, Value) \
+ do { \
+ obstack_sgrow (&muscle_obstack, Value); \
+ obstack_1grow (&muscle_obstack, 0); \
+ muscle_insert (Key, obstack_finish (&muscle_obstack)); \
+ } while (0)
+
+#define MUSCLE_INSERT_STRING(Key, Value) \
+ do { \
+ MUSCLE_OBSTACK_SGROW (&muscle_obstack, Value); \
+ obstack_1grow (&muscle_obstack, 0); \
+ muscle_insert (Key, obstack_finish (&muscle_obstack)); \
+ } while (0)
+
+#define MUSCLE_OBSTACK_SGROW(Obstack, Value) \
+ do { \
+ char const *p; \
+ for (p = Value; *p; p++) \
+ switch (*p) \
+ { \
+ case '$': obstack_sgrow (Obstack, "$]["); break; \
+ case '@': obstack_sgrow (Obstack, "@@" ); break; \
+ case '[': obstack_sgrow (Obstack, "@{" ); break; \
+ case ']': obstack_sgrow (Obstack, "@}" ); break; \
+ default: obstack_1grow (Obstack, *p); break; \
+ } \
+ } while (0)
+
+#define MUSCLE_INSERT_C_STRING(Key, Value) \
+ do { \
+ MUSCLE_OBSTACK_SGROW (&muscle_obstack, \
+ quotearg_style (c_quoting_style, \
+ Value)); \
+ obstack_1grow (&muscle_obstack, 0); \
+ muscle_insert (Key, obstack_finish (&muscle_obstack)); \
+ } while (0)
/* Append VALUE to the current value of KEY. If KEY did not already
exist, create it. Use MUSCLE_OBSTACK. De-allocate the previously
muscle values are output *double* quoted, one needs to strip the first level
of quotes to reach the list itself. */
void muscle_pair_list_grow (const char *muscle,
- const char *a1, const char *a2);
+ const char *a1, const char *a2);
/* In the format `[[file_name:line.column]], [[file_name:line.column]]', append
LOC to MUSCLE. Use digraphs for special characters in each file name. */
<SC_RULE_ACTION>
{
"$"("<"{tag}">")?{ref} {
- ref_tail_fields = 0;
+ ref_tail_fields = NULL;
handle_action_dollar (self->rule, yytext, *loc);
- if (ref_tail_fields) {
+ if (ref_tail_fields)
obstack_sgrow (&obstack_for_string, ref_tail_fields);
- }
need_semicolon = true;
}
"@"{ref} {
- ref_tail_fields = 0;
+ ref_tail_fields = NULL;
handle_action_at (self->rule, yytext, *loc);
- if (ref_tail_fields) {
+ if (ref_tail_fields)
obstack_sgrow (&obstack_for_string, ref_tail_fields);
- }
need_semicolon = true;
}
"$" {
not visible from current midrule. */
#define VARIANT_NOT_VISIBLE_FROM_MIDRULE (1 << 2)
-static variant *variant_table = 0;
+static variant *variant_table = NULL;
static unsigned variant_table_size = 0;
static unsigned variant_count = 0;
variant_table_free (void)
{
free (variant_table);
- variant_table = 0;
+ variant_table = NULL;
variant_table_size = variant_count = 0;
}
}
static const char *
-get_at_spec(unsigned symbol_index)
+get_at_spec (unsigned symbol_index)
{
static char at_buf[20];
if (symbol_index == 0)
locations_flag = true;
n = parse_ref (cp, effective_rule, effective_rule_length,
- rule->midrule_parent_rhs_index, text, at_loc, '@');
+ rule->midrule_parent_rhs_index, text, at_loc, '@');
switch (n)
{
case INVALID_REF:
# define obstack_chunk_free free
# include <obstack.h>
-# define obstack_sgrow(Obs, Str) \
+# define obstack_sgrow(Obs, Str) \
obstack_grow (Obs, Str, strlen (Str))
-# define obstack_fgrow1(Obs, Format, Arg1) \
-do { \
- char buf[4096]; \
- sprintf (buf, Format, Arg1); \
- obstack_grow (Obs, buf, strlen (buf)); \
-} while (0)
+# define obstack_fgrow1(Obs, Format, Arg1) \
+ do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+ } while (0)
-# define obstack_fgrow2(Obs, Format, Arg1, Arg2) \
-do { \
- char buf[4096]; \
- sprintf (buf, Format, Arg1, Arg2); \
- obstack_grow (Obs, buf, strlen (buf)); \
-} while (0)
+# define obstack_fgrow2(Obs, Format, Arg1, Arg2) \
+ do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1, Arg2); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+ } while (0)
-# define obstack_fgrow3(Obs, Format, Arg1, Arg2, Arg3) \
-do { \
- char buf[4096]; \
- sprintf (buf, Format, Arg1, Arg2, Arg3); \
- obstack_grow (Obs, buf, strlen (buf)); \
-} while (0)
+# define obstack_fgrow3(Obs, Format, Arg1, Arg2, Arg3) \
+ do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1, Arg2, Arg3); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+ } while (0)
-# define obstack_fgrow4(Obs, Format, Arg1, Arg2, Arg3, Arg4) \
-do { \
- char buf[4096]; \
- sprintf (buf, Format, Arg1, Arg2, Arg3, Arg4); \
- obstack_grow (Obs, buf, strlen (buf)); \
-} while (0)
+# define obstack_fgrow4(Obs, Format, Arg1, Arg2, Arg3, Arg4) \
+ do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1, Arg2, Arg3, Arg4); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+ } while (0)
| Free a linked list. |
`---------------------*/
-# define LIST_FREE(Type, List) \
-do { \
- Type *_node, *_next; \
- for (_node = List; _node; _node = _next) \
- { \
- _next = _node->next; \
- free (_node); \
- } \
-} while (0)
+# define LIST_FREE(Type, List) \
+ do { \
+ Type *_node, *_next; \
+ for (_node = List; _node; _node = _next) \
+ { \
+ _next = _node->next; \
+ free (_node); \
+ } \
+ } while (0)
/*---------------------------------------------.