(root)/
texinfo-7.1/
tp/
Texinfo/
XS/
parsetexi/
counter.h
       1  /* counter.h - definitions for counter.c */
       2  #ifndef COUNTER_H
       3  #define COUNTER_H
       4  
       5  #include "tree_types.h"
       6  
       7  /* Copyright 2015-2023 Free Software Foundation, Inc.
       8  
       9     This program is free software: you can redistribute it and/or modify
      10     it under the terms of the GNU General Public License as published by
      11     the Free Software Foundation, either version 3 of the License, or
      12     (at your option) any later version.
      13  
      14     This program is distributed in the hope that it will be useful,
      15     but WITHOUT ANY WARRANTY; without even the implied warranty of
      16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17     GNU General Public License for more details.
      18  
      19     You should have received a copy of the GNU General Public License
      20     along with this program.  If not, see <http://www.gnu.org/licenses/>. */
      21  
      22  #include "tree_types.h"
      23  
      24  typedef struct {
      25      int *values; /* Array of values. */
      26      ELEMENT **elts; /* Elements corresponding to each value. */
      27      int nvalues;
      28      int space;
      29  } COUNTER;
      30  
      31  void counter_push (COUNTER *c, ELEMENT *e, int n);
      32  void counter_pop (COUNTER *c);
      33  void counter_inc (COUNTER *c);
      34  void counter_dec (COUNTER *c);
      35  int counter_value (COUNTER *c, ELEMENT *e);
      36  
      37  /* A large positive number used to represent an unlimited number of remaining
      38     arguments. */
      39  #define COUNTER_VARIADIC 32767
      40  
      41  #endif