Cosmetics.

SVN revision: 78407
This commit is contained in:
Kim Woelders 2012-10-24 17:20:38 +00:00
parent acaf58fd94
commit 7fd4f7a71d
25 changed files with 53 additions and 63 deletions

View File

@ -653,7 +653,7 @@ ActionEncode(Action * aa, char *buf, int len)
if (aa->anybutton)
strcpy(btn, "*");
else
sprintf(btn, "%u", aa->button);
sprintf(btn, "%d", aa->button);
len = Esnprintf(buf, len, "%-11s %4s %s %s\n", event, mod, btn,
(aa->action->params) ? aa->action->params : "");
break;

View File

@ -856,7 +856,6 @@ ArrangeEwinXY(EWin * ewin, int *px, int *py)
RectBox *fixed, *ret, newrect;
fixed = NULL;
ret = NULL;
EwinListGetAll(&num);
if (num <= 1)

View File

@ -102,7 +102,7 @@ _BackgroundGetFgFile(Background * bg)
char *
BackgroundGetUniqueString(Background * bg)
{
static const char *chmap =
static const char chmap[] =
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
char s[256], *f;
int r, g, b;
@ -1307,7 +1307,7 @@ BackgroundsConfigSave(void)
for (j = 0; j < N_BG_ASSIGNED; j++)
{
if (bg == bg_assigned[j])
fprintf(fs, "%d %d\n", BG_DESKNUM, j);
fprintf(fs, "%d %u\n", BG_DESKNUM, j);
}
fprintf(fs, "1000\n");

View File

@ -876,9 +876,9 @@ ButtonsConfigSave(void)
fprintf(fs, "536 %i\n", b->geom.ysizerel);
fprintf(fs, "537 %i\n", b->geom.ysizeabs);
fprintf(fs, "538 %i\n", b->geom.size_from_image);
fprintf(fs, "539 %i\n", EoGetDeskNum(b));
fprintf(fs, "539 %u\n", EoGetDeskNum(b));
fprintf(fs, "540 %i\n", EoIsSticky(b));
fprintf(fs, "542 %i\n", EoIsShown(b));
fprintf(fs, "542 %u\n", EoIsShown(b));
if (b->flags)
{

View File

@ -324,7 +324,7 @@ CommsDoSend(Window win, const char *s)
{
ss[8 + j] = s[i + j];
if (!s[i + j])
j = 12;
break;
}
ss[20] = 0;
for (k = 0; k < 20; k++)

View File

@ -382,7 +382,7 @@ ContainerLayoutImageWin(Container * ct)
int i, xo, yo;
int item_pad, padl, padr, padt, padb;
ContainerObject *cto;
EImageBorder *pad, *pad_base;
EImageBorder *pad;
if (ct->orientation)
ct->ic_box = ImageclassFind("ICONBOX_VERTICAL", 0);
@ -404,17 +404,16 @@ ContainerLayoutImageWin(Container * ct)
if (ct->draw_icon_base)
{
pad_base = ImageclassGetPadding(ct->ic_item_base);
padl = pad_base->left;
padr = pad_base->right;
padt = pad_base->top;
padb = pad_base->bottom;
pad = ImageclassGetPadding(ct->ic_item_base);
padl = pad->left;
padr = pad->right;
padt = pad->top;
padb = pad->bottom;
item_pad = 0;
}
else
{
pad_base = NULL;
padl = padr = padt = padb = 0;
item_pad = 2;

View File

@ -282,12 +282,12 @@ DeskControlsCreate(Desk * dsk)
if (Conf.desks.dragbar_width > 0)
{
b = ButtonCreate("_DESKTOP_DRAG_CONTROL", 1, ic2, ac2, NULL, NULL,
-1, FLAG_FIXED, 1, 99999, 1, 99999, 0, 0, x[0], 0,
y[0], 0, 0, w[0], 0, h[0], 0, dsk->num, 0);
b = ButtonCreate("_DESKTOP_DRAG_CONTROL", 1, ic3, ac3, NULL, NULL,
-1, FLAG_FIXED, 1, 99999, 1, 99999, 0, 0, x[1], 0,
y[1], 0, 0, w[1], 0, h[1], 0, dsk->num, 0);
ButtonCreate("_DESKTOP_DRAG_CONTROL", 1, ic2, ac2, NULL, NULL,
-1, FLAG_FIXED, 1, 99999, 1, 99999, 0, 0, x[0], 0,
y[0], 0, 0, w[0], 0, h[0], 0, dsk->num, 0);
ButtonCreate("_DESKTOP_DRAG_CONTROL", 1, ic3, ac3, NULL, NULL,
-1, FLAG_FIXED, 1, 99999, 1, 99999, 0, 0, x[1], 0,
y[1], 0, 0, w[1], 0, h[1], 0, dsk->num, 0);
b = ButtonCreate("_DESKTOP_DRAG_CONTROL", 1, ic1, ac1, NULL, NULL,
-1, FLAG_FIXED, 1, 99999, 1, 99999, 0, 0, x[2], 0,
y[2], 0, 0, w[2], 0, h[2], 0, dsk->num, 0);
@ -2719,7 +2719,7 @@ DesksIpcDesk(const char *params)
}
else if (!strncmp(cmd, "set", 3))
{
sscanf(prm, "%i", &desk);
sscanf(prm, "%u", &desk);
ChangeNumberOfDesktops(desk);
}
else if (!strncmp(cmd, "list", 2))
@ -2738,7 +2738,7 @@ DesksIpcDesk(const char *params)
}
else if (!strncmp(cmd, "goto", 2))
{
sscanf(prm, "%i", &desk);
sscanf(prm, "%u", &desk);
DeskOpGoto(desk);
}
else if (!strncmp(cmd, "next", 2))
@ -2759,13 +2759,13 @@ DesksIpcDesk(const char *params)
}
else if (!strncmp(cmd, "raise", 2))
{
sscanf(prm, "%i", &desk);
sscanf(prm, "%u", &desk);
SoundPlay(SOUND_DESKTOP_RAISE);
DeskRaise(desk);
}
else if (!strncmp(cmd, "lower", 2))
{
sscanf(prm, "%i", &desk);
sscanf(prm, "%u", &desk);
SoundPlay(SOUND_DESKTOP_LOWER);
DeskLower(desk);
}

View File

@ -397,7 +397,7 @@ void
DrawEwinShape(EWin * ewin, int md, int x, int y, int w, int h,
int firstlast, int seqno)
{
static ShapeData sd, *psd = &sd;
static ShapeData sd, *const psd = &sd;
Window root = WinGetXwin(VROOT);
int dx, dy;

View File

@ -895,7 +895,7 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, const char **names,
if (!s)
{
/* Default to "Desk-<number>" */
sprintf(ss, "Desk-%d", i);
sprintf(ss, "Desk-%u", i);
s = ss;
}

View File

@ -333,7 +333,7 @@ Functions that remove nodes from an Ecore_List.
EAPI void *
ecore_list_remove(Ecore_List * list)
{
void *ret = NULL;
void *ret;
Ecore_List_Node *old;
if (ecore_list_empty_is(list))
@ -396,7 +396,7 @@ ecore_list_remove_destroy(Ecore_List * list)
EAPI void *
ecore_list_first_remove(Ecore_List * list)
{
void *ret = NULL;
void *ret;
Ecore_List_Node *old;
if (ecore_list_empty_is(list))
@ -432,7 +432,7 @@ ecore_list_first_remove(Ecore_List * list)
EAPI void *
ecore_list_last_remove(Ecore_List * list)
{
void *ret = NULL;
void *ret;
Ecore_List_Node *old, *prev;
if (ecore_list_empty_is(list))
@ -708,7 +708,7 @@ _ecore_list_node_new(void)
* @return @c TRUE.
* @ingroup Ecore_Data_List_Node_Group
*/
EAPI int
static int
_ecore_list_node_destroy(Ecore_List_Node * node, Ecore_Free_Cb free_func)
{
if (free_func && node->data)
@ -750,7 +750,8 @@ ecore_list_items_get(Ecore_List * list, int *pnum)
if (!lst)
return NULL;
for (i = 0, ecore_list_first_goto(list); (b = ecore_list_next(list));)
for (i = 0, ecore_list_first_goto(list);
(b = ecore_list_next(list)) != NULL;)
lst[i++] = b;
*pnum = num;

View File

@ -129,11 +129,6 @@ e16_db_close(ECfgFile * ecf)
Efree(ecf);
}
static void
e16_db_flush(void)
{
}
static const char *
ECfgFileFindValue(ECfgFile * ecf, const char *key)
{
@ -272,7 +267,6 @@ ConfigurationSave(void)
MODULE_LIST_FREE(pml);
e16_db_close(ecf);
e16_db_flush();
}
const CfgItem *

View File

@ -305,9 +305,9 @@ DbusInit(void)
if (!dbus_connection_add_filter(dbus_data.conn, DbusMsgHandler, NULL, NULL))
return;
err = dbus_connection_set_watch_functions(dbus_data.conn,
DbusWatchAdd, DbusWatchRemove,
DbusWatchToggle, NULL, NULL);
dbus_connection_set_watch_functions(dbus_data.conn,
DbusWatchAdd, DbusWatchRemove,
DbusWatchToggle, NULL, NULL);
/* Handle pending D-Bus stuff */
DbusHandleFd();

View File

@ -671,8 +671,7 @@ EventsCompress(XEvent * evq, int count)
ev->xdestroywindow.window)
continue;
ev2->type = EX_EVENT_CREATE_GONE;
j = -1; /* Break for() */
break;
goto loop_quit_DestroyNotify;
case DestroyNotify:
break;
case UnmapNotify:
@ -709,6 +708,7 @@ EventsCompress(XEvent * evq, int count)
break;
}
}
loop_quit_DestroyNotify:
break;
case Expose:

View File

@ -1453,7 +1453,7 @@ EwinOpKill(EWin * ewin, int source __UNUSED__)
void
EwinOpRaise(EWin * ewin, int source __UNUSED__)
{
EWin **gwins = NULL;
EWin **gwins;
int i, num;
SoundPlay(SOUND_RAISE);
@ -1467,7 +1467,7 @@ EwinOpRaise(EWin * ewin, int source __UNUSED__)
void
EwinOpLower(EWin * ewin, int source __UNUSED__)
{
EWin **gwins = NULL;
EWin **gwins;
int i, num;
SoundPlay(SOUND_LOWER);
@ -1481,7 +1481,7 @@ EwinOpLower(EWin * ewin, int source __UNUSED__)
void
EwinOpStick(EWin * ewin, int source __UNUSED__, int on)
{
EWin **gwins = NULL;
EWin **gwins;
int i, num;
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_STICK,
@ -1553,7 +1553,7 @@ EwinOpNeverFocus(EWin * ewin, int on)
void
EwinOpIconify(EWin * ewin, int source __UNUSED__, int on)
{
EWin **gwins = NULL;
EWin **gwins;
int i, num;
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_ICONIFY,
@ -1571,7 +1571,7 @@ EwinOpIconify(EWin * ewin, int source __UNUSED__, int on)
void
EwinOpShade(EWin * ewin, int source __UNUSED__, int on)
{
EWin **gwins = NULL;
EWin **gwins;
int i, num;
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_SHADE,
@ -1607,7 +1607,7 @@ EwinOpSetLayer(EWin * ewin, int source __UNUSED__, int layer)
void
EwinOpSetBorder(EWin * ewin, int source __UNUSED__, const char *name)
{
EWin **gwins = NULL;
EWin **gwins;
int i, num;
char has_shaded;
Border *b;
@ -1618,9 +1618,8 @@ EwinOpSetBorder(EWin * ewin, int source __UNUSED__, const char *name)
return;
has_shaded = 0;
gwins =
ListWinGroupMembersForEwin(ewin, GROUP_ACTION_SET_WINDOW_BORDER,
Mode.nogroup, &num);
gwins = ListWinGroupMembersForEwin(ewin, GROUP_ACTION_SET_WINDOW_BORDER,
Mode.nogroup, &num);
for (i = 0; i < num; i++)
{
if (gwins[i]->state.shaded)

View File

@ -2021,14 +2021,14 @@ EwinChange(EWin * ewin __UNUSED__, unsigned int flag)
EWinChanges.flags |= flag;
}
void
static void
EwinChangesStart(EWin * ewin)
{
EWinChanges.flags = 0;
EWinChanges.desk = EoGetDesk(ewin);
}
void
static void
EwinChangesProcess(EWin * ewin)
{
if (!EWinChanges.flags)

View File

@ -57,7 +57,7 @@ GrabKeyboardRelease(void)
int
GrabPointerSet(Win win, unsigned int csr, int confine)
{
int ret = -1;
int ret;
Window confine_to = (confine) ? WinGetXwin(VROOT) : None;
ret = XGrabPointer(disp, WinGetXwin(win), False,

View File

@ -355,7 +355,7 @@ EwinsInGroup(const EWin * ewin1, const EWin * ewin2)
return NULL;
}
void
static void
RemoveEwinFromGroup(EWin * ewin, Group * g)
{
int i, j, k, i2;

View File

@ -366,7 +366,7 @@ typedef union {
unsigned docked:1;
unsigned iconified:1;
} b;
int all:32;
unsigned all:32;
} EWinInfoFlags;
#define ENL_DATA_ITEMS 12

View File

@ -779,7 +779,7 @@ ICCCM_GetHints(EWin * ewin)
ICCCM_GetWmClientLeader(ewin);
}
void
static void
ICCCM_SetIconSizes(void)
{
XIconSize *is;

View File

@ -833,7 +833,6 @@ IpcWinop(const WinOp * wop, EWin * ewin, const char *prm)
case EWIN_OP_NO_REDIRECT:
on = EoGetNoRedirect(ewin);
on = ewin->o.noredir;
if (SetEwinBoolean(wop->name, &on, param1, 1))
EoSetNoRedirect(ewin, on);
break;

View File

@ -778,7 +778,7 @@ const DialogDef DlgComposite = {
* Combined configuration dialog
*/
static const DialogDef *dialogs[] = {
static const DialogDef *const dialogs[] = {
&DlgFocus,
&DlgMoveResize,
&DlgPlacement,

View File

@ -384,7 +384,7 @@ _SnapUpdateEwinCmd(Snapshot * sn, const EWin * ewin)
static void
_SnapUpdateEwinGroups(Snapshot * sn, const EWin * ewin, char onoff)
{
EWin **gwins = NULL;
EWin **gwins;
Group *const *groups;
int i, j, num, num_groups;

View File

@ -92,7 +92,7 @@ static void
append_merge_dir(char *dir, char ***list, int *count)
{
char ss[FILEPATH_LEN_MAX], s1[FILEPATH_LEN_MAX];
char **str = NULL, *s;
char **str, *s;
int i, num;
str = E_ls(dir, &num);

View File

@ -306,7 +306,6 @@ TooltipShow(ToolTip * tt, const char *text, ActionClass * ac, int x, int y)
17);
if (temp_w > labels_width)
labels_width = temp_w;
temp_w = 0;
if (ActionGetEvent(aa) == EVENT_DOUBLE_DOWN)
{

View File

@ -209,7 +209,7 @@ SetMode(XRRScreenResources * xsr, RRCrtc crtc, RRMode mode, Rotation rot)
static void
SetPanning(XRRScreenResources * xsr, RRCrtc crtc, int on)
{
XRRPanning *xpa = NULL;
XRRPanning *xpa;
xpa = XRRGetPanning(disp, xsr, crtc);
if (!xpa)