diff -ruNd editors/textedit/patches/patch-aa editors/textedit/patches/patch-aa --- editors/textedit/patches/patch-aa Mon Jan 5 01:33:30 1998 +++ editors/textedit/patches/patch-aa Sun Apr 9 03:10:21 2000 @@ -1,5 +1,5 @@ ---- textedit.c.orig Tue Nov 4 22:36:32 1997 -+++ textedit.c Tue Nov 4 22:45:23 1997 +--- textedit.c.orig Wed Nov 5 01:36:32 1997 ++++ textedit.c Sun Apr 9 03:09:55 2000 @@ -40,10 +40,13 @@ * The function is already defined in the XView libraries long textsw_store_file(); @@ -14,3 +14,23 @@ /* extern Notify_value textedit_event_proc(); */ +@@ -904,6 +907,7 @@ + char name_to_use[MAXNAMLEN]; + int pid = getpid(); + int was_SIGILL = (sig == SIGILL); ++ char *tmpdir; + struct sigvec vec; + + if (handling_signal == 2) +@@ -929,7 +933,10 @@ + (void)fflush(stderr); + if (textsw_store_file(textsw, name_to_use, 0, 0) == 0) + goto Done; +- (void)sprintf(name_to_use, "/usr/tmp/textedit.%d", pid); ++ tmpdir = getenv("TMPDIR"); ++ if (tmpdir == NULL || tmpdir[0] == '\0') ++ tmpdir = "/tmp"; ++ (void)sprintf(name_to_use, "%s/textedit.%d",tmpdir , pid); + (void)fprintf(stderr, "failed!\nAttempting Store to %s ... ", name_to_use); + (void)fflush(stderr); + if (textsw_store_file(textsw, name_to_use, 0, 0) == 0)