ohcount: /Users/andy/dev/ohcount/src/structs.h Source File

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# /Users/andy/dev/ohcount/src/structs.h

Go to the documentation of this file.

    00001 // structs.h written by Mitchell Foral. mitchell<att>caladbolg.net.
    00002 // See COPYING for license information.
    00003
    00004 #ifndef OHCOUNT_STRUCTS_H
    00005 #define OHCOUNT_STRUCTS_H
    00006
    00007 #include <pcre.h>
    00008
    00013 typedef struct {
    00015   const char *name;
    00016
    00018   const char *url;
    00019
    00021   const char *nice_name;
    00022
    00024   const char *re;
    00025
    00027   int re_flags;
    00028
    00033   const char *exclude_re;
    00034
    00036   int exclude_re_flags;
    00037
    00039   pcre *regexp;
    00040
    00042   pcre *exclude_regexp;
    00043
    00044 } License;
    00045
    00050 typedef struct LicenseListItem {
    00052   License *lic;
    00053
    00055   struct LicenseListItem *next;
    00056
    00061   struct LicenseListItem *head;
    00062
    00067   struct LicenseListItem *tail;
    00068
    00069 } LicenseList;
    00070
    00076 typedef struct {
    00078   const char *language;
    00079
    00081   int code;
    00082
    00084   int comments;
    00085
    00087   int blanks;
    00088
    00090   int filecount;
    00091
    00092 } Loc;
    00093
    00099 typedef struct LocListItem {
    00101   Loc *loc;
    00102
    00104   struct LocListItem *next;
    00105
    00110   struct LocListItem *head;
    00111
    00116   struct LocListItem *tail;
    00117
    00118 } LocList;
    00119
    00125 typedef struct {
    00127   const char *language;
    00128
    00130   int code_added;
    00131
    00133   int code_removed;
    00134
    00136   int comments_added;
    00137
    00139   int comments_removed;
    00140
    00142   int blanks_added;
    00143
    00145   int blanks_removed;
    00146
    00147 } LocDelta;
    00148
    00154 typedef struct LocDeltaListItem {
    00156   LocDelta *delta;
    00157
    00159   struct LocDeltaListItem *next;
    00160
    00165   struct LocDeltaListItem *head;
    00166
    00171   struct LocDeltaListItem *tail;
    00172
    00173 } LocDeltaList;
    00174
    00179 typedef struct {
    00181   const char *name;
    00182
    00184   int buffer_size;
    00185
    00187   char *code;
    00188
    00190   char *code_p;
    00191
    00193   int code_count;
    00194
    00196   char *comments;
    00197
    00199   char *comments_p;
    00200
    00202   int comments_count;
    00203
    00205   int blanks_count;
    00206
    00207 } ParsedLanguage;
    00208
    00213 typedef struct ParsedLanguageListItem {
    00215   ParsedLanguage *pl;
    00216
    00218   struct ParsedLanguageListItem *next;
    00219
    00224   struct ParsedLanguageListItem *head;
    00225
    00230   struct ParsedLanguageListItem *tail;
    00231
    00232 } ParsedLanguageList;
    00233
    00238 typedef struct {
    00240   char *filepath;
    00241
    00246   int dirpath;
    00247
    00249   char *filename;
    00250
    00252   char *ext;
    00253
    00258   char *diskpath;
    00259
    00260   // The following fields should not be accessed directly. Their accessor
    00261   // functions should be used instead as labeled.
    00262
    00267   char *contents;
    00268
    00273   int size;
    00274
    00279   const char *language;
    00280
    00285   int language_detected;
    00286
    00292   ParsedLanguageList *parsed_language_list;
    00293
    00298   LicenseList *license_list;
    00299
    00304   LocList *loc_list;
    00305
    00310   char **filenames;
    00311
    00312 } SourceFile;
    00313
    00318 typedef struct SourceFileListItem {
    00320   SourceFile *sf;
    00321
    00323   struct SourceFileListItem *next;
    00324
    00329   struct SourceFileListItem *head;
    00330
    00335   struct SourceFileListItem *tail;
    00336
    00337 } SourceFileList;
    00338
    00339 #endif