|
|
|
| int | findPhrase (int index, char *filetext, int size, int isML, int isPS, int qType) |
| | Check for the presence of a phrase in a file by first searching for the search key provided. More...
|
| |
|
int | famOPENLDAP (char *filetext, int size, int isML, int isPS) |
| | Utility function to search for OpenLDAP licenses. So many different footprints are used by OpenLDAP, we had to either duplicate code in several places, or funnel it all into one function.
|
| |
| int | checkUnclassified (char *filetext, int size, int score, int isML, int isPS, int nw) |
| | This function is called when all the above license-checks don't turn up anything useful. Now we need to determine if the current file likely contains a license or not. More...
|
| |
|
int | checkPublicDomain (char *, int, int, int, int, int) |
| |
| static int | dbgIdxGrep (int licTextIdx, char *buf, int show) |
| | Debugging call for idxGrep() More...
|
| |
| void | checkCornerCases (char *filetext, int size, int score, int kwbm, int isML, int isPS, int nw, int force) |
| | If we call this function, we still don't know anything about a license. More...
|
| |
|
void | checkFileReferences (char *filetext, int size, int score, int kwbm, int isML, int isPS) |
| | Generic license-phrases referring to other files or running commands.
|
| |
|
void | addRef (char *str, int interest) |
| | This function fills in a character-buffer for a license of a CURRENT file being evaluated, and enqueues a list if components to help make a package-level summary.
|
| |
| void | locateRegex (char *text, item_t *op, int index, int size, int sso, int seo) |
| | Locate a regex in a given file. More...
|
| |
| void | saveRegexLocation (int index, int offset, int length, int saveCache) |
| | Save a regex in whereList. More...
|
| |
|
void | saveUnclBufLocation (int) |
| |
|
void | saveLicenseParagraph (char *, int, int, int) |
| |
| char * | cplVersion (char *filetext, int size, int isML, int isPS) |
| | Check for CPL versions. More...
|
| |
| static char * | gplVersion (char *filetext, int size, int isML, int isPS) |
| | Check for GPL versions. More...
|
| |
| char * | lgplVersion (char *filetext, int size, int isML, int isPS) |
| | Check for LGPL versions. More...
|
| |
| char * | agplVersion (char *filetext, int size, int isML, int isPS) |
| | Check for AGPL versions. More...
|
| |
| char * | gfdlVersion (char *filetext, int size, int isML, int isPS) |
| | Check for GFDL versions. More...
|
| |
| char * | lpplVersion (char *filetext, int size, int isML, int isPS) |
| | Check for LPPL versions. More...
|
| |
| char * | mplNplVersion (char *filetext, int size, int isML, int isPS) |
| | Check for MPL|NPL versions. More...
|
| |
| char * | pythonVersion (char *filetext, int size, int isML, int isPS) |
| | Check for python versions. More...
|
| |
| static char * | realVersion (char *filetext, int size, int isML, int isPS, int ref) |
| | Check for RPSL versions. More...
|
| |
| static char * | sisslVersion (char *filetext, int size, int isML, int isPS) |
| | Check for SISSL versions. More...
|
| |
| char * | aslVersion (char *filetext, int size, int isML, int isPS) |
| | Check for ASL Apache versions. More...
|
| |
| char * | cddlVersion (char *filetext, int size, int isML, int isPS) |
| | Check for CDDL versions. More...
|
| |
| char * | ccVersion (char *filetext, int size, int isML, int isPS) |
| | Check for CC_BY-X versions. More...
|
| |
| char * | oslVersion (char *filetext, int size, int isML, int isPS) |
| | Check for OSL versions. More...
|
| |
| char * | aflVersion (char *filetext, int size, int isML, int isPS) |
| | Check for AFL versions. More...
|
| |
|
static int | match3 (int, char *, int, int, int, int) |
| |
| void | spdxReference (char *, int, int, int) |
| |
| void | copyleftExceptions (char *, int, int, int) |
| |
|
These #define's save a LOT of typing and indentation... :)
|
|
#define | PARSE_ARGS filetext, size, isML, isPS |
| | Arguments to parse.
|
| |
|
#define | LVAL(x) (ltsr[x] & LTSR_RMASK) |
| | Check LTSR_RMASK on lstr[x].
|
| |
|
#define | SEEN(x) (ltsr[x] & LTSR_SMASK) |
| | Check LTSR_SMASK on lstr[x].
|
| |
|
#define | INFILE(x) fileHasPatt(x, PARSE_ARGS, 0) |
| | Calls fileHasPatt()
|
| |
|
#define | NOT_INFILE(x) !( fileHasPatt(x, PARSE_ARGS, 0) && clearLastElementOfLicenceBuffer() ) |
| | Calls fileHasPatt()
|
| |
|
#define | RM_INFILE(x) fileHasPatt(x, PARSE_ARGS, 1) |
| | Calls fileHasPatt() with qType 1.
|
| |
|
#define | GPL_INFILE(x) fileHasPatt(x, PARSE_ARGS, 2) |
| | Calls fileHasPatt() with qType 2.
|
| |
|
#define | PERL_INFILE(x) fileHasPatt(x, PARSE_ARGS, 3) |
| | Calls fileHasPatt() with qType 3.
|
| |
|
#define | NY_INFILE(x) fileHasPatt(x, PARSE_ARGS, 4) |
| | Calls fileHasPatt() with qType 4.
|
| |
|
#define | X_INFILE(x, y) fileHasPatt(x, PARSE_ARGS, y) |
| | Calls fileHasPatt() with qType y.
|
| |
|
#define | DEBUG_INFILE(x) printf(" Regex[%d] = \"%s\"\nINFILE(%d) = %d\n", x, _REGEX(x), x, INFILE(x)); |
| | Debug print.
|
| |
|
#define | HASREGEX(x, cp) idxGrep(x, cp, REG_ICASE|REG_EXTENDED) |
| | Calls idxGrep()
|
| |
|
#define | HASREGEX_RI(x, cp) idxGrep_recordIndex(x, cp, REG_ICASE|REG_EXTENDED) |
| | Calls idxGrep_recordIndex()
|
| |
|
#define | HASTEXT(x, fl) idxGrep_recordIndex(x, filetext, REG_ICASE|fl) |
| | Calls idxGrep_recordIndex()
|
| |
|
#define | URL_INFILE(x) (INFILE(x) || fileHasPatt(x, PARSE_ARGS, -1)) |
| | Check in file with qType 0|1.
|
| |
|
#define | CANSKIP(i, x, y, z) ((i >= y) && (i <= z) && !(kwbm & (1 << (x - _KW_first)))) |
| |
|
#define | HASKW(x, y) (x & (1 << (y - _KW_first))) |
| |
|
#define | TRYGROUP(x) x(PARSE_ARGS) |
| |
|
#define | LOWINTEREST(x) addRef(x, IL_LOW) |
| |
|
#define | MEDINTEREST(x) addRef(x, IL_MED) |
| |
|
#define | INTERESTING(x) addRef(x, IL_HIGH) |
| |
|
#define | ASLVERS() aslVersion(PARSE_ARGS) |
| |
|
#define | CCVERS() ccVersion(PARSE_ARGS) |
| |
|
#define | AFLVERS() aflVersion(PARSE_ARGS) |
| |
|
#define | OSLVERS() oslVersion(PARSE_ARGS) |
| |
|
#define | CPLVERS() cplVersion(PARSE_ARGS) |
| |
|
#define | GPLVERS() gplVersion(PARSE_ARGS) |
| |
|
#define | LGPLVERS() lgplVersion(PARSE_ARGS) |
| |
|
#define | AGPLVERS() agplVersion(PARSE_ARGS) |
| |
|
#define | GFDLVERS() gfdlVersion(PARSE_ARGS) |
| |
|
#define | CDDLVERS() cddlVersion(PARSE_ARGS) |
| |
|
#define | LPPLVERS() lpplVersion(PARSE_ARGS) |
| |
|
#define | MPLVERS() mplNplVersion(PARSE_ARGS) |
| |
|
#define | PYTHVERS() pythonVersion(PARSE_ARGS) |
| |
|
#define | SISSLVERS() sisslVersion(PARSE_ARGS) |
| |
|
#define | REALVERS(x) realVersion(PARSE_ARGS, x) |
| |
|
#define | PR_REGEX(x) printf("check %d = %s\n", x, _REGEX(x)); |
| |
|
#define | mCR_CMU() (INFILE(_CR_CMU_1) || INFILE(_CR_CMU_2)) |
| |
|
#define | mCR_EDIN() (INFILE(_CR_EDINBURGH_1) || INFILE(_CR_EDINBURGH_2)) |
| |
|
#define | mCR_FSF() (INFILE(_CR_FSF1) || INFILE(_CR_FSF2)) |
| |
|
#define | mCR_HP() (INFILE(_CR_HP_1)|| INFILE(_CR_HP_2) || INFILE(_CR_DEC) || INFILE(_CR_EDS)) |
| |
|
#define | mCR_IETF() (INFILE(_CR_IETF_1) || INFILE(_CR_IETF_2)) |
| |
|
#define | mCR_MIT() (INFILE(_CR_MIT1) || INFILE(_CR_MIT2)) |
| |
|
#define | mCR_X11() (INFILE(_CR_X11) || INFILE(_CR_XFREE86)) |
| |
|
#define | mCR_IPTC() (INFILE(_CR_IPTC1) || INFILE(_CR_IPTC2)) |
| |
|
#define | SPDXREF() spdxReference(PARSE_ARGS) |
| |
|
#define | EXCEPTIONS() copyleftExceptions(PARSE_ARGS) |
| |
| static int | fileHasPatt (int licTextIdx, char *filetext, int size, int isML, int isPS, int qType) |
| | Checks for a phrase in a file. More...
|
| |
| char * | parseLicenses (char *filetext, int size, scanres_t *scp, int isML, int isPS) |
| | Parse a file to check all the possible licenses and add them to matches. More...
|
| |
searches for licenses
The main workhorse of nomos. This file contains most of the logic for finding licenses in nomos.
Definition in file parse.c.