Mercurial > mplayer.hg
changeset 32838:95465a2dec73
Cosmetic: Use more natural notations.
author | ib |
---|---|
date | Fri, 18 Feb 2011 10:38:39 +0000 |
parents | 0501ab77f5e2 |
children | 2dd39155f320 |
files | gui/skin/font.c |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/skin/font.c Thu Feb 17 23:39:29 2011 +0000 +++ b/gui/skin/font.c Fri Feb 18 10:38:39 2011 +0000 @@ -38,7 +38,7 @@ if ( id == MAX_FONTS ) return -2; - if ( ( Fonts[id]=calloc( 1,sizeof( *Fonts[id] ) ) ) == NULL ) return -1; + if ( !( Fonts[id]=calloc( 1,sizeof( *Fonts[id] ) ) ) ) return -1; av_strlcpy( Fonts[id]->name,name,MAX_FONT_NAME ); for ( i=0;i<ASCII_CHRS+EXTRA_CHRS;i++ ) @@ -69,13 +69,11 @@ unsigned char param[256]; int id, n; - id = fntAddNewFont( fname ); - - if ( id < 0 ) return id; + if ( ( id = fntAddNewFont( fname ) ) < 0 ) return id; av_strlcpy( tmp,path,sizeof( tmp ) ); av_strlcat( tmp,fname,sizeof( tmp ) ); av_strlcat( tmp,".fnt",sizeof( tmp ) ); - if ( ( f=fopen( tmp,"rt" ) ) == NULL ) + if ( !( f=fopen( tmp,"rt" ) ) ) { gfree( (void **) &Fonts[id] ); return -3; @@ -123,7 +121,7 @@ { av_strlcpy( tmp,path,sizeof( tmp ) ); av_strlcat( tmp,param,sizeof( tmp ) ); mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[font] image file: %s\n",tmp ); - if ( skinBPRead( tmp,&Fonts[id]->Bitmap ) ) + if ( skinBPRead( tmp,&Fonts[id]->Bitmap ) != 0) { gfree((void **) &Fonts[id]->Bitmap.Image); gfree((void **) &Fonts[id]); @@ -247,7 +245,7 @@ if (item->height != th) gfree((void **) &item->Bitmap.Image); - if ( item->Bitmap.Image == NULL ) + if ( !item->Bitmap.Image ) { item->Bitmap.Height=item->height=th; item->Bitmap.Width=item->width=iw;