|
|
a8840b6 |
--- alfont-2.0.6/include/alfont.h~ 2006-11-30 13:48:16.000000000 +0100
|
|
|
a8840b6 |
+++ alfont-2.0.6/include/alfont.h 2006-11-30 13:48:16.000000000 +0100
|
|
|
a8840b6 |
@@ -10,9 +10,9 @@
|
|
|
a8840b6 |
/* See FTL.txt (FreeType Project License) for license */
|
|
|
a8840b6 |
|
|
|
a8840b6 |
|
|
|
a8840b6 |
-#define ALFONT_WINDOWS //When compiling in WINDOWS,please uncomment this line.
|
|
|
a8840b6 |
+//#define ALFONT_WINDOWS //When compiling in WINDOWS,please uncomment this line.
|
|
|
a8840b6 |
//#define ALFONT_DOS //When compiling in DOS,please uncomment this line.
|
|
|
a8840b6 |
-//#define ALFONT_LINUX //When compiling in LINUX,please uncomment this line.
|
|
|
a8840b6 |
+#define ALFONT_LINUX //When compiling in LINUX,please uncomment this line.
|
|
|
a8840b6 |
|
|
|
a8840b6 |
|
|
|
a8840b6 |
#ifndef ALFONT_H
|
|
|
a8840b6 |
@@ -461,4 +461,4 @@
|
|
|
a8840b6 |
|
|
|
a8840b6 |
Platform specifics
|
|
|
a8840b6 |
RISCOS-LATIN1
|
|
|
a8840b6 |
-*/
|
|
|
a8840b6 |
\ No newline at end of file
|
|
|
a8840b6 |
+*/
|
|
|
a8840b6 |
--- alfont-2.0.6/src/alfont.c~ 2006-11-30 16:12:55.000000000 +0100
|
|
|
a8840b6 |
+++ alfont-2.0.6/src/alfont.c 2006-11-30 16:12:55.000000000 +0100
|
|
|
a8840b6 |
@@ -450,7 +450,7 @@
|
|
|
a8840b6 |
alfont_set_char_extra_spacing(font, 0);
|
|
|
a8840b6 |
|
|
|
a8840b6 |
//Initial Font attribute
|
|
|
a8840b6 |
- font->language=""; /* Initial Language */
|
|
|
a8840b6 |
+ font->language=strdup(""); /* Initial Language */
|
|
|
a8840b6 |
font->type=0; /* Initial Code Convert */
|
|
|
a8840b6 |
font->outline_top=0; /* Initial Font top outline width */
|
|
|
a8840b6 |
font->outline_bottom=0; /* Initial Font bottom outline width */
|
|
|
a8840b6 |
@@ -530,7 +530,7 @@
|
|
|
a8840b6 |
alfont_set_char_extra_spacing(font, 0);
|
|
|
a8840b6 |
|
|
|
a8840b6 |
//Initial Font attribute
|
|
|
a8840b6 |
- font->language=""; /* Initial Language */
|
|
|
a8840b6 |
+ font->language=strdup(""); /* Initial Language */
|
|
|
a8840b6 |
font->type=0; /* Initial Code Convert */
|
|
|
a8840b6 |
font->outline_top=0; /* Initial Font top outline width */
|
|
|
a8840b6 |
font->outline_bottom=0; /* Initial Font bottom outline width */
|
|
|
a8840b6 |
@@ -871,7 +871,7 @@
|
|
|
a8840b6 |
last_glyph_index = 0;
|
|
|
a8840b6 |
|
|
|
a8840b6 |
#ifdef ALFONT_LINUX //Fix for Linux Unicode System(be converted)
|
|
|
a8840b6 |
- for (character = ugetxc(&(const char*)lpszW); character != 0; character = ugetxc(&(const char*)lpszW),character = ugetxc(&(const char*)lpszW)) {
|
|
|
a8840b6 |
+ for (character = ugetxc((const char**)&lpszW); character != 0; character = ugetxc((const char**)&lpszW),character = ugetxc((const char**)&lpszW)) {
|
|
|
a8840b6 |
#else
|
|
|
a8840b6 |
for (character = ugetxc(&(const char*)lpszW); character != 0; character = ugetxc(&(const char*)lpszW)) {
|
|
|
a8840b6 |
#endif
|
|
|
a8840b6 |
@@ -1957,7 +1957,7 @@
|
|
|
a8840b6 |
last_glyph_index = 0;
|
|
|
a8840b6 |
|
|
|
a8840b6 |
#ifdef ALFONT_LINUX //Fix for Linux Unicode System(be converted)
|
|
|
a8840b6 |
- for (character = ugetxc(&(const char*)lpszW); character != 0; character = ugetxc(&(const char*)lpszW),character = ugetxc(&(const char*)lpszW)) {
|
|
|
a8840b6 |
+ for (character = ugetxc((const char**)&lpszW); character != 0; character = ugetxc((const char**)&lpszW),character = ugetxc((const char**)&lpszW)) {
|
|
|
a8840b6 |
#else
|
|
|
a8840b6 |
for (character = ugetxc(&(const char*)lpszW); character != 0; character = ugetxc(&(const char*)lpszW)) {
|
|
|
a8840b6 |
#endif
|
|
|
a8840b6 |
@@ -2735,7 +2735,7 @@
|
|
|
a8840b6 |
/* virtually draw char by char */
|
|
|
a8840b6 |
last_glyph_index = 0;
|
|
|
a8840b6 |
#ifdef ALFONT_LINUX //Fix for Linux Unicode System(be converted)
|
|
|
a8840b6 |
- for (character = ugetxc(&(const char*)lpszW); character != 0; character = ugetxc(&(const char*)lpszW),character = ugetxc(&(const char*)lpszW)) {
|
|
|
a8840b6 |
+ for (character = ugetxc((const char**)&lpszW); character != 0; character = ugetxc((const char**)&lpszW),character = ugetxc((const char**)&lpszW)) {
|
|
|
a8840b6 |
#else
|
|
|
a8840b6 |
for (character = ugetxc(&(const char*)lpszW); character != 0; character = ugetxc(&(const char*)lpszW)) {
|
|
|
a8840b6 |
#endif
|
|
|
a8840b6 |
@@ -3712,7 +3712,9 @@
|
|
|
a8840b6 |
if (language == NULL) {
|
|
|
a8840b6 |
language = "";
|
|
|
a8840b6 |
}
|
|
|
a8840b6 |
- f->language=(char *)malloc(strlen(language)*sizeof(char));
|
|
|
a8840b6 |
+ if (f->language)
|
|
|
a8840b6 |
+ free(f->language);
|
|
|
a8840b6 |
+ f->language=(char *)malloc((strlen(language)+1)*sizeof(char));
|
|
|
a8840b6 |
strcpy(f->language,language);
|
|
|
a8840b6 |
}
|
|
|
a8840b6 |
|