AA> any idea whether this is the right solution ? Please try the attached instead.
Juliusz
Index: xc/programs/mkfontscale/mkfontscale.c =================================================================== RCS file: /cvs/xc/programs/mkfontscale/mkfontscale.c,v retrieving revision 1.9 diff -u -r1.9 mkfontscale.c --- xc/programs/mkfontscale/mkfontscale.c 2003/07/01 13:05:34 1.9 +++ xc/programs/mkfontscale/mkfontscale.c 2003/07/01 19:19:32 @@ -117,6 +117,7 @@ } if(prefix[strlen(prefix) - 1] != '/') strcat(prefix, "/"); + encodingPrefix = dsprintf("%s", prefix); outfilename = NULL; @@ -154,7 +155,8 @@ usage(); exit(1); } - strcpy(prefix, argv[argn + 1]); + free(encodingPrefix); + encodingPrefix = dsprintf("%s", argv[argn + 1]); argn += 2; } else if(strcmp(argv[argn], "-e") == 0) { if(argn >= argc - 1) { @@ -199,8 +201,6 @@ } } - encodingPrefix = dsprintf("%s", prefix); - if(outfilename == NULL) { if(doBitmaps) outfilename = "fonts.dir"; @@ -1211,10 +1211,12 @@ closedir(dirp); return -1; } - free(fullname); - fullname = n; + encodingsToDo = listConsF(encodingsToDo, "%s %s", *name, n); + free(n); + } else { + encodingsToDo = + listConsF(encodingsToDo, "%s %s", *name, fullname); } - encodingsToDo = listConsF(encodingsToDo, "%s %s", *name ,fullname); if(encodingsToDo == NULL) { fprintf(stderr, "Couldn't allocate encodings\n"); closedir(dirp);