Fixes required to compile with clang

This commit is contained in:
Morgan Aldridge 2020-03-03 19:04:10 -05:00
parent bbb408e08c
commit e8040460b4

View File

@ -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 )