Mercurial > mplayer.hg
comparison gui/skin/font.c @ 32787:d55d0bb7d00f
Reduce Fonts array to required size.
author | ib |
---|---|
date | Thu, 10 Feb 2011 11:47:29 +0000 |
parents | 31f88a1387ad |
children | 236a95445ebb |
comparison
equal
deleted
inserted
replaced
32786:31f88a1387ad | 32787:d55d0bb7d00f |
---|---|
24 #include "font.h" | 24 #include "font.h" |
25 #include "cut.h" | 25 #include "cut.h" |
26 #include "mp_msg.h" | 26 #include "mp_msg.h" |
27 #include "libavutil/avstring.h" | 27 #include "libavutil/avstring.h" |
28 | 28 |
29 bmpFont * Fonts[MAX_FONTS + 1] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL }; | 29 bmpFont * Fonts[MAX_FONTS] = { NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL }; |
30 | 30 |
31 int fntAddNewFont( char * name ) | 31 int fntAddNewFont( char * name ) |
32 { | 32 { |
33 int id; | 33 int id; |
34 int i; | 34 int i; |
35 | 35 |
36 for( id=0;id<MAX_FONTS + 1;id++ ) | 36 for( id=0;id<MAX_FONTS;id++ ) |
37 if ( !Fonts[id] ) break; | 37 if ( !Fonts[id] ) break; |
38 | 38 |
39 if ( id == MAX_FONTS ) return -2; | 39 if ( id == MAX_FONTS ) return -2; |
40 | 40 |
41 if ( ( Fonts[id]=calloc( 1,sizeof( bmpFont ) ) ) == NULL ) return -1; | 41 if ( ( Fonts[id]=calloc( 1,sizeof( bmpFont ) ) ) == NULL ) return -1; |