summaryrefslogtreecommitdiff
path: root/plugins/gtkui
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gtkui')
-rw-r--r--plugins/gtkui/hotkeys.c11
-rw-r--r--plugins/gtkui/widgets.c10
2 files changed, 2 insertions, 19 deletions
diff --git a/plugins/gtkui/hotkeys.c b/plugins/gtkui/hotkeys.c
index 4b7ac034..a34fb629 100644
--- a/plugins/gtkui/hotkeys.c
+++ b/plugins/gtkui/hotkeys.c
@@ -61,16 +61,7 @@ typedef struct
#include <X11/Xlib.h> // only for the KeySym type
#endif
#include "hotkeys.h"
-
-#ifndef strdupa
-# define strdupa(s) \
- ({ \
- const char *old = (s); \
- size_t len = strlen (old) + 1; \
- char *new = (char *) alloca (len); \
- (char *) memcpy (new, old, len); \
- })
-#endif
+#include "../../strdupa.h"
void
on_hotkeys_actions_cursor_changed (GtkTreeView *treeview,
diff --git a/plugins/gtkui/widgets.c b/plugins/gtkui/widgets.c
index 7318d894..e15fa0a4 100644
--- a/plugins/gtkui/widgets.c
+++ b/plugins/gtkui/widgets.c
@@ -37,19 +37,11 @@
#endif
#include "namedicons.h"
#include "hotkeys.h" // for building action treeview
+#include "../../strdupa.h"
#define min(x,y) ((x)<(y)?(x):(y))
#define max(x,y) ((x)>(y)?(x):(y))
-#ifndef strdupa
-# define strdupa(s) \
- ({ \
- const char *old = (s); \
- size_t len = strlen (old) + 1; \
- char *new = (char *) alloca (len); \
- (char *) memcpy (new, old, len); \
- })
-#endif
// utility code for parsing keyvalues
#define get_keyvalue(s,key,val) {\