X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f16b08196c780556cbf50691e2944960aebc46f6..09ccae9b18a7c09ebf7bb8df2a18c8c4a6def248:/src/uniqstr.h diff --git a/src/uniqstr.h b/src/uniqstr.h index 3eb152d3..c986df07 100644 --- a/src/uniqstr.h +++ b/src/uniqstr.h @@ -1,6 +1,6 @@ /* Keeping a unique copy of strings. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -32,6 +32,10 @@ uniqstr uniqstr_new (char const *str); /* Two uniqstr values have the same value iff they are the same. */ #define UNIQSTR_EQ(USTR1, USTR2) ((USTR1) == (USTR2)) +/* Compare two uniqstr a la strlen: negative for <, nul for =, and + positive for >. */ +#define UNIQSTR_CMP(USTR1, USTR2) ((USTR1) - (USTR2)) + /*--------------------------------------. | Initializing, destroying, debugging. | `--------------------------------------*/