mirror of
https://github.com/morgant/mlclock.git
synced 2024-11-22 03:30:54 +00:00
Formatting: clean up indentation
This commit is contained in:
parent
ca8f15da73
commit
67f6bf5d9a
25
mlclock.c
25
mlclock.c
@ -139,7 +139,8 @@ int main(int argc, char **argv) {
|
||||
xcol.blue = Color[i][2];
|
||||
if ( XAllocColor(dpy, cmap, &xcol) )
|
||||
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),
|
||||
@ -172,9 +173,8 @@ int main(int argc, char **argv) {
|
||||
(-Near < wy) && (wy < height + Near + Head) )
|
||||
form = Form2;
|
||||
else
|
||||
form = Form1; }
|
||||
else
|
||||
if ( Mode == CLICK ) {
|
||||
form = Form1;
|
||||
} else if ( Mode == CLICK ) {
|
||||
if ( XEventsQueued(dpy, QueuedAfterFlush) ) {
|
||||
XNextEvent(dpy, &eve);
|
||||
if ( eve.type == ButtonRelease ) {
|
||||
@ -182,8 +182,7 @@ int main(int argc, char **argv) {
|
||||
sw = True;
|
||||
lsec = tmm->tm_sec;
|
||||
form = Form2;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
sw = False;
|
||||
form = Form1;
|
||||
}
|
||||
@ -214,8 +213,7 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetFont(char *localename, Display *dpy, char *fsname)
|
||||
{
|
||||
void SetFont(char *localename, Display *dpy, char *fsname) {
|
||||
char **miss, *def;
|
||||
int nMiss;
|
||||
|
||||
@ -238,7 +236,7 @@ void readrc() {
|
||||
|
||||
FILE *file;
|
||||
|
||||
struct _name N[] ={
|
||||
struct _name N[] = {
|
||||
{ "FORM1", 1 },
|
||||
{ "FORM2", 2 },
|
||||
{ "NEAR", 3 },
|
||||
@ -249,7 +247,8 @@ void readrc() {
|
||||
{ "FONTCOLOR", 8 },
|
||||
{ "BACKCOLOR", 9 },
|
||||
{ "BOLD", 10 },
|
||||
{ "", 0 }};
|
||||
{ "", 0 }
|
||||
};
|
||||
|
||||
|
||||
Mode = Near = Head = NONE;
|
||||
@ -269,7 +268,7 @@ void readrc() {
|
||||
|
||||
if ( (file = fopen(RCFile, "a")) == NULL )
|
||||
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, "FORM2 = \"(%%a)%%b-%%d\"\n");
|
||||
fprintf(file, "EVENT = FOCUS ; FOCUS or CLICK\n");
|
||||
@ -283,8 +282,7 @@ void readrc() {
|
||||
fclose(file);
|
||||
fprintf(stderr, "Created %s file.\n", RCFile);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else {
|
||||
while ( fgets(string, 500, file) ) {
|
||||
end = FALSE;
|
||||
i = 0;
|
||||
@ -391,6 +389,7 @@ void readrc() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( Mode == NONE )
|
||||
Mode = FOCUS;
|
||||
|
Loading…
Reference in New Issue
Block a user