summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2004-02-23 21:34:47 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2004-02-23 21:34:47 +0000
commit0b1b9f59f2513f5e2795cba34c747b0e68f4b9b1 (patch)
tree5513f9e68ffa286a6a62bb6525f046754b993403
parent1e3c49984c5426ecdfd1d9212aa4fd26924af847 (diff)
merge most of XFree86 RC3 (4.3.99.903) from vendor branch. bug #214XORG-RELEASE-1-BASEXEVIE-MERGEXINERAMA_2
-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)