counter.h 353 B

12345678910111213
  1. typedef struct {
  2. int *values; /* Array of values. */
  3. ELEMENT **elts; /* Elements corresponding to each value. */
  4. int nvalues;
  5. int space;
  6. } COUNTER;
  7. void counter_push (COUNTER *c, ELEMENT *e, int n);
  8. void counter_pop (COUNTER *c);
  9. void counter_inc (COUNTER *c);
  10. void counter_dec (COUNTER *c);
  11. int counter_value (COUNTER *c, ELEMENT *e);