mirror of
https://github.com/morgant/mlclock.git
synced 2024-11-22 03:30:54 +00:00
Formatting: variables indentation
This commit is contained in:
parent
af25a06059
commit
ebc53bb8cb
60
mlclock.c
60
mlclock.c
@ -34,44 +34,44 @@
|
|||||||
#define FORM2 "(%a)%Y.%b.%d"
|
#define FORM2 "(%a)%Y.%b.%d"
|
||||||
#define DEFAULTLANG "C"
|
#define DEFAULTLANG "C"
|
||||||
|
|
||||||
int Mode; /* timing of change form */
|
int Mode; /* timing of change form */
|
||||||
int Near; /* the distance of activity */
|
int Near; /* the distance of activity */
|
||||||
int Head; /* space of window head */
|
int Head; /* space of window head */
|
||||||
char *Form1; /* display form of main */
|
char *Form1; /* display form of main */
|
||||||
char *Form2; /* display form of second */
|
char *Form2; /* display form of second */
|
||||||
char *LocaleName; /* locale name */
|
char *LocaleName; /* locale name */
|
||||||
char *FSName; /* font set name */
|
char *FSName; /* font set name */
|
||||||
char *RCFile; /* path of config file */
|
char *RCFile; /* path of config file */
|
||||||
int Color[2][3]; /* the color for font and background */
|
int Color[2][3]; /* the color for font and background */
|
||||||
int Bold = False; /* software bold font */
|
int Bold = False; /* software bold font */
|
||||||
|
|
||||||
void SetFont(char *localename, Display *dpy, char *fsname);
|
void SetFont(char *localename, Display *dpy, char *fsname);
|
||||||
void readrc();
|
void readrc();
|
||||||
void getRGB(char *color, int *store);
|
void getRGB(char *color, int *store);
|
||||||
void usage(char *name);
|
void usage(char *name);
|
||||||
|
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
Window win;
|
Window win;
|
||||||
XEvent eve;
|
XEvent eve;
|
||||||
XRectangle ink, logical;
|
XRectangle ink, logical;
|
||||||
GC gc;
|
GC gc;
|
||||||
XFontSet fs;
|
XFontSet fs;
|
||||||
Colormap cmap;
|
Colormap cmap;
|
||||||
|
|
||||||
struct timeval wait;
|
struct timeval wait;
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
char str[MAX_FORM], str2[MAX_FORM], *form = NULL;
|
char str[MAX_FORM], str2[MAX_FORM], *form = NULL;
|
||||||
int screen, sw = False, lsec = 0, uhead, width, height, i;
|
int screen, sw = False, lsec = 0, uhead, width, height, i;
|
||||||
struct tm *tmm;
|
struct tm *tmm;
|
||||||
time_t tmt;
|
time_t tmt;
|
||||||
|
|
||||||
Window root, child;
|
Window root, child;
|
||||||
int rootx, rooty, wx, wy;
|
int rootx, rooty, wx, wy;
|
||||||
unsigned int key;
|
unsigned int key;
|
||||||
XColor xcol;
|
XColor xcol;
|
||||||
XSizeHints hint;
|
XSizeHints hint;
|
||||||
int iro[2];
|
int iro[2];
|
||||||
|
|
||||||
wait.tv_usec = 200000;
|
wait.tv_usec = 200000;
|
||||||
wait.tv_sec = 0;
|
wait.tv_sec = 0;
|
||||||
@ -215,7 +215,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
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;
|
||||||
|
|
||||||
if ( setlocale(LC_ALL, localename) == NULL )
|
if ( setlocale(LC_ALL, localename) == NULL )
|
||||||
fprintf(stderr,"Can't set the locale\n");
|
fprintf(stderr,"Can't set the locale\n");
|
||||||
@ -226,15 +226,15 @@ void SetFont(char *localename, Display *dpy, char *fsname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void readrc() {
|
void readrc() {
|
||||||
int i, end, len, sw1, cn = 0;
|
int i, end, len, sw1, cn = 0;
|
||||||
char string[501], work[201], code[100], data[100], *ptr;
|
char string[501], work[201], code[100], data[100], *ptr;
|
||||||
char *fore, *back;
|
char *fore, *back;
|
||||||
struct _name {
|
struct _name {
|
||||||
char name[10];
|
char name[10];
|
||||||
int sw;
|
int sw;
|
||||||
};
|
};
|
||||||
|
|
||||||
FILE *file;
|
FILE *file;
|
||||||
|
|
||||||
struct _name N[] = {
|
struct _name N[] = {
|
||||||
{ "FORM1", 1 },
|
{ "FORM1", 1 },
|
||||||
@ -418,8 +418,8 @@ void readrc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void getRGB(char *color, int *store) {
|
void getRGB(char *color, int *store) {
|
||||||
int i;
|
int i;
|
||||||
char tmpcolor[3];
|
char tmpcolor[3];
|
||||||
XColor rgb, hard;
|
XColor rgb, hard;
|
||||||
|
|
||||||
if ( color[0] == '#' ) {
|
if ( color[0] == '#' ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user