summaryrefslogtreecommitdiff
path: root/tools/libltgrey.h
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-30 04:55:41 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-30 04:55:41 (GMT)
commit67eb4c6c804c728db329a7f4a77d5a3cbd1b993c (patch)
tree1d28e818ca5ae77ab586267b2e90f8b74fb398c0 /tools/libltgrey.h
parent292a76b35fd16cf11613f79ea38693449e3317f6 (diff)
get40 seems to be working
Diffstat (limited to 'tools/libltgrey.h')
-rw-r--r--tools/libltgrey.h20
1 files changed, 17 insertions, 3 deletions
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 <string>
#include <sys/time.h> /* for gettimeofday(), timeval */
#include <vector>
+#include <map>
+
+#define state_40_macro \
+foo(unseen) \
+foo(young) \
+foo(ripe) \
+foo(spoiled) \
+foo(fail)
+
+// expand the codes to make some <const int> 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<state_40,std::string> 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<std::string> &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);
};