summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-03-01 13:44:16 +0000
committerEgbert Eich <eich@suse.de>2004-03-01 13:44:16 +0000
commitda856ee314ece6769de4b672a15a08451ac15946 (patch)
tree5513f9e68ffa286a6a62bb6525f046754b993403
parent1e3c49984c5426ecdfd1d9212aa4fd26924af847 (diff)
3. Added missing parts to XKB to make XEVIE branch compile (Egbert Eich).XEVIE
2. Merged with XORG-CURRENT branch to obtain a bugfix (Egbert Eich). 1. First add of SUN's XIVIE extension (Stuart Kreitman).
-rw-r--r--src/encparse.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/encparse.c b/src/encparse.c
index e4c9a7e..2e24475 100644
--- a/src/encparse.c
+++ b/src/encparse.c
@@ -20,8 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* $XdotOrg: 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.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 */
@@ -838,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. */
@@ -853,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)