From 67eb4c6c804c728db329a7f4a77d5a3cbd1b993c Mon Sep 17 00:00:00 2001 From: John Denker Date: Sun, 29 Jul 2012 21:55:41 -0700 Subject: get40 seems to be working --- tools/libltgrey.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'tools/libltgrey.h') diff --git a/tools/libltgrey.h b/tools/libltgrey.h index 6f516b4..1724d53 100644 --- a/tools/libltgrey.h +++ b/tools/libltgrey.h @@ -1,18 +1,31 @@ #include #include /* for gettimeofday(), timeval */ #include +#include + +#define state_40_macro \ +foo(unseen) \ +foo(young) \ +foo(ripe) \ +foo(spoiled) \ +foo(fail) + +// expand the codes to make some names: +#define foo(name) name, +typedef enum { + state_40_macro +} state_40; +#undef foo class whatsit{ public: std::string parent_dir; std::string progname; pid_t mypid; - timeval now; - int mod_age; - int ac_age; std::string suffix; std::string progid; int verbosity; + std::map decode_40; whatsit(const std::string name, const std::string _parent_dir); int doit(const int penalty, const int stain); @@ -26,4 +39,5 @@ public: std::vector &checked); void dump(const std::string var); int maybe_mkdir(const std::string somedir, const std::string msg); + state_40 get40(const std::string mid); }; -- cgit v1.2.3