summaryrefslogtreecommitdiff
path: root/tools/libltgrey.h
diff options
context:
space:
mode:
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);
};