diff --git a/builtin.c b/builtin.c index ea6504c96..ba87f6635 100644 --- a/builtin.c +++ b/builtin.c @@ -9,17 +9,15 @@ where NAME is the name of the builtin, and args is a zero-terminated list of arguments. - 2). Add a line like hash_put( &builtin, L"NAME", &builtin_NAME ); to builtin_init. This will enable the parser to find the builtin function. + 2). Add a line like { L"NAME", &builtin_NAME, N_(L"Bla bla bla") }, to the builtin_data variable. The description is used by the completion system. - 3). Add a line like hash_put( desc, L"NAME", _(L"Bla bla bla") ); to the proper part of builtin_get_desc, containing a short description of what the builtin does. This description is used by the completion system. + 3). Create a file doc_src/NAME.txt, containing the manual for the builtin in Doxygen-format. Check the other builtin manuals for proper syntax. - 4). Create a file doc_src/NAME.txt, containing the manual for the builtin in Doxygen-format. Check the other builtin manuals for proper syntax. + 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 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! - 6). Add an entry to the manual at the builtin-overview subsection. Note that the entries should be sorted alphabetically! - - 7). Use 'darcs add doc_src/NAME.txt' to start tracking changes to the documentation file. + 6). Use 'darcs add doc_src/NAME.txt' to start tracking changes to the documentation file. */ @@ -109,7 +107,7 @@ int builtin_out_redirect; int builtin_err_redirect; /* - Buffers for storing the output of builtin functions + Buffers for storing the output of builtin functions */ string_buffer_t *sb_out=0, *sb_err=0; @@ -119,8 +117,8 @@ string_buffer_t *sb_out=0, *sb_err=0; static array_list_t io_stack; /** - The file from which builtin functions should attempt to read, use - instead of stdin. + The file from which builtin functions should attempt to read, use + instead of stdin. */ static int builtin_stdin; @@ -264,8 +262,8 @@ static int builtin_bind( wchar_t **argv ) } /** - The block builtin, used for temporarily blocking events - */ + The block builtin, used for temporarily blocking events +*/ static int builtin_block( wchar_t **argv ) { enum @@ -1223,7 +1221,7 @@ static int builtin_function( wchar_t **argv ) } /** - The random builtin. For generating random numbers. + The random builtin. For generating random numbers. */ static int builtin_random( wchar_t **argv ) { @@ -1478,7 +1476,7 @@ static int builtin_read( wchar_t **argv ) } /* - Verify all variable names + Verify all variable names */ for( i=woptind; i