Skip to content

Commit

Permalink
remove trailing whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieujobin committed Feb 28, 2023
1 parent 6f262e3 commit a6936b8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
18 changes: 8 additions & 10 deletions enlightenment.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
/* Some Xservers have a broken XQueryBestCursor function. You'll know this if
* your cursor looks like garbled mess whenever you move or resize windows
* or if your server goes down in a ball of flames when you move or resize.
* Report this bug to your Xserver vendors. This is a workaround. Uncomment it
* and maybe fiddle with the width & height defines until it works. (common
* Report this bug to your Xserver vendors. This is a workaround. Uncomment it
* and maybe fiddle with the width & height defines until it works. (common
* sizes are 64x64, 32x32 and 16x16 )
*
*
* #define BROKEN_XSERVER
* #define CURSOR_MAX_WIDTH 64
* #define CUSROS_MAX_HEIGHT 64
Expand Down Expand Up @@ -133,11 +133,10 @@
#define ClickToFocus 2

/* Timer mode constants */

#define TIMER_NONE 0
#define TIMER_INFOBOX 1
#define TIMER_ICONIFY 2
#define TIMER_AUTORAISE 3
#define TIMER_AUTORAISE 3
#define TIMER_SNAPSHOTPAGER 4

/*
Expand All @@ -148,12 +147,12 @@
#ifdef SOLARIS_SUX
typedef void (*__sighandler_t)(int);
typedef unsigned long sigset_t;
struct sigaction
struct sigaction
{
int sa_flags;
void (*sa_handler)();
sigset_t sa_mask;
int sa_resv[2];
int sa_resv[2];
};
#endif

Expand Down Expand Up @@ -182,7 +181,6 @@ struct ewn
Window icon_win;
int state;
char title[256];

int changes;
Colormap colormap;
int frame_x;
Expand Down Expand Up @@ -224,7 +222,7 @@ struct ewn
int prev_client_height;
int top;
Icon *icon;
struct
struct
{
Window shadow_win;
} fx;
Expand Down Expand Up @@ -328,7 +326,7 @@ typedef struct

typedef struct
{
struct
struct
{
int on;
int x;
Expand Down
1 change: 0 additions & 1 deletion events.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ void handleButtonDown(XEvent *ev,listhead *l) {
void handleButtonUp(XEvent *ev,listhead *l)
{
/* Menu *m; */

if (evmd.ewin) evmd.ewin->subwin_state[evmd.wbtn]=NORM;
if (evmd.mode==MODE_MENU) {
if ((tmp_menu)&&(tmp_menu->sel_item>=0))
Expand Down
20 changes: 8 additions & 12 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ void err(char *s) {
void X_Connect(void)
{
XWindowAttributes xwa;

disp=XOpenDisplay(NULL); /* open the display connection */
if (disp==NULL) /* if we couldn't open the connection.. error */
{
Expand Down Expand Up @@ -54,13 +53,12 @@ Image *LoadImage(ImlibData *d, char *file, ImColor *icl)
int x,y;
int a,b,c;
int load_err;

im=NULL;
load_err=0;
ss[0]=0;
if (!file) return NULL;
if (!d) return NULL;
if (file[0]!='/')
if (file[0]!='/')
{
sprintf(ss,".enlightenment/%s",file);
if (!exists(ss))
Expand All @@ -80,14 +78,13 @@ Image *LoadImage(ImlibData *d, char *file, ImColor *icl)
}
}
}
else
else
strcpy(ss,file);
if (!load_err) im=Imlib_load_image(d,ss);
if ((!im)&&(!load_err))
Alert("Holy Carumba! Geez oh crikey!\nI couldn't for the life of me load %s\nI'll probably run screaming off in a fit of rage now...\n",ss);
if (!im)
{

im=malloc(sizeof(Image));
im->rgb_width=50;
im->rgb_height=50;
Expand Down Expand Up @@ -139,7 +136,6 @@ void main(int argc, char **argv) {
states=0;
statefile[0]=0;
AlreadyWinListed=0;

sa.sa_handler = Reap;
sa.sa_flags = 0;
sigemptyset (&sa.sa_mask);
Expand Down Expand Up @@ -194,7 +190,7 @@ void main(int argc, char **argv) {
/* printf("%s\n",argv[j]); */
if (!strcmp("-debug",argv[j])) debug_mode=1;
else if (!strcmp("-restart",argv[j])) restart=1;
else if ((!strcmp("-theme",argv[j]))&&((argc-j)>1))
else if ((!strcmp("-theme",argv[j]))&&((argc-j)>1))
{
strcpy(Theme_Tar_Ball,argv[j+1]);
strcpy(Theme_Name,Theme_Tar_Ball);
Expand Down Expand Up @@ -268,16 +264,16 @@ void main(int argc, char **argv) {
}
argv1=malloc(strlen(argv[0])+1);
strcpy(argv1, argv[0]);

X_Connect(); /* connect to the display nominated */
imd=ImlibInit(disp); /* Inititalise Imlib..... */
if (!imd) /* uh oh.. problems... imlib had a bad day... */
{
{
fprintf(stderr,"FATAL.... cannot initialise Imlib!!! Outa here!\n");
Alert("FATAL ERROR!\n Cannot initialise Imlib!\n Quitting.\n");
EExit(1);
}
depth=imd->x.depth;
depth=imd->x.depth;
visual=imd->x.visual;
l=ListInit(); /* initialise the window list */
WM_STATE=XInternAtom(disp,"WM_STATE", False);
Expand All @@ -303,11 +299,11 @@ void main(int argc, char **argv) {
{
struct sigaction sa;
struct itimerval tv1,tv2;

if (timer_mode < TIMER_INFOBOX) {
for (getitimer(ITIMER_REAL, &tv1);
tv1.it_value.tv_sec != 0 || tv1.it_value.tv_usec != 0
|| tv1.it_interval.tv_sec != 0
|| tv1.it_interval.tv_sec != 0
|| tv1.it_interval.tv_usec != 0;
getitimer(ITIMER_REAL, &tv1));
}
Expand Down

0 comments on commit a6936b8

Please sign in to comment.