debug/hist.c: constify and add prototype
This commit is contained in:
parent
eb89ab181c
commit
195dda1e06
|
|
@ -54,7 +54,7 @@ typedef struct histogram
|
|||
int hi_max; /* Largest item in the histogram*/
|
||||
int hi_min; /* Smallest item in the histogram*/
|
||||
int hi_cum; /* Cumulative item total */
|
||||
char * hi_title; /* Histogram identifier */
|
||||
const char * hi_title; /* Histogram identifier */
|
||||
bool hi_ptrKeys; /* TRUE if title is a pointer */
|
||||
int * hi_data; /* Buckets for histogram counts */
|
||||
struct histogram * hi_next; /* Linked list to next histogram*/
|
||||
|
|
@ -68,9 +68,9 @@ extern struct debugClient debugClients[];
|
|||
#define DebugIsSet(cid, f) debugClients[(spointertype) cid].dc_flags[f].df_value
|
||||
|
||||
/* procedures */
|
||||
extern void HistCreate(char *name, int ptrKeys, int low, int step, int bins);
|
||||
extern void HistAdd(char *name, int ptrKeys, int value);
|
||||
extern void HistPrint(char *name);
|
||||
extern void HistCreate(const char *name, int ptrKeys, int low, int step, int bins);
|
||||
extern void HistAdd(const char *name, int ptrKeys, int value);
|
||||
extern void HistPrint(const char *name);
|
||||
extern ClientData DebugAddClient(char *name, int maxflags);
|
||||
extern int DebugAddFlag(ClientData clientID, char *name);
|
||||
extern void DebugShow(ClientData clientID);
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Histogram * hist_list = (Histogram *) NULL;
|
|||
*/
|
||||
Histogram *
|
||||
histFind(name, ptrKeys)
|
||||
char * name;
|
||||
const char * name;
|
||||
bool ptrKeys;
|
||||
{
|
||||
Histogram * h;
|
||||
|
|
@ -82,7 +82,7 @@ histFind(name, ptrKeys)
|
|||
*/
|
||||
void
|
||||
HistCreate(name, ptrKeys, low, step, bins)
|
||||
char * name; /* Name for histogram add and print */
|
||||
const char * name; /* Name for histogram add and print */
|
||||
bool ptrKeys; /* TRUE if name is a character pointer*/
|
||||
int low; /* The lowest value for the histogram */
|
||||
int step; /* The increment for each bin */
|
||||
|
|
@ -135,7 +135,7 @@ HistCreate(name, ptrKeys, low, step, bins)
|
|||
*/
|
||||
void
|
||||
HistAdd(name, ptrKeys, value)
|
||||
char * name; /* Identifier for the histogram */
|
||||
const char * name; /* Identifier for the histogram */
|
||||
bool ptrKeys; /* TRUE if the name is a pointer*/
|
||||
int value; /* Value to index the column */
|
||||
{
|
||||
|
|
@ -177,7 +177,7 @@ HistAdd(name, ptrKeys, value)
|
|||
*/
|
||||
void
|
||||
HistPrint(name)
|
||||
char * name;
|
||||
const char * name;
|
||||
{
|
||||
FILE * fp, * fopen();
|
||||
Histogram * h;
|
||||
|
|
|
|||
Loading…
Reference in New Issue