mirror of
https://github.com/morgant/mlclock.git
synced 2024-11-22 18:30:53 +00:00
Fixes required to compile with clang
This commit is contained in:
parent
bbb408e08c
commit
e8040460b4
28
mlclock.c
28
mlclock.c
@ -53,14 +53,14 @@ void usage( char *name ) ;
|
|||||||
Display *dpy ;
|
Display *dpy ;
|
||||||
Window win ;
|
Window win ;
|
||||||
XEvent eve ;
|
XEvent eve ;
|
||||||
XRectangle ink, log;
|
XRectangle ink, logical;
|
||||||
GC gc ;
|
GC gc ;
|
||||||
XFontSet fs ;
|
XFontSet fs ;
|
||||||
Colormap cmap ;
|
Colormap cmap ;
|
||||||
|
|
||||||
struct timeval wait ;
|
struct timeval wait ;
|
||||||
|
|
||||||
void 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 ;
|
||||||
@ -118,19 +118,19 @@ void main( int argc , char **argv ){
|
|||||||
tmm->tm_yday = 365;
|
tmm->tm_yday = 365;
|
||||||
|
|
||||||
strftime(str, MAX_FORM, Form1 , tmm);
|
strftime(str, MAX_FORM, Form1 , tmm);
|
||||||
XmbTextExtents( fs , str , strlen(str) , &ink, &log);
|
XmbTextExtents( fs , str , strlen(str) , &ink, &logical);
|
||||||
width=log.width ;
|
width=logical.width ;
|
||||||
uhead = log.y ;
|
uhead = logical.y ;
|
||||||
height = log.height ;
|
height = logical.height ;
|
||||||
|
|
||||||
strftime(str, MAX_FORM, Form2 , tmm);
|
strftime(str, MAX_FORM, Form2 , tmm);
|
||||||
XmbTextExtents( fs , str , strlen(str) , &ink, &log);
|
XmbTextExtents( fs , str , strlen(str) , &ink, &logical);
|
||||||
if ( width < log.width )
|
if ( width < logical.width )
|
||||||
width = log.width ;
|
width = logical.width ;
|
||||||
if ( uhead < log.y )
|
if ( uhead < logical.y )
|
||||||
uhead = log.y ;
|
uhead = logical.y ;
|
||||||
if ( height < log.height )
|
if ( height < logical.height )
|
||||||
height = log.height ;
|
height = logical.height ;
|
||||||
|
|
||||||
xcol.flags = DoRed|DoGreen|DoBlue ;
|
xcol.flags = DoRed|DoGreen|DoBlue ;
|
||||||
for ( i = 0 ; i < 2 ; i ++ ){
|
for ( i = 0 ; i < 2 ; i ++ ){
|
||||||
@ -210,6 +210,8 @@ void main( int argc , char **argv ){
|
|||||||
strcpy( str2 , str ) ;
|
strcpy( str2 , str ) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetFont( char *localename , Display *dpy , char *fsname )
|
void SetFont( char *localename , Display *dpy , char *fsname )
|
||||||
|
Loading…
Reference in New Issue
Block a user