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
![]() ![]() |
Go to the source code of this file.
Macros | |
#define | xMalloc(n, Type) (Type *)eMalloc((size_t)(n) * sizeof (Type)) |
#define | xCalloc(n, Type) (Type *)eCalloc((size_t)(n), sizeof (Type)) |
#define | xRealloc(p, n, Type) (Type *)eRealloc((p), (n) * sizeof (Type)) |
#define | ARRAY_SIZE(X) (sizeof (X) / sizeof (X[0])) |
#define | ARRAY_AND_SIZE(X) (X), ARRAY_SIZE(X) |
#define | STRINGIFY(X) STRINGIFY_(X) |
#define | STRINGIFY_(X) #X |
Typedefs | |
typedef int | errorSelection |
Enumerations | |
enum | eErrorTypes { FATAL = 1 , WARNING = 2 , PERROR = 4 } |
Functions | |
void | error (const errorSelection selection, const char *const format,...) |
void * | eMalloc (const size_t size) |
void * | eCalloc (const size_t count, const size_t size) |
void * | eRealloc (void *const ptr, const size_t size) |
void | eFree (void *const ptr) |
void | eFreeNoNullCheck (void *const ptr) |
void | eFreeIndirect (void **ptr) |
int | struppercmp (const char *s1, const char *s2) |
int | strnuppercmp (const char *s1, const char *s2, size_t n) |
char * | strstr (const char *str, const char *substr) |
char * | strrstr (const char *str, const char *substr) |
char * | eStrdup (const char *str) |
char * | eStrndup (const char *str, size_t len) |
void | toLowerString (char *str) |
void | toUpperString (char *str) |
char * | newLowerString (const char *str) |
char * | newUpperString (const char *str) |
bool | strToUInt (const char *const str, int base, unsigned int *value) |
bool | strToULong (const char *const string, int base, unsigned long *value) |
bool | strToInt (const char *const str, int base, int *value) |
bool | strToLong (const char *const string, int base, long *value) |
const char * | baseFilename (const char *const filePath) |
const char * | fileExtension (const char *const fileName) |
#define ARRAY_AND_SIZE | ( | X | ) | (X), ARRAY_SIZE(X) |
Definition at line 28 of file routines.h.
#define ARRAY_SIZE | ( | X | ) | (sizeof (X) / sizeof (X[0])) |
Definition at line 27 of file routines.h.
#define STRINGIFY | ( | X | ) | STRINGIFY_(X) |
Definition at line 30 of file routines.h.
#define STRINGIFY_ | ( | X | ) | #X |
Definition at line 31 of file routines.h.
#define xCalloc | ( | n, | |
Type | |||
) | (Type *)eCalloc((size_t)(n), sizeof (Type)) |
Definition at line 24 of file routines.h.
#define xMalloc | ( | n, | |
Type | |||
) | (Type *)eMalloc((size_t)(n) * sizeof (Type)) |
Definition at line 23 of file routines.h.
#define xRealloc | ( | p, | |
n, | |||
Type | |||
) | (Type *)eRealloc((p), (n) * sizeof (Type)) |
Definition at line 25 of file routines.h.
typedef int errorSelection |
Definition at line 36 of file routines.h.
enum eErrorTypes |
Enumerator | |
---|---|
FATAL | |
WARNING | |
PERROR |
Definition at line 37 of file routines.h.
const char * baseFilename | ( | const char *const | filePath | ) |
Definition at line 608 of file routines.c.
References MB_LEN_MAX, NULL, strRSeparator(), and tail().
Referenced by baseFilenameSansExtensionNew(), fileExtension(), getFileLanguageForRequestInternal(), getLanguageForCommand(), getLanguageForFilename(), hackReject(), isExcludedFile(), makeFileTag(), setExecutableName(), and setOwnerDirectoryOfInputFile().
void * eCalloc | ( | const size_t | count, |
const size_t | size | ||
) |
Definition at line 228 of file routines.c.
References count, error(), FATAL, and NULL.
Referenced by createToken().
void eFree | ( | void *const | ptr | ) |
Definition at line 252 of file routines.c.
References Assert, NULL, and ptr.
Referenced by absoluteFilename(), addLanguageMap(), addTagRegexInternal(), addTagRegexOption(), ancestorClear(), argDelete(), argForth(), cArgDelete(), cArgForth(), clearParserFields(), closeTagFile(), colprintHeaderColumnDelete(), colprintTableDelete(), common_flag_field_long(), compileRegex(), copyBytes(), defineField(), defineScopeSeparator(), deleteChar(), deletePattern(), deletePoolToken(), deleteStatement(), deleteTable(), deleteTableEntry(), deleteTagEnry(), deleteToken(), eFreeIndirect(), endEtagsFile(), entry_destroy(), eStatFree(), expandOnSearchPathList(), fieldDefinitionDestroy(), fieldPatternDelete(), fileNameMatched(), fillGuestRequest(), finalizeDependencies(), findPascalTags(), findPythonTags(), flagsEval(), fmtDelete(), freeKdef(), freeKeywordTable(), freeKindControlBlock(), freeLineFposMap(), freeLregexControlBlock(), freeModifier(), freeParserResources(), freeRdef(), freeRoleControlBlock(), freeRoutineResources(), freeSlaveControlBlock(), freeString(), freeTagFileResources(), getFileLanguageForRequestInternal(), getMio(), getSpecLanguageCommon(), guestRequestDelete(), hashTableDelete(), initFieldObjects(), isCtagsLine(), isPodWord(), isRecursiveLink(), isSameFile(), isValidTagAddress(), kindFree(), makeDefineTag(), makePromise(), markTagExtraBitFull(), mio_new_file_full(), mio_new_mio(), mio_unref(), nestingLevelsFree(), nextFileLineSkippingComments(), objPoolDelete(), optlibFreeDep(), parseArglist(), parseFunction(), pickLanguageBySelection(), pre_ptrn_flag_advanceTo_long(), pre_ptrn_flag_mtable_long(), preload(), printLanguageList(), processKindsOption(), processLangDefineKind(), processLangDefineRole(), processLangKindRoleDefinition(), processLanguageDefineOption(), processLanguageMapOption(), processLanguageMultitableExtendingOption(), processLanguagesOption(), processMapOption(), processRolesOption(), ptrArrayDelete(), readIgnoreList(), relativeFilename(), removeLanguageMap(), renderFieldPattern(), replacementTruncate(), scopeSeparatorDelete(), tagFieldDelete(), testEtagsInvocation(), trashBoxDelete(), trashMakeEmpty(), trashPut(), trashTakeBack0(), uwiDeactivate(), vStringDelete(), vStringDeleteUnwrap(), vStringNewOwn(), and xtagDefinitionDestroy().
void eFreeIndirect | ( | void ** | ptr | ) |
Definition at line 263 of file routines.c.
References eFree(), NULL, and ptr.
Referenced by initFieldObjects(), initXtagObjects(), and langStackInit().
void eFreeNoNullCheck | ( | void *const | ptr | ) |
Definition at line 258 of file routines.c.
References ptr.
Referenced by freeRoleControlBlock(), getMio(), mio_new_mio(), and openTagFile().
void * eMalloc | ( | const size_t | size | ) |
Definition at line 218 of file routines.c.
References error(), FATAL, and NULL.
Referenced by defineField(), eRealloc(), getMio(), initFieldObjects(), and isPodWord().
void * eRealloc | ( | void *const | ptr, |
const size_t | size | ||
) |
Definition at line 238 of file routines.c.
References eMalloc(), error(), FATAL, NULL, and ptr.
Referenced by getMio(), mio_new_mio(), nestingLevelsPush(), and openTagFile().
void error | ( | const errorSelection | selection, |
const char *const | format, | ||
... | |||
) |
Definition at line 53 of file error.c.
References errorPrinterData, and format.
Referenced by abort_if_ferror(), addIgnoreListFromFile(), addLanguageMap(), addRegexTable(), addTagMultiTableRegex(), addTagRegexInternal(), addTagRegexOption(), applyParameter(), backupcopy_create_dir_parts(), batchMakeTags(), build_create_shellscript(), build_run_cmd(), build_spawn_cmd(), checkCtagsOptions(), checkOptionOrder(), checkOptions(), checkRegex(), closeTagFile(), common_flag_anonymous_long(), common_flag_extra_long(), common_flag_field_long(), common_flag_msg_long(), common_flag_role_long(), compile_regex(), compileRegex(), configuration_load_session_files(), copyBytes(), copyFile(), createTagsForEntry(), createTagsFromListFile(), defineRole(), defineScopeSeparator(), eCalloc(), eMalloc(), enableField(), enableLanguageField(), enableLanguageXtag(), eRealloc(), extendRegexTable(), extractMapFromParameter(), failedSort(), flagsEval(), fmtNew(), get_mtime(), getFileLanguageForRequest(), getLanguageComponentInOptionFull(), isAbsolutePath(), isCtagsLine(), isTagWritable(), kill_process(), load_css_theme(), load_system_keyfile(), makeTagEntry(), matchMultilineRegexPattern(), matchMultitableRegex(), matchMultitableRegexTable(), matchTagPattern(), on_context_action1_activate(), open_external(), openInputFile(), openTagFile(), parameterEnablingAllOrFileKind(), paramParserBool(), parse_command_line_options(), parseEnvironmentOptions(), parseFileOptions(), parseHeredoc(), parseTagRegex(), pre_lang_def_flag_base_long(), pre_ptrn_flag_advanceTo_long(), pre_ptrn_flag_guest_long(), pre_ptrn_flag_mgroup_long(), pre_ptrn_flag_mtable_long(), prepare_run_cmd(), print_external(), printing_print_gtk(), printMessage(), printMultitableMessage(), processAliasOption(), processAnonHashOption(), processBooleanOption(), processEchoOption(), processEtagsInclude(), processExcludeOptionCommon(), processExcmdOption(), processExtraTagsOption(), processFieldsOption(), processFormatOption(), processHeaderListOption(), processKindsOption(), processLangDefineExtra(), processLangDefineField(), processLangDefineKind(), processLangDefineRole(), processLangDefineScopesep(), processLangKindDefinition(), processLangKindRoleDefinition(), processLangSpecificExtraOption(), processLangSpecificFieldsOption(), processLanguageDefineOption(), processLanguageForceOption(), processLanguageMapOption(), processLanguageMultitableExtendingOption(), processLanguagesOption(), processListAliasesOption(), processListExtrasOption(), processListFieldsOption(), processListKindsOption(), processListMapsOptionForType(), processListParametersOption(), processListRolesOptions(), processListSubparsersOptions(), processLongOption(), processMapOption(), processMaxRecursionDepthOption(), processOptionFileCommon(), processOutputFormat(), processParametricOption(), processParamOption(), processPatternLengthLimit(), processPretendOption(), processPseudoTags(), processRoledefOption(), processRolesOption(), processShortOption(), processSortOption(), processTabledefOption(), processTagRegexOption(), processTagRelative(), processTotals(), pushNarrowedInputStream(), queueTagEntry(), queueTagField(), readLine(), readLineRaw(), regex_compile(), register_named_icon(), removeLanguageMap(), resumeCharacter(), ResumeString(), roleColprintAddRoles(), run_command(), sanitizeEnviron(), ScanNHexas(), ScanNumber(), scope_ptrn_flag_eval(), search_find_in_files(), search_get_argv(), setBooleanToXtagWithWarning(), setKind(), setTagFilePosition(), spawn_async(), spawn_async_with_pipes(), spawn_check_command(), spawn_get_program_name(), spawn_kill_process(), spawn_parse_argv(), spawn_sync(), spawn_with_callbacks(), tagFilePosition(), tb_editor_parse_ui(), tempFile(), toolbar_reload(), tools_execute_custom_command(), ui_init_builder(), updateSortedFlag(), utils_get_file_list(), utils_get_file_list_full(), utils_get_setting_boolean(), utils_get_setting_integer(), utils_spawn_async(), utils_spawn_sync(), utils_write_file(), uwiPopMarker(), uwiPushMarker(), and write_data_to_disk().
char * eStrdup | ( | const char * | str | ) |
Definition at line 327 of file routines.c.
References xMalloc.
Referenced by absoluteDirname(), absoluteFilename(), addCompiledTagPattern(), addExtensionList(), addRegexTable(), addTagRegexOption(), allocKindControlBlock(), attachParserField(), cArgRead(), common_flag_anonymous_long(), copyParserFields(), copyTagEntry(), cppGetSignature(), defineScopeSeparator(), eStat(), extractMapFromParameter(), fieldPatternNew(), flagsEval(), kindNew(), openTagFile(), OptlibParser(), parseKinds(), parseLongOption(), parserNew(), parseShortOption(), pre_lang_def_flag_base_long(), pre_ptrn_flag_advanceTo_long(), processLanguageDefineOption(), processLanguageMapOption(), processLanguagesOption(), processMapOption(), stringCopy(), and testEtagsInvocation().
char * eStrndup | ( | const char * | str, |
size_t | len | ||
) |
Definition at line 334 of file routines.c.
References xMalloc.
Referenced by addTagRegexOption(), baseFilenameSansExtensionNew(), common_flag_field_long(), common_flag_msg_long(), fillGuestRequest(), getLanguageComponentInOptionFull(), parseKinds(), parseLongOption(), pre_ptrn_flag_mtable_long(), processKindsOption(), processLangDefineExtra(), processLangDefineField(), processLangDefineKind(), processLangDefineRole(), processLangKindRoleDefinition(), processLanguageDefineOption(), processLanguageMultitableExtendingOption(), processListRolesOptions(), and processRolesOption().
const char * fileExtension | ( | const char *const | fileName | ) |
Definition at line 650 of file routines.c.
References baseFilename(), and NULL.
Referenced by getPatternLanguageAndSpec(), and isIncludeFile().
char * newLowerString | ( | const char * | str | ) |
Definition at line 362 of file routines.c.
References xMalloc.
char * newUpperString | ( | const char * | str | ) |
int strnuppercmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | n | ||
) |
Definition at line 293 of file routines.c.
char * strrstr | ( | const char * | str, |
const char * | substr | ||
) |
char * strstr | ( | const char * | str, |
const char * | substr | ||
) |
Definition at line 304 of file routines.c.
References NULL.
Referenced by ada_suffix(), add_custom_filetype(), build_parse_make_dir(), build_replace_placeholder(), check_partial_completion(), colprintHeaderColumnNew(), createTag(), determineEmacsModeAtEOF(), determineEmacsModeAtFirstLine(), extractVimFileType(), find_triple_end(), findLuaTags(), findMatlabTags(), findVariable(), init_tag_from_file_ctags(), load_dialog_prefs(), on_config_file_clicked(), parse_compiler_error_line(), parseImports(), pm_tree_search(), pre_ptrn_flag_advanceTo_long(), read_named_style(), spawn_async_with_pipes(), tasteR(), tasteREXXOrDosBatch(), templates_replace_command(), testEtagsInvocation(), tm_source_file_read_tags_file(), truncateTagLineAfterTag(), ui_get_mime_icon(), utils_is_uri(), utils_strpos(), utils_strv_find_lcs(), utils_strv_shorten_file_list(), and utils_tidy_path().
bool strToInt | ( | const char *const | str, |
int | base, | ||
int * | value | ||
) |
Definition at line 423 of file routines.c.
References strToLong().
Referenced by pre_ptrn_flag_advanceTo_long(), pre_ptrn_flag_guest_long(), pre_ptrn_flag_mgroup_long(), and processForceQuitOption().
bool strToLong | ( | const char *const | string, |
int | base, | ||
long * | value | ||
) |
Definition at line 403 of file routines.c.
References errno.
Referenced by fmtNew(), processShortOption(), and strToInt().
bool strToUInt | ( | const char *const | str, |
int | base, | ||
unsigned int * | value | ||
) |
Definition at line 412 of file routines.c.
References strToULong().
Referenced by processPatternLengthLimit().
bool strToULong | ( | const char *const | string, |
int | base, | ||
unsigned long * | value | ||
) |
int struppercmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 283 of file routines.c.
Referenced by compareTagsFolded().
void toLowerString | ( | char * | str | ) |
Definition at line 342 of file routines.c.
Referenced by testEtagsInvocation().
void toUpperString | ( | char * | str | ) |
Definition at line 351 of file routines.c.