From 37ad39ce5ecf7ffeb3c43e45c817b78fa8410fba Mon Sep 17 00:00:00 2001 From: marcus Date: Sat, 21 Jun 2003 16:20:43 +0000 Subject: Add a patch forgotten in the 0.3.1 update. Reported by: maintainer Big pointy hat to: me --- editors/beaver/files/patch-src-search.c | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 editors/beaver/files/patch-src-search.c diff --git a/editors/beaver/files/patch-src-search.c b/editors/beaver/files/patch-src-search.c new file mode 100644 index 000000000000..55c613b2e9b6 --- /dev/null +++ b/editors/beaver/files/patch-src-search.c @@ -0,0 +1,51 @@ +--- src/search.c.orig Tue Jun 17 16:18:40 2003 ++++ src/search.c Tue Jun 17 16:25:24 2003 +@@ -31,7 +31,7 @@ + #include + #include + #include +-#include ++#include + #include "tools.h" + #include "editor.h" + #include "struct.h" +@@ -375,7 +375,7 @@ + static gchar **get_files_for_search (const gchar *directory, const gchar *regexp, gint pre) + { + gchar **answer; +- wordexp_t word; ++ glob_t word; + + START_FCN + +@@ -387,8 +387,8 @@ + */ + chdir (directory); + +- word.we_offs = pre; +- if (wordexp (regexp, &word, WRDE_DOOFFS)) ++ word.gl_offs = pre; ++ if (glob (regexp, GLOB_DOOFFS, NULL, &word)) + { + gint i; + +@@ -408,15 +408,15 @@ + + /* fill out our array with results */ + answer = g_malloc (sizeof (gchar *) * +- (word.we_wordc + word.we_offs + 1)); +- for (i = word.we_offs; i < word.we_offs + word.we_wordc; i++) ++ (word.gl_pathc + word.gl_offs + 1)); ++ for (i = word.gl_offs; i < word.gl_offs + word.gl_pathc; i++) + { +- answer[i] = g_strdup (word.we_wordv[i]); ++ answer[i] = g_strdup (word.gl_pathv[i]); + } + answer[i] = NULL; + } + +- wordfree (&word); ++ globfree (&word); + + END_FCN + return answer; -- cgit