ohcount
structs.h
Go to the documentation of this file.
1 // structs.h written by Mitchell Foral. mitchell<att>caladbolg.net.
2 // See COPYING for license information.
3 
4 #ifndef OHCOUNT_STRUCTS_H
5 #define OHCOUNT_STRUCTS_H
6 
7 #include <pcre.h>
8 
13 typedef struct {
15  const char *name;
16 
18  const char *url;
19 
21  const char *nice_name;
22 
24  const char *re;
25 
27  int re_flags;
28 
33  const char *exclude_re;
34 
37 
39  pcre *regexp;
40 
43 
44 } License;
45 
50 typedef struct LicenseListItem {
53 
56 
62 
68 
69 } LicenseList;
70 
76 typedef struct {
78  const char *language;
79 
81  int code;
82 
84  int comments;
85 
87  int blanks;
88 
90  int filecount;
91 
92 } Loc;
93 
99 typedef struct LocListItem {
102 
104  struct LocListItem *next;
105 
110  struct LocListItem *head;
111 
116  struct LocListItem *tail;
117 
118 } LocList;
119 
125 typedef struct {
127  const char *language;
128 
131 
134 
137 
140 
143 
146 
147 } LocDelta;
148 
154 typedef struct LocDeltaListItem {
157 
160 
166 
172 
173 } LocDeltaList;
174 
179 typedef struct {
181  const char *name;
182 
185 
187  char *code;
188 
190  char *code_p;
191 
194 
196  char *comments;
197 
199  char *comments_p;
200 
203 
206 
208 
213 typedef struct ParsedLanguageListItem {
216 
219 
225 
231 
233 
238 typedef struct {
240  char *filepath;
241 
246  int dirpath;
247 
249  char *filename;
250 
252  char *ext;
253 
258  char *diskpath;
259 
260  // The following fields should not be accessed directly. Their accessor
261  // functions should be used instead as labeled.
262 
267  char *contents;
268 
273  int size;
274 
279  const char *language;
280 
286 
293 
299 
305 
310  char **filenames;
311 
312 } SourceFile;
313 
318 typedef struct SourceFileListItem {
321 
324 
330 
336 
338 
339 #endif