/[bison]/bison/lib/argmatch.h
ViewVC logotype

Diff of /bison/lib/argmatch.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by eggert, Mon Aug 12 14:11:02 2002 UTC revision 1.3 by eggert, Thu Nov 21 05:12:27 2002 UTC
# Line 1  Line 1 
1  /* argmatch.h -- definitions and prototypes for argmatch.c  /* argmatch.h -- definitions and prototypes for argmatch.c
2     Copyright (C) 1990, 1998, 1999, 2001 Free Software Foundation, Inc.     Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
3    
4     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 40  Line 40 
40     cost, since it will be statically evalauted to `assert (0)' or     cost, since it will be statically evalauted to `assert (0)' or
41     `assert (1)'.  Unfortunately there is no -Wassert-0. */     `assert (1)'.  Unfortunately there is no -Wassert-0. */
42    
 # undef ARRAY_CARDINALITY  
43  # define ARRAY_CARDINALITY(Array) (sizeof ((Array)) / sizeof (*(Array)))  # define ARRAY_CARDINALITY(Array) (sizeof ((Array)) / sizeof (*(Array)))
44    
45  # define ARGMATCH_ASSERT(Arglist, Vallist)      \  # define ARGMATCH_CONSTRAINT(Arglist, Vallist) \
46    assert (ARRAY_CARDINALITY ((Arglist)) == ARRAY_CARDINALITY ((Vallist)) + 1)    (ARRAY_CARDINALITY ((Arglist)) == ARRAY_CARDINALITY ((Vallist)) + 1)
47    # define ARGMATCH_ASSERT(Arglist, Vallist) \
48      assert (ARGMATCH_CONSTRAINT (Arglist, Vallist))
49    
50  /* Return the index of the element of ARGLIST (NULL terminated) that  /* Return the index of the element of ARGLIST (NULL terminated) that
51     matches with ARG.  If VALLIST is not NULL, then use it to resolve     matches with ARG.  If VALLIST is not NULL, then use it to resolve

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26