Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

function.h File Reference

Prototypes for functions for storing and retrieving function information. More...

#include <wchar.h>
#include "util.h"

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  function_data
 Structure describing a function. More...

Typedefs

typedef function_data function_data_t
 Structure describing a function.

Functions

void function_init ()
 Initialize function data.
void function_destroy ()
 Destroy function data.
void function_add (function_data_t *data)
 Add an function.
void function_remove (const wchar_t *name)
 Remove the function with the specified name.
const wchar_t * function_get_definition (const wchar_t *name)
 Returns the definition of the function with the name name.
const wchar_t * function_get_desc (const wchar_t *name)
 Returns the description of the function with the name name.
void function_set_desc (const wchar_t *name, const wchar_t *desc)
 Sets the description of the function with the name name.
int function_exists (const wchar_t *name)
 Returns true if the function with the name name exists.
void function_get_names (array_list_t *list, int get_hidden)
 Insert all function names into l.
const wchar_t * function_get_definition_file (const wchar_t *name)
 Returns tha absolute path of the file where the specified function was defined.
int function_get_definition_offset (const wchar_t *name)
 Returns the linenumber where the definition of the specified function started.
array_list_tfunction_get_named_arguments (const wchar_t *name)
 Returns a list of all named arguments of the specified function.
int function_get_shadows (const wchar_t *name)
 Returns whether this function shadows variables of the underlying function.


Detailed Description

Prototypes for functions for storing and retrieving function 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.


Function Documentation

void function_add function_data_t data  ) 
 

Add an function.

The parameters values are copied and should be freed by the caller.

const wchar_t* function_get_definition_file const wchar_t *  name  ) 
 

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.

int function_get_definition_offset const wchar_t *  name  ) 
 

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.

void function_get_names array_list_t list,
int  get_hidden
 

Insert all function names into l.

These are not copies of the strings and should not be freed after use.

Parameters:
list the list to add the names to
get_hidden whether to include hidden functions, i.e. ones starting with an underscore


Generated on Sun Jan 13 02:52:47 2008 for fish by  doxygen 1.4.4