00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <basis/istring.h>
00020 #include <opsystem/byte_filer.h>
00021 #include <data_struct/static_memory_gremlin.h>
00022
00023 #include <fcntl.h>
00024 #include <stdio.h>
00025 #include <string.h>
00026
00027 HOOPLE_STARTUP_CODE;
00028
00029 int main(int argc, char *argv[])
00030 {
00031 if (argc < 2) {
00032 printf("%s: needs a file as a parameter\n", argv[0]);
00033 return 1;
00034 } else if (argc > 2) {
00035 printf("%s: only one parameter", argv[0]);
00036 return 1;
00037 } else if (strcmp(argv[1], "-?")==0 || strcmp(argv[1], "/?")==0) {
00038 printf("%s: takes a filename as input and returns\n0 if it is empty, 2 "
00039 "if it is not empty, and 1 for errors\n", argv[0]);
00040 return 1;
00041 } else {
00042 byte_filer emp(argv[1], "r+");
00043 emp.seek(0, byte_filer::FROM_END);
00044 if (!emp.tell()) return 0;
00045 else return 2;
00046 }
00047
00048 return 1;
00049 }
00050
00051 #ifdef __BUILD_STATIC_APPLICATION__
00052
00053 #include <basis/array.cpp>
00054 #include <basis/byte_array.cpp>
00055 #include <basis/callstack_tracker.cpp>
00056 #include <basis/chaos.cpp>
00057 #include <basis/convert_utf.cpp>
00058 #include <basis/definitions.cpp>
00059 #include <basis/earth_time.cpp>
00060 #include <basis/guards.cpp>
00061 #include <basis/istring.cpp>
00062 #include <basis/log_base.cpp>
00063 #include <basis/memory_checker.cpp>
00064 #include <basis/mutex.cpp>
00065 #include <basis/object_base.cpp>
00066 #include <basis/outcome.cpp>
00067 #include <basis/packable.cpp>
00068 #include <basis/portable.cpp>
00069 #include <basis/sequence.cpp>
00070 #include <basis/set.cpp>
00071 #include <basis/utility.cpp>
00072 #include <basis/version_record.cpp>
00073 #include <data_struct/amorph.cpp>
00074 #include <data_struct/bit_vector.cpp>
00075 #include <data_struct/byte_hasher.cpp>
00076 #include <data_struct/configurator.cpp>
00077 #include <data_struct/hash_table.cpp>
00078 #include <data_struct/pointer_hash.cpp>
00079 #include <data_struct/stack.cpp>
00080 #include <data_struct/static_memory_gremlin.cpp>
00081 #include <data_struct/string_hash.cpp>
00082 #include <data_struct/string_hasher.cpp>
00083 #include <data_struct/string_table.cpp>
00084 #include <data_struct/symbol_table.cpp>
00085 #include <data_struct/table_configurator.cpp>
00086 #include <loggers/console_logger.cpp>
00087 #include <loggers/file_logger.cpp>
00088 #include <loggers/locked_logger.cpp>
00089 #include <loggers/null_logger.cpp>
00090 #include <loggers/program_wide_logger.cpp>
00091 #include <opsystem/byte_filer.cpp>
00092 #include <opsystem/command_line.cpp>
00093 #include <opsystem/critical_events.cpp>
00094 #include <opsystem/directory.cpp>
00095 #include <opsystem/filename.cpp>
00096 #include <opsystem/ini_config.cpp>
00097 #include <opsystem/ini_parser.cpp>
00098 #include <opsystem/path_configuration.cpp>
00099 #include <opsystem/rendezvous.cpp>
00100 #include <textual/byte_format.cpp>
00101 #include <textual/parser_bits.cpp>
00102 #include <textual/string_manipulation.cpp>
00103 #include <textual/tokenizer.cpp>
00104 #endif // __BUILD_STATIC_APPLICATION__
00105