Re-indent with indent-2.2.12

This commit is contained in:
Kim Woelders 2019-08-14 18:45:13 +02:00
parent 9d3875afce
commit 88dba1cfff
36 changed files with 123 additions and 124 deletions

View File

@ -166,8 +166,8 @@ static const char *predefs = "";
struct directive {
int length;
int (*func) (cpp_reader * pfile, struct directive * keyword,
unsigned char *buf, unsigned char *limit);
int (*func)(cpp_reader * pfile, struct directive * keyword,
unsigned char *buf, unsigned char *limit);
const char *name;
enum node_type type;
char command_reads_line;
@ -398,55 +398,54 @@ static struct default_include {
= INCLUDE_DEFAULTS;
#else
=
{
= {
/* Pick up GNU C++ specific include files. */
{
GPLUSPLUS_INCLUDE_DIR, 1, 1}
GPLUSPLUS_INCLUDE_DIR, 1, 1}
,
#ifdef CROSS_COMPILE
/* This is the dir for fixincludes. Put it just before
* the files that we fix. */
/* This is the dir for fixincludes. Put it just before
* the files that we fix. */
{
GCC_INCLUDE_DIR, 0, 0}
GCC_INCLUDE_DIR, 0, 0}
,
/* For cross-compilation, this dir name is generated
* automatically in Makefile.in. */
/* For cross-compilation, this dir name is generated
* automatically in Makefile.in. */
{
CROSS_INCLUDE_DIR, 0, 0}
CROSS_INCLUDE_DIR, 0, 0}
,
/* This is another place that the target system's headers might be. */
/* This is another place that the target system's headers might be. */
{
TOOL_INCLUDE_DIR, 0, 1}
TOOL_INCLUDE_DIR, 0, 1}
,
#else /* not CROSS_COMPILE */
/* This should be /usr/local/include and should come before
* the fixincludes-fixed header files. */
/* This should be /usr/local/include and should come before
* the fixincludes-fixed header files. */
{
LOCAL_INCLUDE_DIR, 0, 1}
LOCAL_INCLUDE_DIR, 0, 1}
,
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
* Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
/* This is here ahead of GCC_INCLUDE_DIR because assert.h goes here.
* Likewise, behind LOCAL_INCLUDE_DIR, where glibc puts its assert.h. */
{
TOOL_INCLUDE_DIR, 0, 1}
TOOL_INCLUDE_DIR, 0, 1}
,
/* This is the dir for fixincludes. Put it just before
* the files that we fix. */
/* This is the dir for fixincludes. Put it just before
* the files that we fix. */
{
GCC_INCLUDE_DIR, 0, 0}
GCC_INCLUDE_DIR, 0, 0}
,
/* Some systems have an extra dir of include files. */
/* Some systems have an extra dir of include files. */
#ifdef SYSTEM_INCLUDE_DIR
{
SYSTEM_INCLUDE_DIR, 0, 0}
SYSTEM_INCLUDE_DIR, 0, 0}
,
#endif
{
STANDARD_INCLUDE_DIR, 0, 0}
STANDARD_INCLUDE_DIR, 0, 0}
,
#endif /* not CROSS_COMPILE */
{
0, 0, 0}
0, 0, 0}
};
#endif /* no INCLUDE_DEFAULTS */

View File

@ -65,7 +65,7 @@ enum cpp_token {
};
typedef enum cpp_token (*parse_underflow_t) (cpp_reader *);
typedef int (*parse_cleanup_t) (cpp_buffer *, cpp_reader *);
typedef int (*parse_cleanup_t)(cpp_buffer *, cpp_reader *);
/* A parse_marker indicates a previous position,
which we can backtrack to. */

View File

@ -466,7 +466,7 @@ void ConfigAlertLoad(const char *txt);
char *FindFile(const char *file, const char *themepath, int type);
char *ThemeFileFind(const char *file, int type);
int ConfigFileLoad(const char *name, const char *themepath,
int (*parse) (FILE * fs), int preparse);
int (*parse)(FILE * fs), int preparse);
int ConfigFileRead(FILE * fs);
int ThemeConfigLoad(void);

