diff options
-rw-r--r-- | include/X11/fonts/fontenc.h | 2 | ||||
-rw-r--r-- | src/encparse.c | 13 | ||||
-rw-r--r-- | src/fontenc.c | 5 | ||||
-rw-r--r-- | src/fontencI.h | 2 |
4 files changed, 18 insertions, 4 deletions
diff --git a/include/X11/fonts/fontenc.h b/include/X11/fonts/fontenc.h index 6145314..09472cf 100644 --- a/include/X11/fonts/fontenc.h +++ b/include/X11/fonts/fontenc.h @@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/include/fontenc.h,v 1.8 2001/08/13 21:46:48 dawes Exp $ */ +/* $XFree86: xc/lib/font/include/fontenc.h,v 1.7 2000/11/14 16:54:45 dawes Exp $ */ /* Header for backend-independent encoding code */ diff --git a/src/encparse.c b/src/encparse.c index 4c9c31b..acf17f2 100644 --- a/src/encparse.c +++ b/src/encparse.c @@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.18 2001/11/02 03:06:40 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.20tsi Exp $ */ /* Parser for encoding files */ @@ -32,6 +32,10 @@ THE SOFTWARE. #include <string.h> #include <stdio.h> +#ifdef SCO325 +#include <strings.h> +#endif + #ifndef FONTENC_NO_LIBFONT #include "fntfilio.h" @@ -833,6 +837,7 @@ FontEncReallyReallyLoad(const char *charset, char file_name[MAXFONTFILENAMELEN], encoding_name[MAXFONTNAMELEN], buf[MAXFONTFILENAMELEN]; int count, n; + static char format[24] = ""; /* As we don't really expect to open encodings that often, we don't take the trouble of caching encodings directories. */ @@ -848,8 +853,12 @@ FontEncReallyReallyLoad(const char *charset, } encoding = NULL; + if (!format[0]) { + sprintf(format, "%%%ds %%%d[^\n]\n", (int)sizeof(encoding_name) - 1, + (int)sizeof(file_name) - 1); + } for(;;) { - count = fscanf(file, "%s %[^\n]\n", encoding_name, file_name); + count = fscanf(file, format, encoding_name, file_name); if(count == EOF) break; if(count != 2) diff --git a/src/fontenc.c b/src/fontenc.c index 247cc0a..2f3eafc 100644 --- a/src/fontenc.c +++ b/src/fontenc.c @@ -20,12 +20,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* $XdotOrg: xc/lib/font/fontfile/fontenc.c,v 1.1.4.1.4.2 2004/03/04 19:35:56 kaleb Exp $ */ /* $XFree86: xc/lib/font/fontfile/fontenc.c,v 1.15 2003/02/20 03:25:19 dawes Exp $ */ /* Backend-independent encoding code */ #include <string.h> +#ifdef SCO325 +#include <strings.h> +#endif + #ifndef FONTENC_NO_LIBFONT #include "fontmisc.h" /* defines xalloc and friends */ diff --git a/src/fontencI.h b/src/fontencI.h index b9545e4..bd35a1f 100644 --- a/src/fontencI.h +++ b/src/fontencI.h @@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $XFree86: xc/lib/font/fontfile/fontencI.h,v 1.4 2001/08/13 21:46:47 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/fontencI.h,v 1.3 1999/04/25 10:01:43 dawes Exp $ */ /* Private types and functions for the encoding code. */ /* Used by the files `fontenc.h' and `encparse.h' */ |