Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ toggleset_free()
}

void
toggle_list_add_command(toggle_list *t, char *cmd)
toggle_list_add_command(toggle_list *t, const char *cmd)
{
char **new_cmds;
int idx;
Expand Down Expand Up @@ -918,7 +918,7 @@ cmd_playlist(int argc, char *argv[])
}

void
cmd_execute(char *cmd)
cmd_execute(const char *cmd)
{
const char *errmsg = NULL;
bool found;
Expand Down
4 changes: 2 additions & 2 deletions commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int cmd_toggle(int argc, char *argv[]);
int cmd_playlist(int argc, char *argv[]);

/* parse a string and execute it as a command */
void cmd_execute(char *cmd);
void cmd_execute(const char *cmd);


/****************************************************************************
Expand All @@ -80,7 +80,7 @@ void toggleset_init();
void toggleset_free();

toggle_list *toggle_list_create(int registr, int argc, char *argv[]);
void toggle_list_add_command(toggle_list *t, char *cmd);
void toggle_list_add_command(toggle_list *t, const char *cmd);
void toggle_list_free(toggle_list *t);

void toggle_add(toggle_list *t);
Expand Down
6 changes: 3 additions & 3 deletions keybindings.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ kb_str2action(const char *s, KeyAction *action)
}

KeyCode
kb_str2specialKey(char *s)
kb_str2specialKey(const char *s)
{
size_t i;

Expand All @@ -374,7 +374,7 @@ kb_str2specialKey(char *s)
}

KeyCode
kb_str2keycode(char *s)
kb_str2keycode(const char *s)
{
KeyCode val;

Expand All @@ -387,7 +387,7 @@ kb_str2keycode(char *s)
}

KeyCode
kb_str2keycode2(char *control, char *key)
kb_str2keycode2(const char *control, const char *key)
{
KeyCode val;

Expand Down
6 changes: 3 additions & 3 deletions keybindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ void kb_unbind_all();
bool kb_execute(KeyCode);
bool kb_execute_by_name(const char *);

bool kb_str2action(const char*, KeyAction*);
KeyCode kb_str2keycode(char*);
KeyCode kb_str2keycode2(char*, char*);
bool kb_str2action(const char *, KeyAction *);
KeyCode kb_str2keycode(const char *);
KeyCode kb_str2keycode2(const char *, const char *);


/*
Expand Down
4 changes: 2 additions & 2 deletions paint.c
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ paint_all()
* identical to that of printf(3) (vwprintw(3) actually).
*/
void
paint_error(char *fmt, ...)
paint_error(const char *fmt, ...)
{
va_list ap;

Expand All @@ -574,7 +574,7 @@ paint_error(char *fmt, ...)
* is identical to that of printf(3) (vwprintw(3) actually).
*/
void
paint_message(char *fmt, ...)
paint_message(const char *fmt, ...)
{
va_list ap;

Expand Down
4 changes: 2 additions & 2 deletions paint.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ extern bool showing_file_info;
void paint_playlist_file_info(const meta_info *m);

/* routines for painting errors/messages in the command/status window */
void paint_error(char *fmt, ...);
void paint_message(char *fmt, ...);
void paint_error(const char *fmt, ...);
void paint_message(const char *fmt, ...);

/* for setting up and working with the colors */
void paint_setup_colors();
Expand Down
2 changes: 1 addition & 1 deletion player.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ player_info_t player_info;
static void callback_playnext() { player_skip_song(1); }

static void
callback_fatal(char *fmt, ...)
callback_fatal(const char *fmt, ...)
{
va_list ap;

Expand Down
6 changes: 3 additions & 3 deletions player.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ typedef struct {

/* callback functions */
void (*set_callback_playnext)(void (*f)(void));
void (*set_callback_notice)(void (*f)(char *, ...));
void (*set_callback_error)(void (*f)(char *, ...));
void (*set_callback_fatal)(void (*f)(char *, ...));
void (*set_callback_notice)(void (*f)(const char *, ...));
void (*set_callback_error)(void (*f)(const char *, ...));
void (*set_callback_fatal)(void (*f)(const char *, ...));

/* monitor function */
void (*monitor)(void);
Expand Down
6 changes: 3 additions & 3 deletions players/gstplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,17 @@ gstplayer_set_callback_playnext(void (*f)(void))
gplayer.playnext_cb = f;
}
void
gstplayer_set_callback_notice(void (*f)(char *, ...))
gstplayer_set_callback_notice(void (*f)(const char *, ...))
{
gplayer.notice_cb = f;
}
void
gstplayer_set_callback_error(void (*f)(char *, ...))
gstplayer_set_callback_error(void (*f)(const char *, ...))
{
gplayer.error_cb = f;
}
void
gstplayer_set_callback_fatal(void (*f)(char *, ...))
gstplayer_set_callback_fatal(void (*f)(const char *, ...))
{
gplayer.fatal_cb = f;
}
Expand Down
12 changes: 6 additions & 6 deletions players/gstplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ typedef struct {
bool about_to_finish;
/* callback functions */
void (*playnext_cb)(void);
void (*notice_cb)(char *, ...);
void (*error_cb)(char *, ...);
void (*fatal_cb)(char *, ...);
void (*notice_cb)(const char *, ...);
void (*error_cb)(const char *, ...);
void (*fatal_cb)(const char *, ...);

/* backend data */
GstElement *player;
Expand All @@ -60,9 +60,9 @@ bool gstplayer_is_playing();
bool gstplayer_is_paused();

void gstplayer_set_callback_playnext(void (*f)(void));
void gstplayer_set_callback_notice(void (*f)(char *, ...));
void gstplayer_set_callback_error(void (*f)(char *, ...));
void gstplayer_set_callback_fatal(void (*f)(char *, ...));
void gstplayer_set_callback_notice(void (*f)(const char *, ...));
void gstplayer_set_callback_error(void (*f)(const char *, ...));
void gstplayer_set_callback_fatal(void (*f)(const char *, ...));

void gstplayer_monitor();

Expand Down
12 changes: 6 additions & 6 deletions players/mplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

/* callback functions */
void (*mplayer_callback_playnext)(void) = NULL;
void (*mplayer_callback_notice)(char *, ...) = NULL;
void (*mplayer_callback_error)(char *, ...) = NULL;
void (*mplayer_callback_fatal)(char *, ...) = NULL;
void (*mplayer_callback_notice)(const char *, ...) = NULL;
void (*mplayer_callback_error)(const char *, ...) = NULL;
void (*mplayer_callback_fatal)(const char *, ...) = NULL;


/* record keeping */
Expand Down Expand Up @@ -306,19 +306,19 @@ mplayer_set_callback_playnext(void (*f)(void))
}

void
mplayer_set_callback_notice(void (*f)(char *, ...))
mplayer_set_callback_notice(void (*f)(const char *, ...))
{
mplayer_callback_notice = f;
}

void
mplayer_set_callback_error(void (*f)(char *, ...))
mplayer_set_callback_error(void (*f)(const char *, ...))
{
mplayer_callback_error = f;
}

void
mplayer_set_callback_fatal(void (*f)(char *, ...))
mplayer_set_callback_fatal(void (*f)(const char *, ...))
{
mplayer_callback_fatal = f;
}
Expand Down
6 changes: 3 additions & 3 deletions players/mplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ bool mplayer_is_playing();
bool mplayer_is_paused();

void mplayer_set_callback_playnext(void (*f)(void));
void mplayer_set_callback_notice(void (*f)(char *, ...));
void mplayer_set_callback_error(void (*f)(char *, ...));
void mplayer_set_callback_fatal(void (*f)(char *, ...));
void mplayer_set_callback_notice(void (*f)(const char *, ...));
void mplayer_set_callback_error(void (*f)(const char *, ...));
void mplayer_set_callback_fatal(void (*f)(const char *, ...));

void mplayer_monitor();

Expand Down
2 changes: 1 addition & 1 deletion str2argv.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ argv_finish_token(int *argc, char ***argv)
* both argc/argv are set to 0/NULL.
*/
int
str2argv(char *str, int *argc, char ***argv, const char **errmsg)
str2argv(const char *str, int *argc, char ***argv, const char **errmsg)
{
bool in_token;
bool in_container;
Expand Down
2 changes: 1 addition & 1 deletion str2argv.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* quoting, etc., and builds an argc/argv style set of parameters that are
* suitable for passing to any of the cmd_* or ecmd_* functions.
*/
int str2argv(char *str, int *argc, char ***argv, const char **errmsg);
int str2argv(const char *str, int *argc, char ***argv, const char **errmsg);

/*
* After the above function is used to build an argc/argv set of parameters,
Expand Down
2 changes: 1 addition & 1 deletion vitunes.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ char *playlist_dir;
char *player_backend;

/* program name with directories removed */
char *progname;
const char *progname;


/*****************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion vitunes.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extern char *vitunes_dir;
extern char *playlist_dir;
extern char *db_file;

extern char *progname;
extern const char *progname;

/* record keeping */
extern playlist *viewing_playlist;
Expand Down