aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-06-17 23:07:08 +1000
committerGravatar axel <axel@liljencrantz.se>2006-06-17 23:07:08 +1000
commit07ff8a6c03e9c232a285e8b4ebc22f11ae5963d7 (patch)
treedee6963874a0c36ec40401211b6ea67784be2c7d /builtin.c
parent9f10dd377ee08f9142fb52db1506392610606250 (diff)
Documentation updates. Fixes a few formating bugs, adds various minor missing api documentation, fixes a few typos. Also fixes a few tiny code issues, mostly missing consts, etc
darcs-hash:20060617130708-ac50b-cc2ec5aa3e4bfb8e28d7b86441bfb4661f1dd7e7.gz
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index bd2bc501..6f3e2afb 100644
--- a/builtin.c
+++ b/builtin.c
@@ -15,7 +15,7 @@
4). Add an entry to the BUILTIN_DOC_SRC variable of Makefile.in. Note that the entries should be sorted alphabetically!
- 5). Add an entry to the manual at the builtin-overview subsection. Note that the entries should be sorted alphabetically!
+ 5). Add an entry to the manual at the builtin-overview subsection of doc_src/doc.hdr. Note that the entries should be sorted alphabetically!
6). Use 'darcs add doc_src/NAME.txt' to start tracking changes to the documentation file.
@@ -89,10 +89,22 @@
*/
#define FG_MSG _( L"Send job %d, '%ls' to foreground\n" )
+/**
+ Datastructure to describe a builtin.
+*/
typedef struct builtin_data
{
+ /**
+ Name of the builtin
+ */
const wchar_t *name;
+ /**
+ Function pointer tothe builtin implementation
+ */
int (*func)(wchar_t **argv);
+ /**
+ Description of what the builtin does
+ */
const wchar_t *desc;
}
builtin_data_t;
@@ -153,6 +165,9 @@ void builtin_wperror( const wchar_t *s)
}
}
+/**
+ Count the number of times the specified character occurs in the specified string
+*/
static int count_char( const wchar_t *str, wchar_t c )
{
int res = 0;
@@ -1979,6 +1994,7 @@ static int builtin_cd( wchar_t **argv )
wchar_t *dir;
int res=0;
void *context = halloc( 0, 0 );
+
if( argv[1] == 0 )
{
@@ -2776,6 +2792,9 @@ static int builtin_case( wchar_t **argv )
Below are functions for handling the builtin commands
*/
+/**
+ Data about all the builtin commands in fish
+*/
const static builtin_data_t builtin_data[]=
{
{