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_max; /* Largest item in the histogram*/
|
||||||
int hi_min; /* Smallest item in the histogram*/
|
int hi_min; /* Smallest item in the histogram*/
|
||||||
int hi_cum; /* Cumulative item total */
|
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 */
|
bool hi_ptrKeys; /* TRUE if title is a pointer */
|
||||||
int * hi_data; /* Buckets for histogram counts */
|
int * hi_data; /* Buckets for histogram counts */
|
||||||
struct histogram * hi_next; /* Linked list to next histogram*/
|
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
|
#define DebugIsSet(cid, f) debugClients[(spointertype) cid].dc_flags[f].df_value
|
||||||
|
|
||||||
/* procedures */
|
/* procedures */
|
||||||
extern void HistCreate(char *name, int ptrKeys, int low, int step, int bins);
|
extern void HistCreate(const char *name, int ptrKeys, int low, int step, int bins);
|
||||||
extern void HistAdd(char *name, int ptrKeys, int value);
|
extern void HistAdd(const char *name, int ptrKeys, int value);
|
||||||
extern void HistPrint(char *name);
|
extern void HistPrint(const char *name);
|
||||||
extern ClientData DebugAddClient(char *name, int maxflags);
|
extern ClientData DebugAddClient(char *name, int maxflags);
|
||||||
extern int DebugAddFlag(ClientData clientID, char *name);
|
extern int DebugAddFlag(ClientData clientID, char *name);
|
||||||
extern void DebugShow(ClientData clientID);
|
extern void DebugShow(ClientData clientID);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ Histogram * hist_list = (Histogram *) NULL;
|
||||||
*/
|
*/
|
||||||
Histogram *
|
Histogram *
|
||||||
histFind(name, ptrKeys)
|
histFind(name, ptrKeys)
|
||||||
char * name;
|
const char * name;
|
||||||
bool ptrKeys;
|
bool ptrKeys;
|
||||||
{
|
{
|
||||||
Histogram * h;
|
Histogram * h;
|
||||||
|
|
@ -82,7 +82,7 @@ histFind(name, ptrKeys)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
HistCreate(name, ptrKeys, low, step, bins)
|
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*/
|
bool ptrKeys; /* TRUE if name is a character pointer*/
|
||||||
int low; /* The lowest value for the histogram */
|
int low; /* The lowest value for the histogram */
|
||||||
int step; /* The increment for each bin */
|
int step; /* The increment for each bin */
|
||||||
|
|
@ -135,7 +135,7 @@ HistCreate(name, ptrKeys, low, step, bins)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
HistAdd(name, ptrKeys, value)
|
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*/
|
bool ptrKeys; /* TRUE if the name is a pointer*/
|
||||||
int value; /* Value to index the column */
|
int value; /* Value to index the column */
|
||||||
{
|
{
|
||||||
|
|
@ -177,7 +177,7 @@ HistAdd(name, ptrKeys, value)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
HistPrint(name)
|
HistPrint(name)
|
||||||
char * name;
|
const char * name;
|
||||||
{
|
{
|
||||||
FILE * fp, * fopen();
|
FILE * fp, * fopen();
|
||||||
Histogram * h;
|
Histogram * h;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue