Thanks for taking a look, and hope the patch does help indeed! If you
need any further information or whatever, please don't hesitate to
contact me.
Input:
Fix:
none.
--- graphviz-1.7.7-orig/lefty/ws/x11/libfilereq/SelFile.c Fri Jun 1 05:41:16 2001
+++ graphviz-1.7.7/lefty/ws/x11/libfilereq/SelFile.c Tue Dec 18 21:44:50 2001
@@ -575,19 +575,11 @@
SFchdir(SFstartDir);
if ((fp = fopen(name, mode)) == NULL) {
char *buf;
- if (errno <= sys_nerr) {
- buf = XtMalloc(strlen(failed) + strlen(sys_errlist[errno]) +
- strlen(prompt) + 2);
- strcpy(buf, failed);
- strcat(buf, sys_errlist[errno]);
- strcat(buf, "n");
- strcat(buf, prompt);
- } else {
- buf = XtMalloc(strlen(failed) + strlen(prompt) + 2);
- strcpy(buf, failed);
- strcat(buf, "n");
- strcat(buf, prompt);
- }
+ char *errormsg = strerror(errno);
+ buf = XtMalloc(strlen(failed) + strlen(errormsg) + strlen(prompt) + 2);
+ strcpy(buf, failed);
+ strcat(buf, errormsg);
+ strcat(buf, "n");
XtSetArg(args[0], XtNlabel, buf);
XtSetValues(selFilePrompt, args, ONE);
XtFree(buf);