Mercurial > mplayer.hg
comparison libvo/font_load.c @ 1353:c3e3b0ae4d06
Applied DATADIR patch by Vladimir Kushnir
author | arpi |
---|---|
date | Fri, 20 Jul 2001 00:01:09 +0000 |
parents | 76fd9463b9d3 |
children | aa6f00037df1 |
comparison
equal
deleted
inserted
replaced
1352:5ac130627602 | 1353:c3e3b0ae4d06 |
---|---|
108 } | 108 } |
109 continue; | 109 continue; |
110 } | 110 } |
111 } | 111 } |
112 | 112 |
113 if(strcmp(section,"[fpath]")==0){ | |
114 if(pdb==1){ | |
115 desc->fpath=strdup(p[0]); | |
116 continue; | |
117 } | |
118 } else | |
119 | |
113 if(strcmp(section,"[files]")==0){ | 120 if(strcmp(section,"[files]")==0){ |
114 if(pdb==2 && strcmp(p[0],"alpha")==0){ | 121 if(pdb==2 && strcmp(p[0],"alpha")==0){ |
115 char *cp,*cp2; | 122 char *cp; |
116 if (!(cp=get_path("font/"))) return NULL; | 123 if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL; |
117 if (!(cp2=malloc(strlen(cp)+strlen(p[1])+1))) { | 124 |
118 free(cp); | 125 snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s", |
119 return NULL; | 126 desc->fpath,p[1]); |
120 } | 127 if(!((desc->pic_a[fontdb]=load_raw(cp,verbose)))){ |
121 sprintf(cp2,"%s%s",cp,p[1]); | |
122 if(!((desc->pic_a[fontdb]=load_raw(cp2,verbose)))){ | |
123 printf("Can't load font bitmap: %s\n",p[1]); | 128 printf("Can't load font bitmap: %s\n",p[1]); |
124 free(cp); | 129 free(cp); |
125 free(cp2); | |
126 return NULL; | 130 return NULL; |
127 } | 131 } |
128 free(cp); | 132 free(cp); |
129 free(cp2); | |
130 continue; | 133 continue; |
131 } | 134 } |
132 if(pdb==2 && strcmp(p[0],"bitmap")==0){ | 135 if(pdb==2 && strcmp(p[0],"bitmap")==0){ |
133 char *cp,*cp2; | 136 char *cp; |
134 if (!(cp=get_path("font/"))) return NULL; | 137 if (!(cp=malloc(strlen(desc->fpath)+strlen(p[1])+2))) return NULL; |
135 if (!(cp2=malloc(strlen(cp)+strlen(p[1])+1))) { | 138 |
136 free(cp); | 139 snprintf(cp,strlen(desc->fpath)+strlen(p[1])+2,"%s/%s", |
137 return NULL; | 140 desc->fpath,p[1]); |
138 } | 141 if(!((desc->pic_b[fontdb]=load_raw(cp,verbose)))){ |
139 sprintf(cp2,"%s%s",cp,p[1]); | |
140 if(!((desc->pic_b[fontdb]=load_raw(cp2,verbose)))){ | |
141 printf("Can't load font bitmap: %s\n",p[1]); | 142 printf("Can't load font bitmap: %s\n",p[1]); |
142 free(cp); | 143 free(cp); |
143 free(cp2); | |
144 return NULL; | 144 return NULL; |
145 } | 145 } |
146 free(cp); | 146 free(cp); |
147 free(cp2); | |
148 continue; | 147 continue; |
149 } | 148 } |
150 } else | 149 } else |
151 | 150 |
152 if(strcmp(section,"[info]")==0){ | 151 if(strcmp(section,"[info]")==0){ |