]> git.ozlabs.org Git - ccan/blob - tools/ccanlint/licenses.h
7b70bfac2109f2279c417738b49a1b3463abdd53
[ccan] / tools / ccanlint / licenses.h
1 #ifndef CCANLINT_LICENSES_H
2 #define CCANLINT_LICENSES_H
3 #include <stdbool.h>
4
5 enum license {
6         LICENSE_LGPLv2_PLUS,
7         LICENSE_LGPLv2,
8         LICENSE_LGPLv3,
9         LICENSE_LGPL,
10         LICENSE_GPLv2_PLUS,
11         LICENSE_GPLv2,
12         LICENSE_GPLv3,
13         LICENSE_GPL,
14         LICENSE_BSD,
15         LICENSE_MIT,
16         LICENSE_PUBLIC_DOMAIN,
17         LICENSE_UNKNOWN
18 };
19
20 #define NUM_CLAUSES 3
21
22 struct license_info {
23         const char *name;
24         const char *shortname;
25         /* Edit distance is expensive, and this works quite well. */
26         const char *clause[NUM_CLAUSES];
27 };
28
29 extern const struct license_info licenses[];
30
31 struct ccan_file;
32 bool find_boilerplate(struct ccan_file *f, enum license license);
33
34 #endif /* CCANLINT_LICENSES_H */