27 using namespace basis;
35 #define LOG(s) program_wide_logger::get().log((s), 0)
38 #define DEFAULT_FORTUNE_FILE "fortunes.dat"
40 int main(
int argc,
char *argv[])
57 if (
name.length() < 5) {
63 int end = index_file_name.
raw().
end();
74 LOG(
astring(
"index file is ") + index_file_name);
76 index = index_file_name;
83 #ifdef __BUILD_STATIC_APPLICATION__
Provides a dynamically resizable ASCII character string.
virtual void zap(int start, int end)
Deletes the characters between "start" and "end" inclusively.
int end() const
returns the index of the last (non-null) character in the string.
static astring TMP()
provides a single place to get the temporary directory.
static astring get(const astring &variable_name)
looks up the "variable_name" in the current environment variables.
Provides operations commonly needed on file names.
basis::astring extension() const
returns the extension for the file, if one is present.
const basis::astring & raw() const
returns the astring that we're holding onto for the path.
filename basename() const
returns the base of the filename; no directory.
#define SETUP_CONSOLE_LOGGER
< a macro that retasks the program-wide logger as a console_logger.
The guards collection helps in testing preconditions and reporting errors.
str extension(str pathname)
A platform independent way to obtain the timestamp of a file.
A logger that sends to the console screen using the standard output device.
int main(int argc, char *argv[])
#define LOG(s)
HOOPLE_STARTUP_CODE;.
#define DEFAULT_FORTUNE_FILE