diff options
author | axel <axel@liljencrantz.se> | 2006-11-16 00:16:49 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-11-16 00:16:49 +1000 |
commit | 6573d2b451a33d1de663d35d769ffda9fe6d6d1f (patch) | |
tree | 6abb2897a6572c845a8eb63a0e992d2261b8efbc /function.h | |
parent | cfa9ecbfd279d83ddd3849a34b2f71a93bbdc6a5 (diff) |
Use halloc to simplyfy allocations in function.c
darcs-hash:20061115141649-ac50b-aff0e3369bb19d6d88130781b13e598c9445b138.gz
Diffstat (limited to 'function.h')
-rw-r--r-- | function.h | 29 |
1 files changed, 18 insertions, 11 deletions
@@ -1,8 +1,10 @@ /** \file function.h Prototypes for functions for storing and retrieving function - information. Actual function evaluation is taken care of by the - parser and to some degree the builtin handling library. + information. These functions also take care of autoloading + functions in the $fish_function_path. Actual function evaluation + is taken care of by the parser and to some degree the builtin + handling library. */ #ifndef FISH_FUNCTION_H @@ -16,13 +18,15 @@ Initialize function data */ void function_init(); + /** Destroy function data */ void function_destroy(); /** - Add an function. The parameters values are copied and should be freed by the caller. + Add an function. The parameters values are copied and should be + freed by the caller. */ void function_add( const wchar_t *name, const wchar_t *val, @@ -35,11 +39,6 @@ void function_add( const wchar_t *name, void function_remove( const wchar_t *name ); /** - Returns true if the function with the name name uses internal variables, false otherwise. -*/ -int function_use_vars( const wchar_t *name ); - -/** Returns the definition of the function with the name \c name. */ const wchar_t *function_get_definition( const wchar_t *name ); @@ -55,12 +54,13 @@ const wchar_t *function_get_desc( const wchar_t *name ); void function_set_desc( const wchar_t *name, const wchar_t *desc ); /** - Returns true if the function witrh the name name exists. + Returns true if the function with the name name exists. */ int function_exists( const wchar_t *name ); /** - Insert all function names into l. These are not copies of the strings and should not be freed after use. + Insert all function names into l. These are not copies of the + strings and should not be freed after use. \param list the list to add the names to \param get_hidden whether to include hidden functions, i.e. ones starting with an underscore @@ -71,11 +71,18 @@ void function_get_names( array_list_t *list, /** Returns tha absolute path of the file where the specified function was defined. Returns 0 if the file was defined on the commandline. + + This function does not autoload functions, it will only work on + functions that have already been defined. */ const wchar_t *function_get_definition_file( const wchar_t *name ); /** - Returns the linenumber where the definition of the specified function started + Returns the linenumber where the definition of the specified + function started. + + This function does not autoload functions, it will only work on + functions that have already been defined. */ int function_get_definition_offset( const wchar_t *name ); |