typedef struct
{
int code;
- char *message;
+ const char *message;
}
responses_t;
typedef struct
{
/* The command string corresponding to this operation (e.g. "play") */
- char *command;
+ const char *command;
/* The function associated with it */
response_codes (*operation) ( command_argument );
/* a boolean to indicate if this is a unit or global command
/* What type is the argument (RTTI :-) ATYPE_whatever */
int type;
/* online help information */
- char *help;
+ const char *help;
}
command_t;
/** Lookup the response message for a status code.
*/
-inline char *get_response_msg( int code )
+inline const char *get_response_msg( int code )
{
int i = 0;
for ( i = 0; responses[ i ].message != NULL && code != responses[ i ].code; i ++ ) ;