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;
{"INSERT", miracle_insert, 1, ATYPE_STRING, "Insert a clip at the given clip index."},
{"REMOVE", miracle_remove, 1, ATYPE_NONE, "Remove a clip at the given clip index."},
{"CLEAN", miracle_clean, 1, ATYPE_NONE, "Clean a unit by removing all but the currently playing clip."},
+ {"WIPE", miracle_wipe, 1, ATYPE_NONE, "Clean a unit by removing everything before the currently playing clip."},
{"CLEAR", miracle_clear, 1, ATYPE_NONE, "Clear a unit by removing all clips."},
{"MOVE", miracle_move, 1, ATYPE_INT, "Move a clip to another clip index."},
{"APND", miracle_append, 1, ATYPE_STRING, "Append a clip specified in absolute filename argument."},
/** 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 ++ ) ;