From: <enl...@so...> - 2001-01-10 21:53:32
|
Enlightenment CVS committal Author : mandrake Project : e17 Module : libs/etox Dir : e17/libs/etox/src Modified Files: Makefile.am font_style.c Log Message: Problems with font_style.c, fixed. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/etox/src/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- Makefile.am 2000/12/05 21:11:57 1.1 +++ Makefile.am 2001/01/10 21:53:53 1.2 @@ -29,7 +29,9 @@ Etox.h \ etox.c \ loadfile.h \ -loadfile.c +loadfile.c \ +font_style.c \ +font_style.h libetox_la_LIBADD = $(LIBS_ALL) =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/etox/src/font_style.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- font_style.c 2000/12/28 20:46:09 1.2 +++ font_style.c 2001/01/10 21:53:53 1.3 @@ -1,5 +1,5 @@ -#include "loadfile.h" #include "Etox.h" +#include "loadfile.h" E_Font_Style **style_list; int num_styles=0; @@ -9,13 +9,13 @@ E_Font_Style *style; FILE *font_file; char s[4096]; - int i1, i2, i3 fields; + int i1, i2, i3, fields; char s2[4096]; if(!path) return NULL; - style = malloc(sizeof E_Font_Style); + style = malloc(sizeof(E_Font_Style)); style->in_use = 0; style->bits = NULL; @@ -27,7 +27,7 @@ while(GetLine(s,4096,font_file)) { i1=i2=i3=0; memset(s2,0,4096); - fields = sscanf(s,"%4000[^=] %i %i %i",s2,i1,i2,i3); + fields = sscanf(s,"%4000[^=] %i %i %i",s2,&i1,&i2,&i3); if(fields < 3) { fclose(font_file); return style; @@ -40,14 +40,14 @@ style->bits = malloc(style->num_bits * sizeof(E_Style_Bit) + 1); } if(!strcmp(s2,"sh")) - style->bits[style->num_bits - 1]->type = STYLE_TYPE_SHADOW; + style->bits[style->num_bits - 1].type = STYLE_TYPE_SHADOW; if(!strcmp(s2,"fg")) - style->bits[style->num_bits - 1]->type = STYLE_TYPE_FOREGROUND; + style->bits[style->num_bits - 1].type = STYLE_TYPE_FOREGROUND; if(!strcmp(s2,"ol")) - style->bits[style->num_bits - 1]->type = STYLE_TYPE_OUTLINE; - style->bits[style->num_bits - 1]->x = i1; - style->bits[style->num_bits - 1]->y = i2; - style->bits[style->num_bits - 1]->alpha = i3; + style->bits[style->num_bits - 1].type = STYLE_TYPE_OUTLINE; + style->bits[style->num_bits - 1].x = i1; + style->bits[style->num_bits - 1].y = i2; + style->bits[style->num_bits - 1].alpha = i3; } fclose(font_file); |