Lev Walkin | c6cac8e | 2016-03-14 02:57:07 -0700 | [diff] [blame] | 1 | #ifndef ASN1C_FDEPS_H |
| 2 | #define ASN1C_FDEPS_H |
Lev Walkin | acd9f8b | 2004-08-19 13:29:03 +0000 | [diff] [blame] | 3 | |
| 4 | typedef struct asn1c_fdeps_s { |
| 5 | char *filename; /* Or 0, if root. */ |
| 6 | |
Lev Walkin | f218e78 | 2006-09-12 06:21:18 +0000 | [diff] [blame] | 7 | enum fdep_usage { |
| 8 | FDEP_IGNORE = -1, /* Ignore contents of the section */ |
| 9 | FDEP_NOTUSED = 0, |
| 10 | FDEP_REFERRED = 1, /* Dynamic list of dependencies */ |
| 11 | FDEP_CONVERTER = 2, /* Name of the int main() file */ |
| 12 | FDEP_COMMON_FILES = 3, /* Section for mandatory dependencies */ |
Lev Walkin | f573ebb | 2017-07-24 00:25:51 +0400 | [diff] [blame] | 13 | FDEP_CODEC_OER = 4, /* Use contents only if -gen-OER */ |
| 14 | FDEP_CODEC_PER = 8, /* Use contents only if -gen-PER */ |
Lev Walkin | f218e78 | 2006-09-12 06:21:18 +0000 | [diff] [blame] | 15 | } usage; /* Some file refers to it */ |
Lev Walkin | acd9f8b | 2004-08-19 13:29:03 +0000 | [diff] [blame] | 16 | |
| 17 | struct asn1c_fdeps_s **elements; |
| 18 | int el_size; |
| 19 | int el_count; |
| 20 | } asn1c_fdeps_t; |
| 21 | |
| 22 | asn1c_fdeps_t *asn1c_read_file_dependencies(arg_t *arg, const char *datadir); |
| 23 | |
| 24 | /* Data may be a filename or an "#include <>" string. */ |
| 25 | int asn1c_activate_dependency(asn1c_fdeps_t *deps, asn1c_fdeps_t *cur, |
| 26 | const char *data); |
| 27 | |
| 28 | asn1c_fdeps_t *asn1c_deps_makelist(asn1c_fdeps_t *deps); |
Bi-Ruei, Chiu | 6f34894 | 2016-11-08 15:41:23 +0800 | [diff] [blame] | 29 | void asn1c_deps_freelist(asn1c_fdeps_t *deps); |
Lev Walkin | acd9f8b | 2004-08-19 13:29:03 +0000 | [diff] [blame] | 30 | |
Lev Walkin | c6cac8e | 2016-03-14 02:57:07 -0700 | [diff] [blame] | 31 | #endif /* ASN1C_FDEPS_H */ |