aboutsummaryrefslogtreecommitdiff
path: root/dw/findtext.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2024-08-06 14:15:07 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2024-08-07 16:50:56 +0200
commitf1b04c40ba9faf9b7b8969cf3686c35bb7b79b33 (patch)
tree9e37bde60e1aa7ee17bcd00fe77e5c48151ff224 /dw/findtext.cc
parent83e88446c99f793f696984904e47070a287fd15d (diff)
Use dStrdup instead of strdup
The strdup function is not available in POSIX-2001, so we use our own implementation in dlib: dStrdup. Reviewed-by: dogma
Diffstat (limited to 'dw/findtext.cc')
-rw-r--r--dw/findtext.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/dw/findtext.cc b/dw/findtext.cc
index 94b963ea..0a4d25c5 100644
--- a/dw/findtext.cc
+++ b/dw/findtext.cc
@@ -20,6 +20,7 @@
#include "core.hh"
+#include "dlib/dlib.h"
#include "../lout/debug.hh"
#include "../lout/msg.h"
@@ -87,7 +88,7 @@ FindtextState::Result FindtextState::search (const char *key, bool caseSens,
newKey = true;
if (this->key)
free(this->key);
- this->key = strdup (key);
+ this->key = dStrdup (key);
this->caseSens = caseSens;
if (nexttab)