Formatting: clean up indentation

This commit is contained in:
Morgan Aldridge 2020-03-07 11:46:51 -05:00
parent ca8f15da73
commit 67f6bf5d9a

View File

@ -139,7 +139,8 @@ int main(int argc, char **argv) {
xcol.blue = Color[i][2]; xcol.blue = Color[i][2];
if ( XAllocColor(dpy, cmap, &xcol) ) if ( XAllocColor(dpy, cmap, &xcol) )
iro[i] = xcol.pixel; iro[i] = xcol.pixel;
else fprintf(stderr,"Can't allocate Color \n"); else
fprintf(stderr,"Can't allocate Color \n");
} }
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy),
@ -172,9 +173,8 @@ int main(int argc, char **argv) {
(-Near < wy) && (wy < height + Near + Head) ) (-Near < wy) && (wy < height + Near + Head) )
form = Form2; form = Form2;
else else
form = Form1; } form = Form1;
else } else if ( Mode == CLICK ) {
if ( Mode == CLICK ) {
if ( XEventsQueued(dpy, QueuedAfterFlush) ) { if ( XEventsQueued(dpy, QueuedAfterFlush) ) {
XNextEvent(dpy, &eve); XNextEvent(dpy, &eve);
if ( eve.type == ButtonRelease ) { if ( eve.type == ButtonRelease ) {
@ -182,8 +182,7 @@ int main(int argc, char **argv) {
sw = True; sw = True;
lsec = tmm->tm_sec; lsec = tmm->tm_sec;
form = Form2; form = Form2;
} } else {
else {
sw = False; sw = False;
form = Form1; form = Form1;
} }
@ -214,8 +213,7 @@ int main(int argc, char **argv) {
return 0; return 0;
} }
void SetFont(char *localename, Display *dpy, char *fsname) void SetFont(char *localename, Display *dpy, char *fsname) {
{
char **miss, *def; char **miss, *def;
int nMiss; int nMiss;
@ -238,7 +236,7 @@ void readrc() {
FILE *file; FILE *file;
struct _name N[] ={ struct _name N[] = {
{ "FORM1", 1 }, { "FORM1", 1 },
{ "FORM2", 2 }, { "FORM2", 2 },
{ "NEAR", 3 }, { "NEAR", 3 },
@ -249,7 +247,8 @@ void readrc() {
{ "FONTCOLOR", 8 }, { "FONTCOLOR", 8 },
{ "BACKCOLOR", 9 }, { "BACKCOLOR", 9 },
{ "BOLD", 10 }, { "BOLD", 10 },
{ "", 0 }}; { "", 0 }
};
Mode = Near = Head = NONE; Mode = Near = Head = NONE;
@ -269,7 +268,7 @@ void readrc() {
if ( (file = fopen(RCFile, "a")) == NULL ) if ( (file = fopen(RCFile, "a")) == NULL )
fprintf(stderr, "You can't make rc file in your own dirctory.\n"); fprintf(stderr, "You can't make rc file in your own dirctory.\n");
else{ else {
fprintf(file, "FORM1 = \"(%%a)%%l:%%M:%%S%%p\"\n"); fprintf(file, "FORM1 = \"(%%a)%%l:%%M:%%S%%p\"\n");
fprintf(file, "FORM2 = \"(%%a)%%b-%%d\"\n"); fprintf(file, "FORM2 = \"(%%a)%%b-%%d\"\n");
fprintf(file, "EVENT = FOCUS ; FOCUS or CLICK\n"); fprintf(file, "EVENT = FOCUS ; FOCUS or CLICK\n");
@ -283,8 +282,7 @@ void readrc() {
fclose(file); fclose(file);
fprintf(stderr, "Created %s file.\n", RCFile); fprintf(stderr, "Created %s file.\n", RCFile);
} }
} } else {
else
while ( fgets(string, 500, file) ) { while ( fgets(string, 500, file) ) {
end = FALSE; end = FALSE;
i = 0; i = 0;
@ -391,6 +389,7 @@ void readrc() {
break; break;
} }
} }
}
if ( Mode == NONE ) if ( Mode == NONE )
Mode = FOCUS; Mode = FOCUS;