mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
maint: more macros
* src/output.c (ARRAY_CARDINALITY): Move to... * src/system.h: here. (STREQ, STRNEQ): new.
This commit is contained in:
@@ -41,8 +41,6 @@
|
||||
#include "symtab.h"
|
||||
#include "tables.h"
|
||||
|
||||
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
|
||||
|
||||
static struct obstack format_obstack;
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
# include <unistd.h>
|
||||
# include <inttypes.h>
|
||||
|
||||
#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
|
||||
#define STREQ(L, R) (strcmp(L, R) == 0)
|
||||
#define STRNEQ(L, R) (!STREQ(L, R))
|
||||
|
||||
# ifndef UINTPTR_MAX
|
||||
/* This isn't perfect, but it's good enough for Bison, which needs
|
||||
only to hash pointers. */
|
||||
|
||||
Reference in New Issue
Block a user