Niotso  git revision 558726a9f13d7c3423a683dd2f4323589b66c310
The New Implementation of The Sims Online
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
tsoscan.h
Go to the documentation of this file.
1 /*
2  tsoscan - IFF statistical webpage generator
3  tsoscan.h - Copyright (c) 2012 Niotso Project <http://niotso.org/>
4  Author(s): Ahmed El-Mahdawy <aa.mahdawy.10@gmail.com>
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 
19 #include <stdint.h>
20 
21 #define TSOSCAN_WARNING "tsoscan: warning: "
22 #define TSOSCAN_ERROR "tsoscan: error: "
23 #ifdef _WIN32
24  #define PATH_SEP '\\'
25 #else
26  #define PATH_SEP '/'
27 #endif
28 
29 typedef struct CommandLineArgs_s
30 {
32  char * OutFile;
33  unsigned InDirCount;
34  char ** InDirs;
36 
37 typedef struct VersionInfo_s
38 {
39  unsigned Version;
40  unsigned Count;
41 } VersionInfo;
42 
43 typedef struct ChunkStats_s
44 {
45  char Type[5];
46  unsigned ChunkCount;
47  unsigned VersionCount;
49 } ChunkStats;
50 
51 typedef struct IFFStats_s
52 {
53  unsigned FileCount;
55  unsigned ChunkTypeCount;
57 } IFFStats;
58 
59 CommandLineArgs* cmd_parse_args(int argc, char *argv[]);
60 void cmd_delete(CommandLineArgs *args);
61 
62 int stats_create(IFFStats *stats);
63 int stats_version_increment(IFFStats *stats, char *type, unsigned version);
64 unsigned stats_get_version(char *type, uint8_t *data);
65 void stats_delete(IFFStats *stats);