debug/debug.c: constify and add prototype
This commit is contained in:
parent
195dda1e06
commit
1241e95dab
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
struct debugClient
|
||||
{
|
||||
char *dc_name; /* Name of client */
|
||||
const char *dc_name; /* Name of client */
|
||||
int dc_maxflags; /* Maximum number of flags */
|
||||
int dc_nflags; /* Number flags now in array */
|
||||
struct debugFlag *dc_flags; /* Array of flags */
|
||||
|
|
@ -36,7 +36,7 @@ struct debugClient
|
|||
|
||||
struct debugFlag
|
||||
{
|
||||
char *df_name; /* Name of debugging flag */
|
||||
const char *df_name; /* Name of debugging flag */
|
||||
bool df_value; /* Current value of the flag */
|
||||
};
|
||||
|
||||
|
|
@ -71,8 +71,8 @@ extern struct debugClient debugClients[];
|
|||
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 ClientData DebugAddClient(const char *name, int maxflags);
|
||||
extern int DebugAddFlag(ClientData clientID, const char *name);
|
||||
extern void DebugShow(ClientData clientID);
|
||||
extern void DebugSet(ClientData clientID, int argc, char *argv[], int value);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ int debugNumClients = 0;
|
|||
|
||||
ClientData
|
||||
DebugAddClient(name, maxflags)
|
||||
char *name;
|
||||
const char *name;
|
||||
int maxflags;
|
||||
{
|
||||
struct debugClient *dc;
|
||||
|
|
@ -114,7 +114,7 @@ DebugAddClient(name, maxflags)
|
|||
int
|
||||
DebugAddFlag(clientID, name)
|
||||
ClientData clientID; /* Client identifier from DebugAddClient */
|
||||
char *name; /* Name of debugging flag */
|
||||
const char *name; /* Name of debugging flag */
|
||||
{
|
||||
int id = (int) CD2INT(clientID);
|
||||
struct debugClient *dc;
|
||||
|
|
|
|||
Loading…
Reference in New Issue