diff options
Diffstat (limited to 'editors/tea/files')
-rw-r--r-- | editors/tea/files/patch-src::callbacks.c | 34 | ||||
-rw-r--r-- | editors/tea/files/patch-src::tea_text_document.c | 25 |
2 files changed, 59 insertions, 0 deletions
diff --git a/editors/tea/files/patch-src::callbacks.c b/editors/tea/files/patch-src::callbacks.c new file mode 100644 index 000000000000..a34974dedc14 --- /dev/null +++ b/editors/tea/files/patch-src::callbacks.c @@ -0,0 +1,34 @@ +--- src/callbacks.c.orig Tue Jul 13 17:01:57 2004 ++++ src/callbacks.c Tue Jul 13 17:05:25 2004 +@@ -24,6 +24,7 @@ + #include <gdk/gdk.h> + #include <gdk/gdkkeysyms.h> + ++#include <sys/param.h> + #include <errno.h> + #include <sys/stat.h> + #include <glib.h> +@@ -1065,9 +1066,10 @@ + + if (get_page_fnav ()) + { ++ char buf[MAXPATHLEN]; + gchar *fn = (gchar*) g_malloc (2048); + +- if (realpath ((gchar *) get_current_dir_name (), fn)) ++ if (getcwd(buf, sizeof(buf)) && realpath (buf, fn)) + set_fam_text (fn); + else + set_fam_text ("/"); +@@ -3005,9 +3007,10 @@ + + if (get_page_fnav ()) + { ++ char buf[MAXPATHLEN]; + gchar *fn = (gchar*) g_malloc (2048); + +- if (realpath ((gchar *) get_current_dir_name (), fn)) ++ if (getcwd(buf, sizeof(buf)) && realpath (buf, fn)) + set_fam_text (fn); + else + set_fam_text ("/"); diff --git a/editors/tea/files/patch-src::tea_text_document.c b/editors/tea/files/patch-src::tea_text_document.c new file mode 100644 index 000000000000..1a263835505b --- /dev/null +++ b/editors/tea/files/patch-src::tea_text_document.c @@ -0,0 +1,25 @@ +--- src/tea_text_document.c.orig Tue Jul 13 17:05:42 2004 ++++ src/tea_text_document.c Tue Jul 13 17:11:39 2004 +@@ -36,6 +36,7 @@ + #include <stdio.h> + #include <strings.h> + #include <unistd.h> ++#include <sys/param.h> + + #include "tea_file_nav.h" + #include "tea_text_document.h" +@@ -1289,12 +1290,13 @@ + + t_note_page* page_create_new_filenav (void) + { ++ char buf[MAXPATHLEN]; + t_note_page *page = (t_note_page *) g_malloc (sizeof (t_note_page)); + + page->hash_filelist = NULL; + gchar *fn = (gchar*) g_malloc (2048); + +- if (realpath ((gchar *) get_current_dir_name (), fn)) ++ if (getcwd(buf, sizeof(buf)) && realpath (buf, fn)) + page->current_path = fn; + + page->type = 1; |