View File

@ -813,7 +813,7 @@ AclassConfigLoadConfig(const char *name)
}
static void
AclassConfigWrite(const ActionClass * ac, void (*prf) (const char *fmt, ...))
AclassConfigWrite(const ActionClass * ac, void (*prf)(const char *fmt, ...))
{
char s[FILEPATH_LEN_MAX];
Action *aa;

View File

@ -55,9 +55,9 @@ static struct {
Idler *idler;
unsigned int time_ms; /* Just use Mode.events.time_ms? */
unsigned int seqn;
} Mode_anim =
{
NULL, NULL, 0, 0};
} Mode_anim = {
NULL, NULL, 0, 0
};
static int
_AnimatorsTimer(void *timer_call)

View File

@ -576,8 +576,8 @@ BackgroundRealize(Background * bg, Win win, EX_Drawable draw,
if (!draw)
draw = WinGetXwin(win);
hasbg = ! !bg->bg.im;
hasfg = ! !bg->top.im;
hasbg = !!bg->bg.im;
hasfg = !!bg->top.im;
if (!hasbg && !hasfg)
{

View File

@ -448,7 +448,7 @@ ButtonDragEnd(Button * b)
}
void
ButtonsForeach(int id, Desk * dsk, void (*func) (Button * b))
ButtonsForeach(int id, Desk * dsk, void (*func)(Button * b))
{
Button *b, *tmp;

View File

@ -52,7 +52,7 @@ int ButtonEmbedWindow(Button * ButtonToUse,
EX_Window WindowToEmbed);
void ButtonsForeach(int id, Desk * dsk,
void (*func) (Button * b));
void (*func)(Button * b));
void ButtonsMoveStickyToDesk(Desk * d);
int ButtonsConfigLoad(FILE * fs);

View File

@ -547,7 +547,7 @@ ConfigFileFind(const char *name, const char *themepath, int pp)
int
ConfigFileLoad(const char *name, const char *themepath,
int (*parse) (FILE * fs), int preparse)
int (*parse)(FILE * fs), int preparse)
{
int err = -1;
char *file;

View File

@ -43,13 +43,13 @@ typedef struct {
} ContainerObject;
typedef struct {
void (*Init) (Container * ct);
void (*Exit) (Container * ct, int wm_exit);
void (*Signal) (Container * ct, int signal, void *prm);
void (*Event) (Container * ct, XEvent * ev);
void (*ObjSizeCalc) (Container * ct, ContainerObject * cto);
void (*ObjPlace) (Container * ct, ContainerObject * cto,
EImage * im);
void (*Init)(Container * ct);
void (*Exit)(Container * ct, int wm_exit);
void (*Signal)(Container * ct, int signal, void *prm);
void (*Event)(Container * ct, XEvent * ev);
void (*ObjSizeCalc)(Container * ct, ContainerObject * cto);
void (*ObjPlace)(Container * ct, ContainerObject * cto,
EImage * im);
} ContainerOps;
struct _container {

View File

@ -70,7 +70,7 @@ typedef struct {
short sound;
const char *header_image;
const char *header_text;
void (*fill) (Dialog * d, DItem * table, void *data);
void (*fill)(Dialog * d, DItem * table, void *data);
int flags;
DialogCallbackFunc *func_apply;
DialogExitFunc *func_exit;

View File

@ -1516,7 +1516,7 @@ ECompMgrWinDamage(EObj * eo, XEvent * ev)
static void
ECompMgrWinDumpInfo(const char *txt, EObj * eo, EX_SrvRegion rgn, int ipc)
{
void (*prf) (const char *fmt, ...);
void (*prf)(const char *fmt, ...);
ECmWinInfo *cw = eo->cmhook;
prf = (ipc) ? IpcPrintf : Eprintf;

View File

@ -28,7 +28,7 @@ typedef struct {
void *ptr;
char type;
int dflt;
void (*func) (void *item, const char *value);
void (*func)(void *item, const char *value);
} CfgItem;
typedef struct {

View File

@ -63,14 +63,14 @@
#include <dlfcn.h>
/* GL functions and helper */
typedef void (*glXBindTexImageEXT_func) (Display * dpy,
GLXDrawable drawable,
int buffer,
const int *attrib_list);
typedef void (*glXReleaseTexImageEXT_func) (Display * dpy,
GLXDrawable drawable,
int buffer);
typedef void (*glXFuncPtr) (void);
typedef void (*glXBindTexImageEXT_func)(Display * dpy,
GLXDrawable drawable,
int buffer,
const int *attrib_list);
typedef void (*glXReleaseTexImageEXT_func)(Display * dpy,
GLXDrawable drawable,
int buffer);
typedef void (*glXFuncPtr)(void);
typedef glXFuncPtr(*glXGetProcAddress_func) (const GLubyte *);
static glXBindTexImageEXT_func _glXBindTexImageEXT;

View File

@ -29,7 +29,7 @@
typedef struct {
const char *name;
const char *nick;
void (*Signal) (int sig, void *prm);
void (*Signal)(int sig, void *prm);
IpcItemList ipc;
CfgItemList cfg;
} EModule;

View File

@ -83,8 +83,8 @@ typedef struct {
typedef struct {
const char *name;
unsigned int ix;
int (*query_ver) (Display * dpy, int *major, int *minor);
void (*init) (int avaliable);
int (*query_ver)(Display * dpy, int *major, int *minor);
void (*init)(int avaliable);
} EServerExt;
static EServerExtData ExtData[12];
@ -348,7 +348,7 @@ struct _EventFdDesc {
const char *name;
#endif
int fd;
void (*handler) (void);
void (*handler)(void);
};
static int nfds = 0;

View File

@ -57,11 +57,11 @@ typedef union {
#define EwinInhSetWM(ewin, item, on) ewin->inh_wm.b.item = (on)
typedef struct {
void (*Init) (EWin * ewin);
void (*Layout) (EWin * ewin, int *px, int *py, int *pw,
int *ph);
void (*MoveResize) (EWin * ewin, int resize);
void (*Close) (EWin * ewin);
void (*Init)(EWin * ewin);
void (*Layout)(EWin * ewin, int *px, int *py, int *pw,
int *ph);
void (*MoveResize)(EWin * ewin, int resize);
void (*Close)(EWin * ewin);
} EWinOps;
struct _ewin {

View File

@ -47,8 +47,8 @@
typedef struct {
const char *name;
void (*init_func) (const char *name);
void (*ops_func) (int op);
void (*init_func)(const char *name);
void (*ops_func)(int op);
char enabled;
char active;
} FXHandler;

View File

@ -42,16 +42,16 @@ struct _hiwin {
EWin *ewin;
int zoom;
int xo, yo, wo, ho;
void (*evcb) (Win win, XEvent * ev, void *data);
void (*evcb)(Win win, XEvent * ev, void *data);
void *data;
char animate;
EImage *im;
};
typedef struct {
void (*init) (Hiwin * phi);
void (*draw) (Hiwin * phi);
void (*fini) (Hiwin * phi, int shown);
void (*init)(Hiwin * phi);
void (*draw)(Hiwin * phi);
void (*fini)(Hiwin * phi, int shown);
} HiwinRender;
static ImageClass *hiwin_ic = NULL;
@ -298,7 +298,7 @@ HiwinInit(Hiwin * phi, EWin * ewin, EObj * parent)
}
void
HiwinSetCallback(Hiwin * phi, void (*func) (Win win, XEvent * ev, void *data),
HiwinSetCallback(Hiwin * phi, void (*func)(Win win, XEvent * ev, void *data),
void *data)
{
phi->evcb = func;

View File

@ -32,8 +32,8 @@ Hiwin *HiwinCreate(void);
void HiwinSetGeom(Hiwin * phi, int x, int y, int w, int h);
void HiwinInit(Hiwin * phi, EWin * ewin, EObj * parent);
void HiwinSetCallback(Hiwin * phi,
void (*func) (Win win, XEvent * ev,
void *data), void *data);
void (*func)(Win win, XEvent * ev,
void *data), void *data);
void HiwinGetXY(Hiwin * phi, int *x, int *y);
void HiwinMove(Hiwin * phi, int x, int y);
EWin *HiwinGetEwin(Hiwin * phi, int check);

View File

@ -28,7 +28,7 @@
#include "util.h"
typedef struct {
void (*func) (const char *line);
void (*func)(const char *line);
const char *name;
const char *nick;
const char *help_text;

View File

@ -216,7 +216,7 @@ EwcClose(void)
}
int
EwcStrToWcs(const char *str, int len, wchar_t * wcs, int wcl)
EwcStrToWcs(const char *str, int len, wchar_t *wcs, int wcl)
{
#if HAVE_ICONV
ICONV_CONST char *pi;
@ -232,7 +232,7 @@ EwcStrToWcs(const char *str, int len, wchar_t * wcs, int wcl)
no = 4096;
po = buf;
rc = iconv(iconv_cd_str2wcs, &pi, &ni, &po, &no);
if (rc == (size_t) (-1) || no == 0)
if (rc == (size_t)(-1) || no == 0)
return -1;
wcl = (4096 - no) / sizeof(wchar_t);
return wcl;
@ -241,7 +241,7 @@ EwcStrToWcs(const char *str, int len, wchar_t * wcs, int wcl)
po = (char *)wcs;
no = wcl * sizeof(wchar_t);
rc = iconv(iconv_cd_str2wcs, &pi, &ni, &po, &no);
if (rc == (size_t) (-1))
if (rc == (size_t)(-1))
return 0;
return wcl - no / sizeof(wchar_t);
#else
@ -249,7 +249,7 @@ EwcStrToWcs(const char *str, int len, wchar_t * wcs, int wcl)
return mbstowcs(NULL, str, 0);
mbstowcs(wcs, str, wcl);
wcs[wcl] = (wchar_t) '\0';
wcs[wcl] = (wchar_t)'\0';
len = 0;
return wcl;
@ -257,7 +257,7 @@ EwcStrToWcs(const char *str, int len, wchar_t * wcs, int wcl)
}
int
EwcWcsToStr(const wchar_t * wcs, int wcl, char *str, int len)
EwcWcsToStr(const wchar_t *wcs, int wcl, char *str, int len)
{
#if HAVE_ICONV
ICONV_CONST char *pi;
@ -267,7 +267,7 @@ EwcWcsToStr(const wchar_t * wcs, int wcl, char *str, int len)
ni = wcl * sizeof(wchar_t);
no = len;
rc = iconv(iconv_cd_wcs2str, &pi, &ni, &str, &no);
if (rc == (size_t) (-1))
if (rc == (size_t)(-1))
return 0;
return len - no;
#else
@ -294,9 +294,9 @@ EwcWcsToStr(const wchar_t * wcs, int wcl, char *str, int len)
static struct {
char *internal;
char *exported;
} Conf_locale =
{
NULL, NULL};
} Conf_locale = {
NULL, NULL
};
static struct {
char init;

View File

@ -52,9 +52,9 @@ void EstrInt2EncFree(const char *str, int want_utf8);
int EwcOpen(int utf8);
void EwcClose(void);
int EwcStrToWcs(const char *str, int len, wchar_t * wcs,
int EwcStrToWcs(const char *str, int len, wchar_t *wcs,
int wcl);
int EwcWcsToStr(const wchar_t * wcs, int wcl, char *str,
int EwcWcsToStr(const wchar_t *wcs, int wcl, char *str,
int len);
#endif /* _LANG_H_ */

View File

@ -490,7 +490,7 @@ MenuCheckShowEwinDesk(EWin * ewin, void *prm)
}
static void
MenuLoadFromEwins(Menu * m, int (*f) (EWin * ewin, void *prm), void *prm)
MenuLoadFromEwins(Menu * m, int (*f)(EWin * ewin, void *prm), void *prm)
{
EWin *const *lst;
int i, num;

View File

@ -1148,7 +1148,7 @@ MenusShowNamed(const char *name, const char *param)
int
MenusActive(void)
{
return ! !Mode_menus.first;
return !!Mode_menus.first;
}
static void

View File

@ -751,7 +751,7 @@ PagerShow(Pager * p)
typedef struct {
Desk *dsk;
void (*func) (Pager * p, void *prm);
void (*func)(Pager * p, void *prm);
void *prm;
} pager_foreach_data;
@ -767,7 +767,7 @@ _PagersForeachFunc(void *item, void *prm)
}
static void
PagersForeach(Desk * dsk, void (*func) (Pager * p, void *prm), void *prm)
PagersForeach(Desk * dsk, void (*func)(Pager * p, void *prm), void *prm)
{
pager_foreach_data data;

View File

@ -61,9 +61,9 @@ static LIST_HEAD(slideout_list);
static struct {
Slideout *active;
} Mode_slideouts =
{
NULL};
} Mode_slideouts = {
NULL
};
static void SlideoutHandleEvent(Win win, XEvent * ev, void *prm);

View File

@ -696,11 +696,11 @@ _DlgFillSnap(Dialog * d, DItem * table, void *data)
{
sd->match.name = 1;
sd->match.clss = 1;
sd->match.role = ! !ewin->icccm.wm_role;
sd->match.role = !!ewin->icccm.wm_role;
}
else
{
sd->match.title = ! !EwinGetIcccmName(ewin);
sd->match.title = !!EwinGetIcccmName(ewin);
}
}
@ -1599,7 +1599,7 @@ static void
_SnapShow(void *data, void *prm)
{
Snapshot *sn = (Snapshot *) data;
int full = ! !prm;
int full = !!prm;
char buf[FILEPATH_LEN_MAX];
const char *name;

View File

@ -285,7 +285,7 @@ SoundFree(const char *name)
sclass = SclassFind(name);
SclassDestroy(sclass);
return ! !sclass;
return !!sclass;
}
static void

View File

@ -34,11 +34,11 @@ typedef struct {
typedef struct _sample Sample;
typedef struct {
int (*Init) (void);
void (*Exit) (void);
Sample *(*SampleLoad) (const char *file);
void (*SampleDestroy) (Sample * s);
void (*SamplePlay) (Sample * s);
int (*Init)(void);
void (*Exit)(void);
Sample *(*SampleLoad)(const char *file);
void (*SampleDestroy)(Sample * s);
void (*SamplePlay)(Sample * s);
} SoundOps;
int SoundSampleGetData(const char *file, SoundSampleData * ssd);

View File

@ -45,18 +45,18 @@
#endif
typedef struct {
int (*Load) (TextState * ts, const char *name);
void (*Destroy) (TextState * ts);
void (*TextSize) (TextState * ts, const char *text, int len,
int *width, int *height, int *ascent);
void (*TextFit) (TextState * ts, char **ptext,
int *pwidth, int textwidth_limit);
void (*TextDraw) (TextState * ts, int x, int y,
const char *text, int len);
int (*FdcInit) (TextState * ts, Win win, EX_Drawable draw);
void (*FdcFini) (TextState * ts);
void (*FdcSetDrawable) (TextState * ts, unsigned long draw);
void (*FdcSetColor) (TextState * ts, unsigned int color);
int (*Load)(TextState * ts, const char *name);
void (*Destroy)(TextState * ts);
void (*TextSize)(TextState * ts, const char *text, int len,
int *width, int *height, int *ascent);
void (*TextFit)(TextState * ts, char **ptext,
int *pwidth, int textwidth_limit);
void (*TextDraw)(TextState * ts, int x, int y,
const char *text, int len);
int (*FdcInit)(TextState * ts, Win win, EX_Drawable draw);
void (*FdcFini)(TextState * ts);
void (*FdcSetDrawable)(TextState * ts, unsigned long draw);
void (*FdcSetColor)(TextState * ts, unsigned int color);
} FontOps;
struct _textstate {

View File

@ -29,7 +29,7 @@ struct _timer {
unsigned int in_time;
unsigned int at_time;
struct _timer *next;
int (*func) (void *data);
int (*func)(void *data);
void *data;
char again;
};
@ -83,7 +83,7 @@ _TimerDel(Timer * timer)
}
Timer *
TimerAdd(int dt_ms, int (*func) (void *data), void *data)
TimerAdd(int dt_ms, int (*func)(void *data), void *data)
{
Timer *timer;

View File

@ -26,7 +26,7 @@
#include "etypes.h"
Timer *TimerAdd(int dt_ms, int (*func) (void *data), void *data);
Timer *TimerAdd(int dt_ms, int (*func)(void *data), void *data);
void TimerDel(Timer * timer);
void TimerSetInterval(Timer * timer, int dt_ms);
void TimersRun(unsigned int t_ms);
@ -39,7 +39,7 @@ int TimersRunNextIn(unsigned int t_ms);
#define TIMER_DEL(timer) \
if (timer) { TimerDel(timer); timer = NULL; }
Idler *IdlerAdd(void (*func) (void *data), void *data);
Idler *IdlerAdd(void (*func)(void *data), void *data);
void IdlerDel(Idler * id);
void IdlersRun(void);

View File

@ -2401,7 +2401,7 @@ ERegionIsEmpty(EX_SrvRegion rgn)
void
ERegionShow(const char *txt, EX_SrvRegion rgn,
void (*prf) (const char *fmt, ...))
void (*prf)(const char *fmt, ...))
{
int i, nr;
XRectangle *pr;

View File

@ -984,7 +984,7 @@ ex_netwm_name_get(EX_Window win, char **name)
s = _ex_window_prop_string_utf8_get(win, EX_ATOM_NET_WM_NAME);
*name = s;
return ! !s;
return !!s;
}
void
@ -1001,7 +1001,7 @@ ex_netwm_visible_name_get(EX_Window win, char **name)
s = _ex_window_prop_string_utf8_get(win, EX_ATOM_NET_WM_VISIBLE_NAME);
*name = s;
return ! !s;
return !!s;
}
void
@ -1018,7 +1018,7 @@ ex_netwm_icon_name_get(EX_Window win, char **name)
s = _ex_window_prop_string_utf8_get(win, EX_ATOM_NET_WM_ICON_NAME);
*name = s;
return ! !s;
return !!s;
}
void
@ -1035,7 +1035,7 @@ ex_netwm_visible_icon_name_get(EX_Window win, char **name)
s = _ex_window_prop_string_utf8_get(win, EX_ATOM_NET_WM_VISIBLE_ICON_NAME);
*name = s;
return ! !s;
return !!s;
}
void
@ -1085,5 +1085,5 @@ ex_netwm_startup_id_get(EX_Window win, char **id)
s = _ex_window_prop_string_utf8_get(win, EX_ATOM_NET_STARTUP_ID);
*id = s;
return ! !s;
return !!s;
}

View File

@ -349,7 +349,7 @@ void ERegionUnionOffset(EX_SrvRegion dst, int dx, int dy,
int ERegionIsEmpty(EX_SrvRegion rgn);
#endif
void ERegionShow(const char *txt, EX_SrvRegion rgn,
void (*prf) (const char *fmt, ...));
void (*prf)(const char *fmt, ...));
void EPictureSetClip(EX_Picture pict, EX_SrvRegion clip);