From d2564d25e802d1ee3230cf045c4940e836b5c6a2 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 29 Jul 2012 16:50:11 -0700 Subject: split ltgrey (and libltgrey) off from greylist; put some utility functions into their own file. --- tools/utils.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tools/utils.h (limited to 'tools/utils.h') diff --git a/tools/utils.h b/tools/utils.h new file mode 100644 index 0000000..450db85 --- /dev/null +++ b/tools/utils.h @@ -0,0 +1,3 @@ +std::string basename(const std::string path); +int prefix(const std::string shorter, const std::string longer); +std::string time_out(const int _ttt); -- cgit v1.2.3 From 63be414b62f3234ad80607b95e8e71e33bfd8025 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 29 Jul 2012 17:00:15 -0700 Subject: move more stuff to utils.c ... I hate duplication of code --- tools/utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/utils.h') diff --git a/tools/utils.h b/tools/utils.h index 450db85..ec467c6 100644 --- a/tools/utils.h +++ b/tools/utils.h @@ -1,3 +1,6 @@ std::string basename(const std::string path); int prefix(const std::string shorter, const std::string longer); std::string time_out(const int _ttt); + +std::string toLower(const std::string a); +std::string ltrim(const std::string a); -- cgit v1.2.3 From f8be4baf5a2318363b42f8883f66ed8a976dfc79 Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 29 Jul 2012 23:26:28 -0700 Subject: scan40 appears to be working, much cleaner than last week's version --- tools/utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/utils.h') diff --git a/tools/utils.h b/tools/utils.h index ec467c6..cbcb795 100644 --- a/tools/utils.h +++ b/tools/utils.h @@ -4,3 +4,4 @@ std::string time_out(const int _ttt); std::string toLower(const std::string a); std::string ltrim(const std::string a); +std::string purify(const std::string arg); -- cgit v1.2.3