mirror of
https://github.com/mpv-player/mpv
synced 2025-02-18 13:47:04 +00:00
desc fileformat changes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@215 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
54afa85eef
commit
89b069cae3
@ -41,6 +41,7 @@ char section[64];
|
|||||||
int i,j;
|
int i,j;
|
||||||
int chardb=0;
|
int chardb=0;
|
||||||
int fontdb=-1;
|
int fontdb=-1;
|
||||||
|
int version=0;
|
||||||
|
|
||||||
desc=malloc(sizeof(font_desc_t));if(!desc) return NULL;
|
desc=malloc(sizeof(font_desc_t));if(!desc) return NULL;
|
||||||
memset(desc,0,sizeof(font_desc_t));
|
memset(desc,0,sizeof(font_desc_t));
|
||||||
@ -122,6 +123,14 @@ while(fgets(sor,1020,f)){
|
|||||||
} else
|
} else
|
||||||
|
|
||||||
if(strcmp(section,"[info]")==0){
|
if(strcmp(section,"[info]")==0){
|
||||||
|
if(pdb==2 && strcmp(p[0],"name")==0){
|
||||||
|
desc->name=strdup(p[1]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(pdb==2 && strcmp(p[0],"descversion")==0){
|
||||||
|
version=atoi(p[1]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(pdb==2 && strcmp(p[0],"spacewidth")==0){
|
if(pdb==2 && strcmp(p[0],"spacewidth")==0){
|
||||||
desc->spacewidth=atoi(p[1]);
|
desc->spacewidth=atoi(p[1]);
|
||||||
continue;
|
continue;
|
||||||
@ -135,6 +144,7 @@ while(fgets(sor,1020,f)){
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
|
|
||||||
if(strcmp(section,"[characters]")==0){
|
if(strcmp(section,"[characters]")==0){
|
||||||
if(pdb==3 && strlen(p[0])==1){
|
if(pdb==3 && strlen(p[0])==1){
|
||||||
int chr=p[0][0];
|
int chr=p[0][0];
|
||||||
|
@ -6,6 +6,7 @@ typedef struct {
|
|||||||
} raw_file;
|
} raw_file;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
char *name;
|
||||||
int spacewidth;
|
int spacewidth;
|
||||||
int charspace;
|
int charspace;
|
||||||
int height;
|
int height;
|
||||||
|
Loading…
Reference in New Issue
Block a user