geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include "general.h"
#include "args_p.h"
#include "field.h"
#include "fmt_p.h"
#include "options.h"
#include "parse.h"
#include "strlist.h"
#include "vstring.h"
Go to the source code of this file.
Classes | |
struct | sCookedArgs |
struct | sOptionValues |
Macros | |
#define | CONST_OPTION const |
#define | includeExtensionFlags() (Option.tagFileFormat > 1) |
Typedefs | |
typedef struct sCookedArgs | cookedArgs |
typedef enum eLocate | exCmd |
typedef enum sortType | sortType |
typedef enum eTagRelative | tagRelative |
typedef enum eOptionLoadingStage | OptionLoadingStage |
typedef struct sOptionValues | optionValues |
typedef void(* | mainLoopFunc) (cookedArgs *args, void *data) |
Enumerations | |
enum | optionType { OPTION_NONE , OPTION_SHORT , OPTION_LONG } |
enum | eLocate { EX_MIX , EX_LINENUM , EX_PATTERN , EX_COMBINE } |
enum | sortType { SO_UNSORTED , SO_SORTED , SO_FOLDSORTED } |
enum | eTagRelative { TREL_NO , TREL_YES , TREL_ALWAYS , TREL_NEVER } |
enum | eOptionLoadingStage { OptionLoadingStageNone , OptionLoadingStageCustom , OptionLoadingStageDosCnf , OptionLoadingStageEtc , OptionLoadingStageLocalEtc , OptionLoadingStageXdg , OptionLoadingStageHomeRecursive , OptionLoadingStageCurrentRecursive , OptionLoadingStagePreload , OptionLoadingStageEnvVar , OptionLoadingStageCmdline } |
Functions | |
void | freeList (stringList **const pString) |
void | setDefaultTagFileName (void) |
void | checkOptions (void) |
bool | filesRequired (void) |
void | testEtagsInvocation (void) |
cookedArgs * | cArgNewFromString (const char *string) |
cookedArgs * | cArgNewFromArgv (char *const *const argv) |
cookedArgs * | cArgNewFromFile (FILE *const fp) |
cookedArgs * | cArgNewFromLineFile (FILE *const fp) |
void | cArgDelete (cookedArgs *const current) |
bool | cArgOff (cookedArgs *const current) |
bool | cArgIsOption (cookedArgs *const current) |
const char * | cArgItem (cookedArgs *const current) |
void | cArgForth (cookedArgs *const current) |
bool | isExcludedFile (const char *const name, bool falseIfExceptionsAreDefeind) |
bool | isIncludeFile (const char *const fileName) |
void | parseCmdlineOptions (cookedArgs *const cargs) |
void | previewFirstOption (cookedArgs *const cargs) |
void | readOptionConfiguration (void) |
void | initOptions (void) |
void | freeOptionResources (void) |
langType | getLanguageComponentInOption (const char *const option, const char *const prefix) |
langType | getLanguageComponentInOptionFull (const char *const option, const char *const prefix, bool noPretending) |
void | processLanguageDefineOption (const char *const option, const char *const parameter) |
bool | processMapOption (const char *const option, const char *const parameter) |
bool | processParamOption (const char *const option, const char *const value) |
bool | processKinddefOption (const char *const option, const char *const parameter) |
bool | processKindsOption (const char *const option, const char *const parameter) |
bool | processExtradefOption (const char *const option, const char *const parameter) |
bool | processFielddefOption (const char *const option, const char *const parameter) |
bool | processAliasOption (const char *const option, const char *const parameter) |
bool | processTabledefOption (const char *const option, const char *const parameter) |
bool | processRoledefOption (const char *const option, const char *const parameter) |
bool | processScopesepOption (const char *const option, const char *const parameter) |
bool | processPretendOption (const char *const option, const char *const parameter) |
bool | processRolesOption (const char *const option, const char *const parameter) |
bool | isDestinationStdout (void) |
void | setMainLoop (mainLoopFunc func, void *data) |
bool | ptagMakePatternLengthLimit (ptagDesc *pdesc, langType langType, const void *data) |
Variables | |
const optionValues | Option |
#define CONST_OPTION const |
Definition at line 15 of file options_p.h.
#define includeExtensionFlags | ( | ) | (Option.tagFileFormat > 1) |
Definition at line 34 of file options_p.h.
typedef struct sCookedArgs cookedArgs |
typedef void(* mainLoopFunc) (cookedArgs *args, void *data) |
Definition at line 136 of file options_p.h.
typedef enum eOptionLoadingStage OptionLoadingStage |
typedef struct sOptionValues optionValues |
typedef enum eTagRelative tagRelative |
enum eLocate |
Enumerator | |
---|---|
EX_MIX | |
EX_LINENUM | |
EX_PATTERN | |
EX_COMBINE |
Definition at line 53 of file options_p.h.
enum eOptionLoadingStage |
Definition at line 73 of file options_p.h.
enum eTagRelative |
Enumerator | |
---|---|
TREL_NO | |
TREL_YES | |
TREL_ALWAYS | |
TREL_NEVER |
Definition at line 66 of file options_p.h.
enum optionType |
Enumerator | |
---|---|
OPTION_NONE | |
OPTION_SHORT | |
OPTION_LONG |
Definition at line 39 of file options_p.h.
enum sortType |
Enumerator | |
---|---|
SO_UNSORTED | |
SO_SORTED | |
SO_FOLDSORTED |
Definition at line 60 of file options_p.h.
void cArgDelete | ( | cookedArgs *const | current | ) |
Definition at line 965 of file options.c.
References argDelete(), sCookedArgs::args, Assert, eFree(), sCookedArgs::item, and NULL.
Referenced by createTagsFromFileInput(), ctags_cli_main(), parseEnvironmentOptions(), and parseFileOptions().
void cArgForth | ( | cookedArgs *const | current | ) |
Definition at line 1002 of file options.c.
References argForth(), argOff(), sCookedArgs::args, Assert, cArgOff(), cArgOptionPending(), cArgRead(), eFree(), sCookedArgs::isOption, sCookedArgs::item, sCookedArgs::longOption, NULL, sCookedArgs::parameter, parseShortOption(), and sCookedArgs::shortOptions.
Referenced by createTagsForArgs(), createTagsFromFileInput(), parseOption(), and previewFirstOption().
bool cArgIsOption | ( | cookedArgs *const | current | ) |
Definition at line 990 of file options.c.
References Assert, sCookedArgs::isOption, and NULL.
Referenced by parseOptions(), and previewFirstOption().
const char * cArgItem | ( | cookedArgs *const | current | ) |
Definition at line 996 of file options.c.
References Assert, sCookedArgs::item, and NULL.
Referenced by createTagsForArgs(), and createTagsFromFileInput().
cookedArgs * cArgNewFromArgv | ( | char *const *const | argv | ) |
Definition at line 938 of file options.c.
References argNewFromArgv(), sCookedArgs::args, cArgRead(), and xMalloc.
Referenced by ctags_cli_main().
cookedArgs * cArgNewFromFile | ( | FILE *const | fp | ) |
Definition at line 947 of file options.c.
References argNewFromFile(), sCookedArgs::args, cArgRead(), and xMalloc.
cookedArgs * cArgNewFromLineFile | ( | FILE *const | fp | ) |
Definition at line 956 of file options.c.
References argNewFromLineFile(), sCookedArgs::args, cArgRead(), and xMalloc.
Referenced by createTagsFromFileInput(), and parseFileOptions().
cookedArgs * cArgNewFromString | ( | const char * | string | ) |
Definition at line 929 of file options.c.
References argNewFromString(), sCookedArgs::args, cArgRead(), and xMalloc.
Referenced by parseEnvironmentOptions().
bool cArgOff | ( | cookedArgs *const | current | ) |
Definition at line 984 of file options.c.
References argOff(), sCookedArgs::args, Assert, cArgOptionPending(), and NULL.
Referenced by batchMakeTags(), cArgForth(), createTagsForArgs(), createTagsFromFileInput(), parseOption(), and parseOptions().
void checkOptions | ( | void | ) |
Definition at line 730 of file options.c.
References sOptionValues::append, sOptionValues::customXfmt, enableXtag(), error(), FATAL, sOptionValues::filter, isDestinationStdout(), isXtagEnabled(), notice(), NULL, Option, sOptionValues::printTotals, sOptionValues::tagFileName, WARNING, writerCheckOptions(), sOptionValues::xref, and XTAG_FILE_NAMES.
Referenced by ctags_cli_main().
bool filesRequired | ( | void | ) |
Definition at line 722 of file options.c.
References FilesRequired, Option, and sOptionValues::recurse.
Referenced by batchMakeTags().
void freeList | ( | stringList **const | pString | ) |
Definition at line 697 of file options.c.
References NULL, and stringListDelete().
Referenced by freeOptionResources(), freeParserResources(), and processExcludeOptionCommon().
void freeOptionResources | ( | void | ) |
Definition at line 3881 of file options.c.
References sOptionValues::etagsInclude, Excluded, ExcludedException, sOptionValues::fileList, sOptionValues::filterTerminator, freeList(), freeSearchPathList(), freeString(), sOptionValues::headerExt, Option, OptionFiles, OptlibPathList, and sOptionValues::tagFileName.
Referenced by ctags_cli_main().
langType getLanguageComponentInOption | ( | const char *const | option, |
const char *const | prefix | ||
) |
Definition at line 801 of file options.c.
References getLanguageComponentInOptionFull().
Referenced by processAliasOption(), processExtradefOption(), processFielddefOption(), processKinddefOption(), processMapOption(), processMultilineRegexOption(), processMultitableExtendingOption(), processMultitableRegexOption(), processParamOption(), processRegexOption(), processRoledefOption(), processScopesepOption(), and processTabledefOption().
langType getLanguageComponentInOptionFull | ( | const char *const | option, |
const char *const | prefix, | ||
bool | noPretending | ||
) |
Definition at line 762 of file options.c.
References Assert, error(), eStrndup(), FATAL, getNamedLanguageFull(), LANG_IGNORE, and NULL.
Referenced by getLanguageComponentInOption(), and processPretendOption().
void initOptions | ( | void | ) |
Definition at line 3804 of file options.c.
References installHeaderListDefaults(), installLanguageAliasesDefaults(), installLanguageMapDefaults(), NULL, OptionFiles, OptlibPathList, processExcludeOption(), stringListNew(), and verbose().
Referenced by ctags_cli_main(), and tm_ctags_init().
bool isDestinationStdout | ( | void | ) |
Definition at line 3918 of file options.c.
References sOptionValues::filter, sOptionValues::interactive, NULL, Option, outputDefaultFileName(), and sOptionValues::tagFileName.
Referenced by checkOptions(), isPseudoTagsEnabled(), and openTagFile().
bool isExcludedFile | ( | const char *const | name, |
bool | falseIfExceptionsAreDefeind | ||
) |
Definition at line 1184 of file options.c.
References baseFilename(), Excluded, ExcludedException, name, NULL, stringListCount(), and stringListFileMatched().
Referenced by createTagsForEntry().
bool isIncludeFile | ( | const char *const | fileName | ) |
Definition at line 1114 of file options.c.
References fileExtension(), sOptionValues::headerExt, NULL, Option, and stringListExtensionMatched().
Referenced by setInputFileParametersCommon().
void parseCmdlineOptions | ( | cookedArgs *const | cargs | ) |
Definition at line 3464 of file options.c.
References ENTER, and parseOptions().
Referenced by createTagsForArgs(), createTagsFromFileInput(), and ctags_cli_main().
void previewFirstOption | ( | cookedArgs *const | cargs | ) |
Definition at line 3507 of file options.c.
References cArgForth(), cArgIsOption(), sCookedArgs::item, notice(), sCookedArgs::parameter, parseOption(), RSV_NONE, and SkipConfiguration.
Referenced by ctags_cli_main().
bool processAliasOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 3314 of file parse.c.
References Assert, clearLanguageAliases(), error(), getLanguageComponentInOption(), getLanguageName(), installLanguageAliasesDefaults(), LANG_IGNORE, LanguageCount, processLangAliasOption(), RSV_LANG_ALL, RSV_LANGMAP_DEFAULT, verbose(), and WARNING.
Referenced by processLongOption().
bool processExtradefOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 3622 of file parse.c.
References getLanguageComponentInOption(), LANG_IGNORE, and processLangDefineExtra().
Referenced by processLongOption().
bool processFielddefOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 3693 of file parse.c.
References getLanguageComponentInOption(), LANG_IGNORE, and processLangDefineField().
Referenced by processLongOption().
bool processKinddefOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 2640 of file parse.c.
References getLanguageComponentInOption(), LANG_IGNORE, and processLangDefineKind().
Referenced by processLongOption().
bool processKindsOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 2728 of file parse.c.
References eFree(), error(), eStrndup(), FATAL, foreachLanguage(), getNamedLanguage(), LANG_IGNORE, NULL, langKindDefinitionStruct::option, langKindDefinitionStruct::parameter, parameterEnablingAllOrFileKind(), PREFIX, PREFIX_LEN, processLangKindDefinition(), processLangKindDefinitionEach(), RSV_LANG_ALL, and WARNING.
Referenced by processLongOption().
void processLanguageDefineOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 2146 of file parse.c.
References ARRAY_SIZE, preLangDefFlagData::autoFQTag, preLangDefFlagData::base, sParserObject::currentExtensions, sParserObject::currentPatterns, preLangDefFlagData::direction, eFree(), error(), eStrdup(), eStrndup(), FATAL, flagsEval(), getNamedLanguage(), sParserDefinition::id, initializeParsingCommon(), LANG_IGNORE, LanguageCount, LanguageTable, linkDependenciesAtInitializeParsing(), LONG_FLAGS_OPEN, name, NULL, OptlibParser(), PreLangDefFlagDef, sParserObject::pretendedAsLanguage, sParserObject::pretendingAsLanguage, sParserDefinition::requestAutomaticFQTag, RSV_LANG_ALL, stringListNew(), SUBPARSER_BASE_RUNS_SUB, SUBPARSER_UNKNOWN_DIRECTION, WARNING, and xRealloc.
bool processMapOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 1939 of file options.c.
References addLanguageMap(), Assert, clear(), clearLanguageMap(), eFree(), error(), eStrdup(), FATAL, getLanguageComponentInOption(), getLanguageName(), LANG_IGNORE, NULL, removeLanguageMap(), and verbose().
Referenced by processLongOption().
bool processParamOption | ( | const char *const | option, |
const char *const | value | ||
) |
Definition at line 1994 of file options.c.
References applyParameter(), error(), FATAL, getLanguageComponentInOption(), getLanguageName(), LANG_IGNORE, name, and NULL.
Referenced by processLongOption().
bool processPretendOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 4953 of file parse.c.
References enableLanguage(), error(), FATAL, getLanguageComponentInOptionFull(), getLanguageNameFull(), getNamedLanguageFull(), LANG_IGNORE, LanguageTable, NULL, sParserObject::pretendedAsLanguage, sParserObject::pretendingAsLanguage, pretendOptionPrefix, and verbose().
Referenced by processLongOption().
bool processRoledefOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 2651 of file parse.c.
References Assert, error(), FATAL, getLanguageComponentInOption(), getLanguageName(), LANG_IGNORE, LanguageCount, PREFIX, PREFIX_LEN, and processLangDefineRole().
Referenced by processLongOption().
bool processRolesOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 2979 of file parse.c.
References eFree(), error(), eStrndup(), FATAL, foreachKind(), foreachLanguage(), getKindIndexForLetter(), getKindIndexForName(), getNamedLanguage(), KIND_FILE_DEFAULT_LETTER, KIND_FILE_DEFAULT_NAME, KIND_GHOST_INDEX, sParserObject::kindControlBlock, langKindRoleDefinitionStruct::kindIndex, LANG_IGNORE, LanguageTable, NULL, langKindRoleDefinitionStruct::option, langKindRoleDefinitionStruct::parameter, PREFIX, PREFIX_LEN, processLangKindRoleDefinition(), processLangKindRoleDefinitionEach(), resetKindRolesAsCallback(), RSV_LANG_ALL, and WARNING.
Referenced by processLongOption().
bool processScopesepOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 665 of file parse.c.
References getLanguageComponentInOption(), LANG_IGNORE, and processLangDefineScopesep().
Referenced by processLongOption().
bool processTabledefOption | ( | const char *const | option, |
const char *const | parameter | ||
) |
Definition at line 4296 of file parse.c.
References addRegexTable(), error(), FATAL, getLanguageComponentInOption(), LANG_IGNORE, LanguageTable, and NULL.
Referenced by processLongOption().
Definition at line 2767 of file options.c.
References NULL, sOptionValues::patternLengthLimit, and writePseudoTag().
void readOptionConfiguration | ( | void | ) |
Definition at line 3791 of file options.c.
References parseConfigurationFileOptions(), parseEnvironmentOptions(), and SkipConfiguration.
Referenced by ctags_cli_main().
void setDefaultTagFileName | ( | void | ) |
Definition at line 706 of file options.c.
References sOptionValues::filter, sOptionValues::interactive, NULL, Option, outputDefaultFileName(), stringCopy(), and sOptionValues::tagFileName.
Referenced by openTagFile().
void setMainLoop | ( | mainLoopFunc | func, |
void * | data | ||
) |
Definition at line 324 of file main.c.
References mainData, and mainLoop.
Referenced by ctags_cli_main().
void testEtagsInvocation | ( | void | ) |
Definition at line 817 of file options.c.
References eFree(), eStrdup(), ETAGS, getExecutableName(), NULL, setEtagsMode(), strstr(), toLowerString(), and verbose().
Referenced by ctags_cli_main().
|
extern |
Definition at line 137 of file options.c.
Referenced by addCommonPseudoTags(), appendInputLine(), batchMakeTags(), canUseLineNumberAsLocator(), checkOptions(), closeInputFile(), closeTagFile(), createTagsForEntry(), createTagsFromFileInput(), ctags_cli_main(), Scintilla::OptionSet< T >::DefineProperty(), doesContainAnyCharInInput(), etagsInclude(), fileNewline(), filesRequired(), freeOptionResources(), getFieldName(), getFileLanguageForRequest(), getFileLanguageForRequestInternal(), hasTagEntryTabOrNewlineChar(), iFileGetLine(), initializeParserStats(), initTagEntryFull(), inSandbox(), installHeaderListDefaults(), internalSortTags(), isDestinationStdout(), isIncludeFile(), makeDefineTag(), makePatternStringCommon(), notice(), openTagFile(), parseEnvironmentOptions(), parseFileWithMio(), printGuessedParser(), printOptionDescriptions(), processEtagsInclude(), processExcmdOption(), processFilterTerminatorOption(), processFormatOption(), processHeaderListOption(), processLanguageForceOption(), processMaxRecursionDepthOption(), processPatternLengthLimit(), processShortOption(), processSortOption(), processTagRelative(), processTotals(), processXformatOption(), recurseIntoDirectory(), renderFieldInput(), renderFieldInputNoEscape(), renderFieldLanguage(), renderFieldLineNumber(), setDefaultTagFileName(), setEtagsMode(), setInputFileParametersCommon(), setXrefMode(), sortTagFile(), stderrDefaultErrorPrinter(), updateSortedFlag(), writeCtagsEntry(), writeEtagsEntry(), writeEtagsIncludes(), writeLineNumberEntry(), writeSortedTags(), writeTagEntry(), and writeXrefEntry().