The arg to uicb_ functions is no longer const.

This commit is contained in:
Aldo Cortesi 2007-12-17 11:17:54 +11:00 committed by Julien Danjou
parent 7385815927
commit b6bfd1a4d0
10 changed files with 37 additions and 38 deletions

View File

@ -246,7 +246,7 @@ xerrorstart(Display * disp __attribute__ ((unused)), XErrorEvent * ee __attribut
* \ingroup ui_callback
*/
void
uicb_quit(int screen __attribute__ ((unused)), const char *arg __attribute__ ((unused)))
uicb_quit(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
{
running = False;
}

View File

@ -593,7 +593,7 @@ client_isvisible(Client *c, int screen)
* \ingroup ui_callback
*/
void
uicb_client_settrans(int screen __attribute__ ((unused)), const char *arg)
uicb_client_settrans(int screen __attribute__ ((unused)), char *arg)
{
double delta = 100.0, current_opacity = 100.0;
unsigned char *data;
@ -642,7 +642,7 @@ uicb_client_settrans(int screen __attribute__ ((unused)), const char *arg)
* \ingroup ui_callback
*/
void
uicb_setborder(int screen, const char *arg)
uicb_setborder(int screen, char *arg)
{
if(!arg)
return;
@ -652,7 +652,7 @@ uicb_setborder(int screen, const char *arg)
}
void
uicb_client_swapnext(int screen, const char *arg __attribute__ ((unused)))
uicb_client_swapnext(int screen, char *arg __attribute__ ((unused)))
{
Client *next, *sel = globalconf.focus->client;
@ -670,7 +670,7 @@ uicb_client_swapnext(int screen, const char *arg __attribute__ ((unused)))
}
void
uicb_client_swapprev(int screen, const char *arg __attribute__ ((unused)))
uicb_client_swapprev(int screen, char *arg __attribute__ ((unused)))
{
Client *prev, *sel = globalconf.focus->client;
@ -688,7 +688,7 @@ uicb_client_swapprev(int screen, const char *arg __attribute__ ((unused)))
}
void
uicb_client_moveresize(int screen, const char *arg)
uicb_client_moveresize(int screen, char *arg)
{
int nx, ny, nw, nh, ox, oy, ow, oh;
char x[8], y[8], w[8], h[8];
@ -727,7 +727,7 @@ uicb_client_moveresize(int screen, const char *arg)
* \ingroup ui_callback
*/
void
uicb_client_kill(int screen __attribute__ ((unused)), const char *arg __attribute__ ((unused)))
uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused)))
{
XEvent ev;
Client *sel = globalconf.focus->client;

View File

@ -107,7 +107,7 @@ focus_get_latest_client_for_tag(FocusList *head, int screen, Tag *t)
}
void
uicb_focus_history(int screen, const char *arg)
uicb_focus_history(int screen, char *arg)
{
int i;
FocusList *fl = globalconf.focus;

View File

@ -100,7 +100,7 @@ get_current_layout(int screen)
}
void
uicb_client_focusnext(int screen, const char *arg __attribute__ ((unused)))
uicb_client_focusnext(int screen, char *arg __attribute__ ((unused)))
{
Client *c, *sel = globalconf.focus->client;
@ -117,7 +117,7 @@ uicb_client_focusnext(int screen, const char *arg __attribute__ ((unused)))
}
void
uicb_client_focusprev(int screen, const char *arg __attribute__ ((unused)))
uicb_client_focusprev(int screen, char *arg __attribute__ ((unused)))
{
Client *c, *sel = globalconf.focus->client;
@ -225,7 +225,7 @@ saveawesomeprops(int screen)
}
void
uicb_tag_setlayout(int screen, const char *arg)
uicb_tag_setlayout(int screen, char *arg)
{
Layout *l = globalconf.screens[screen].layouts;
Tag *tag;
@ -278,7 +278,7 @@ maximize(int x, int y, int w, int h, int screen)
}
void
uicb_client_togglemax(int screen, const char *arg __attribute__ ((unused)))
uicb_client_togglemax(int screen, char *arg __attribute__ ((unused)))
{
ScreenInfo *si = get_screen_info(globalconf.display, screen, &globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding);
@ -290,7 +290,7 @@ uicb_client_togglemax(int screen, const char *arg __attribute__ ((unused)))
}
void
uicb_client_toggleverticalmax(int screen, const char *arg __attribute__ ((unused)))
uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused)))
{
Client *sel = globalconf.focus->client;
ScreenInfo *si = get_screen_info(globalconf.display, screen, &globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding);
@ -306,7 +306,7 @@ uicb_client_toggleverticalmax(int screen, const char *arg __attribute__ ((unused
void
uicb_client_togglehorizontalmax(int screen, const char *arg __attribute__ ((unused)))
uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused)))
{
Client *sel = globalconf.focus->client;
ScreenInfo *si = get_screen_info(globalconf.display, screen, &globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding);
@ -321,8 +321,7 @@ uicb_client_togglehorizontalmax(int screen, const char *arg __attribute__ ((unus
}
void
uicb_client_zoom(int screen,
const char *arg __attribute__ ((unused)))
uicb_client_zoom(int screen, char *arg __attribute__ ((unused)))
{
Client *sel = globalconf.focus->client;

View File

@ -31,7 +31,7 @@
extern awesome_config globalconf;
void
uicb_tag_setnmaster(int screen, const char * arg)
uicb_tag_setnmaster(int screen, char * arg)
{
Tag *curtag = get_current_tag(screen);
Layout *curlay = curtag->layout;
@ -46,7 +46,7 @@ uicb_tag_setnmaster(int screen, const char * arg)
}
void
uicb_tag_setncol(int screen, const char * arg)
uicb_tag_setncol(int screen, char * arg)
{
Tag *curtag = get_current_tag(screen);
Layout *curlay = curtag->layout;
@ -61,7 +61,7 @@ uicb_tag_setncol(int screen, const char * arg)
}
void
uicb_tag_setmwfact(int screen, const char *arg)
uicb_tag_setmwfact(int screen, char *arg)
{
char *newarg;
Tag *curtag = get_current_tag(screen);

View File

@ -31,7 +31,7 @@
extern awesome_config globalconf;
void
uicb_client_movemouse(int screen, const char *arg __attribute__ ((unused)))
uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
{
int x1, y1, ocx, ocy, di, nx, ny;
unsigned int dui;
@ -45,7 +45,7 @@ uicb_client_movemouse(int screen, const char *arg __attribute__ ((unused)))
if((get_current_layout(screen)->arrange != layout_floating)
&& !c->isfloating)
uicb_client_togglefloating(screen, "DUMMY");
uicb_client_togglefloating(screen, NULL);
else
restack(screen);
@ -94,7 +94,7 @@ uicb_client_movemouse(int screen, const char *arg __attribute__ ((unused)))
}
void
uicb_client_resizemouse(int screen, const char *arg __attribute__ ((unused)))
uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
{
int ocx, ocy, nw, nh;
XEvent ev;
@ -105,7 +105,7 @@ uicb_client_resizemouse(int screen, const char *arg __attribute__ ((unused)))
if((get_current_layout(screen)->arrange != layout_floating)
&& !c->isfloating)
uicb_client_togglefloating(screen, "DUMMY");
uicb_client_togglefloating(screen, NULL);
else
restack(screen);

View File

@ -248,7 +248,7 @@ move_mouse_pointer_to_screen(Display *disp, int screen)
* \ingroup ui_callback
*/
void
uicb_screen_focus(int screen, const char *arg)
uicb_screen_focus(int screen, char *arg)
{
int new_screen, numscreens = get_screen_count(globalconf.display);
@ -275,7 +275,7 @@ uicb_screen_focus(int screen, const char *arg)
* \ingroup ui_callback
*/
void
uicb_client_movetoscreen(int screen __attribute__ ((unused)), const char *arg)
uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg)
{
int new_screen, prev_screen;
Client *sel = globalconf.focus->client;

View File

@ -186,7 +186,7 @@ statusbar_get_position_from_str(const char * pos)
}
void
uicb_statusbar_toggle(int screen, const char *arg __attribute__ ((unused)))
uicb_statusbar_toggle(int screen, char *arg __attribute__ ((unused)))
{
if(globalconf.screens[screen].statusbar.position == BarOff)
globalconf.screens[screen].statusbar.position = (globalconf.screens[screen].statusbar.dposition == BarOff) ? BarTop : globalconf.screens[screen].statusbar.dposition;
@ -197,7 +197,7 @@ uicb_statusbar_toggle(int screen, const char *arg __attribute__ ((unused)))
}
void
uicb_statusbar_set_position(int screen, const char *arg)
uicb_statusbar_set_position(int screen, char *arg)
{
globalconf.screens[screen].statusbar.dposition =
globalconf.screens[screen].statusbar.position =
@ -206,7 +206,7 @@ uicb_statusbar_set_position(int screen, const char *arg)
}
void
uicb_statusbar_set_text(int screen, const char *arg)
uicb_statusbar_set_text(int screen, char *arg)
{
if(!arg)
return;

16
tag.c
View File

@ -139,7 +139,7 @@ tag_client_with_rules(Client *c)
* \ingroup ui_callback
*/
void
uicb_client_tag(int screen, const char *arg)
uicb_client_tag(int screen, char *arg)
{
int tag_id = -1;
Tag *tag, *target_tag;
@ -176,7 +176,7 @@ uicb_client_tag(int screen, const char *arg)
* \ingroup ui_callback
*/
void
uicb_client_togglefloating(int screen, const char *arg __attribute__ ((unused)))
uicb_client_togglefloating(int screen, char *arg __attribute__ ((unused)))
{
Client *sel = globalconf.focus->client;
@ -199,7 +199,7 @@ uicb_client_togglefloating(int screen, const char *arg __attribute__ ((unused)))
* \ingroup ui_callback
*/
void
uicb_client_toggletag(int screen, const char *arg)
uicb_client_toggletag(int screen, char *arg)
{
Client *sel = globalconf.focus->client;
int i;
@ -244,7 +244,7 @@ uicb_client_toggletag(int screen, const char *arg)
* \ingroup ui_callback
*/
void
uicb_tag_toggleview(int screen, const char *arg)
uicb_tag_toggleview(int screen, char *arg)
{
int i;
Tag *tag, *target_tag;
@ -276,7 +276,7 @@ uicb_tag_toggleview(int screen, const char *arg)
* \ingroup ui_callback
*/
void
uicb_tag_view(int screen, const char *arg)
uicb_tag_view(int screen, char *arg)
{
int i;
Tag *tag, *target_tag;
@ -306,7 +306,7 @@ uicb_tag_view(int screen, const char *arg)
* \ingroup ui_callback
*/
void
uicb_tag_prev_selected(int screen, const char *arg __attribute__ ((unused)))
uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused)))
{
Tag *tag;
Bool t;
@ -325,7 +325,7 @@ uicb_tag_prev_selected(int screen, const char *arg __attribute__ ((unused)))
* \ingroup ui_callback
*/
void
uicb_tag_viewnext(int screen, const char *arg __attribute__ ((unused)))
uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused)))
{
Tag *curtag = get_current_tag(screen);
@ -344,7 +344,7 @@ uicb_tag_viewnext(int screen, const char *arg __attribute__ ((unused)))
* \ingroup ui_callback
*/
void
uicb_tag_viewprev(int screen, const char *arg __attribute__ ((unused)))
uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused)))
{
Tag *tag, *curtag = get_current_tag(screen);

View File

@ -31,7 +31,7 @@
extern awesome_config globalconf;
void
uicb_exec(int screen __attribute__ ((unused)), const char *arg)
uicb_exec(int screen __attribute__ ((unused)), char *arg)
{
char path[PATH_MAX];
if(globalconf.display)
@ -42,7 +42,7 @@ uicb_exec(int screen __attribute__ ((unused)), const char *arg)
}
void
uicb_spawn(int screen, const char *arg)
uicb_spawn(int screen, char *arg)
{
static char *shell = NULL;
char *display = NULL;