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
13typedef struct {
15 const char *name;
16
18 const char *url;
19
21 const char *nice_name;
22
24 const char *re;
25
28
33 const char *exclude_re;
34
37
39 pcre *regexp;
40
43
44} License;
45
50typedef struct LicenseListItem {
53
56
62
68
70
76typedef struct {
78 const char *language;
79
81 int code;
82
85
87 int blanks;
88
91
92} Loc;
93
99typedef struct LocListItem {
102
105
111
117
119
125typedef struct {
127 const char *language;
128
131
134
137
140
143
146
147} LocDelta;
148
154typedef struct LocDeltaListItem {
157
160
166
172
174
179typedef struct {
181 const char *name;
182
185
187 char *code;
188
190 char *code_p;
191
194
196 char *comments;
197
200
203
206
208
216
219
225
231
233
238typedef struct {
240 char *filepath;
241
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
307 char **filenames;
308
309} SourceFile;
310
315typedef struct SourceFileListItem {
318
321
327
333
335
336#endif
Holds a list of Licenses in a linked list.
Definition: structs.h:50
struct LicenseListItem * head
Definition: structs.h:61
struct LicenseListItem * next
Definition: structs.h:55
License * lic
Definition: structs.h:52
struct LicenseListItem * tail
Definition: structs.h:67
Holds a license and its associated details and patterns.
Definition: structs.h:13
const char * exclude_re
Definition: structs.h:33
pcre * regexp
Definition: structs.h:39
const char * url
Definition: structs.h:18
int exclude_re_flags
Definition: structs.h:36
int re_flags
Definition: structs.h:27
const char * nice_name
Definition: structs.h:21
const char * name
Definition: structs.h:15
pcre * exclude_regexp
Definition: structs.h:42
const char * re
Definition: structs.h:24
Tracks changes in lines of code, comments, and blank lines for multiple languages using a linked list...
Definition: structs.h:154
struct LocDeltaListItem * next
Definition: structs.h:159
LocDelta * delta
Definition: structs.h:156
struct LocDeltaListItem * head
Definition: structs.h:165
struct LocDeltaListItem * tail
Definition: structs.h:171
Tracks changes in lines of code, comments, and blank lines for a single language.
Definition: structs.h:125
int code_removed
Definition: structs.h:133
int comments_added
Definition: structs.h:136
int blanks_removed
Definition: structs.h:145
int code_added
Definition: structs.h:130
int blanks_added
Definition: structs.h:142
int comments_removed
Definition: structs.h:139
const char * language
Definition: structs.h:127
Tracks total lines of code, comments, and blanks for multiple languages using a linked list.
Definition: structs.h:99
struct LocListItem * head
Definition: structs.h:110
Loc * loc
Definition: structs.h:101
struct LocListItem * next
Definition: structs.h:104
struct LocListItem * tail
Definition: structs.h:116
Tracks total lines of code, comments, and blanks for a single language.
Definition: structs.h:76
int comments
Definition: structs.h:84
const char * language
Definition: structs.h:78
int filecount
Definition: structs.h:90
int code
Definition: structs.h:81
int blanks
Definition: structs.h:87
Holds a set of ParsedLanguages in a linked list.
Definition: structs.h:213
struct ParsedLanguageListItem * next
Definition: structs.h:218
ParsedLanguage * pl
Definition: structs.h:215
struct ParsedLanguageListItem * tail
Definition: structs.h:230
struct ParsedLanguageListItem * head
Definition: structs.h:224
Represents a single language parsed from a SourceFile.
Definition: structs.h:179
char * code
Definition: structs.h:187
char * code_p
Definition: structs.h:190
char * comments_p
Definition: structs.h:199
int comments_count
Definition: structs.h:202
int buffer_size
Definition: structs.h:184
char * comments
Definition: structs.h:196
const char * name
Definition: structs.h:181
int blanks_count
Definition: structs.h:205
int code_count
Definition: structs.h:193
Contains a set of SourceFiles.
Definition: structs.h:315
SourceFile * sf
Definition: structs.h:317
struct SourceFileListItem * next
Definition: structs.h:320
struct SourceFileListItem * head
Definition: structs.h:326
struct SourceFileListItem * tail
Definition: structs.h:332
Represents a single source code file.
Definition: structs.h:238
int language_detected
Definition: structs.h:285
LicenseList * license_list
Definition: structs.h:298
LocList * loc_list
Definition: structs.h:304
char * filename
Definition: structs.h:249
int dirpath
Definition: structs.h:246
const char * language
Definition: structs.h:279
char ** filenames
Definition: structs.h:307
char * filepath
Definition: structs.h:240
char * ext
Definition: structs.h:252
char * diskpath
Definition: structs.h:258
char * contents
Definition: structs.h:267
int size
Definition: structs.h:273
ParsedLanguageList * parsed_language_list
Definition: structs.h:292
struct LocDeltaListItem LocDeltaList
struct SourceFileListItem SourceFileList
struct LicenseListItem LicenseList
struct ParsedLanguageListItem ParsedLanguageList
struct LocListItem LocList