First I did a cvs update papi.c to get all of George's changes and not be rude to what he did today.
First I did a cvs update papi.c to get all of George's changes
and not be rude to what he did today.

Then I did cvs commit papi.c to add my changes.

The documentation below is meant to help people.  If it
is too much, don't read it.  I have not done the LIST function
yet.  Phil please send me email on what you would like the
output of PAPI_list_events to look like.
cheers!
cricket!
-----------------------------------------------------------------------

added functions:
static int check_initialize(void)
EventSetInfo *get_valid_ESI(int *EventSetIndex, int *allocated_a_new_one )
int d_handler(char *errorName,int errorNum,
              int allocated_a_new_one,EventSetInfo *ESI)
  this is a stub -- not written or called yet --
  intended to replace some repetitive code
  which occurs in 3 functions.

-----------------------------------------------------------------------
modified functions:
static int initialize(void)
static EventSetInfo *allocate_EventSet(void)
    [one correction:
     /*memset(&ESI,0x00,sizeof(ESI)); incorrect arg 1*/
       memset(ESI,0x00,sizeof(ESI));
    ]
static int remove_event(EventSetInfo *ESI, int EventCode)
    In remove_event I reset the counters to 0, which is
    the same task performed by reset_event.  We need to
    look at both of these.
int PAPI_add_event(int *EventSetIndex, int EventCode)
int PAPI_add_events(int *EventSetIndex, int *EventCodes, int number)
int PAPI_add_pevent(int *EventSetIndex, int p_code, void *inout)

-----------------------------------------------------------------------
comment changes and one-line-of-code-added to accomodate addition of
"fullSlots" to EventSetInfo structure in following functions:
static int expand_dynamic_array(DynamicArray *DA)
int add_EventSet(EventSetInfo *ESI)
static int remove_EventSet(EventSetInfo *ESI)

-----------------------------------------------------------------------
This compiles with the following warnings:
sol2 sun4 c at cetus2e> !g
gcc -c papi.c -Wall
papi.c:1454: conflicting types for `PAPI_set_granularity'
papi.h:124: previous declaration of `PAPI_set_granularity'
papi.c: In function `PAPI_set_granularity':
papi.c:1456: too few arguments to function `PAPI_set_opt'
papi.c: In function `PAPI_set_domain':
papi.c:1464: too few arguments to function `PAPI_get_opt'
papi.c: At top level:
papi.c:144: warning: `get_space_for_counters' defined but not used
-----------------------------------------------------------------------

arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi