diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2004-02-23 20:34:43 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2004-02-23 20:34:43 +0000 |
commit | faa2a922a0dbd16844055f83a159dab92a383376 (patch) | |
tree | 246dd2e38fc0bc23a10ce127bfb07625c4e4635c /src/encparse.c | |
parent | 7ea6ca71ac6825b9a28510f23c35d8b480752c41 (diff) |
Import most of XFree86 4.4RC3. This import excludes files which have thexf86-4_3_99_903_special
new license. If we want to, later we can import 4.4RC3 again and pick
up the files that have the new license, but for now the vendor branch
is "pure."
Diffstat (limited to 'src/encparse.c')
-rw-r--r-- | src/encparse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/encparse.c b/src/encparse.c index c304856..2e24475 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.19 2003/12/19 02:05:38 dawes Exp $ */ +/* $XFree86: xc/lib/font/fontfile/encparse.c,v 1.20 2004/02/11 21:11:19 dawes Exp $ */ /* Parser for encoding files */ @@ -837,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. */ @@ -852,8 +853,12 @@ FontEncReallyReallyLoad(const char *charset, } encoding = NULL; + if (!format[0]) { + sprintf(format, "%%%ds %%%d[^\n]\n", sizeof(encoding_name) - 1, + 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) |