Minor edits, mostly tweaks of the API documentation

darcs-hash:20060123233347-ac50b-44ebb96ba202c062739ba3d183519e28a95511b2.gz
This commit is contained in:
axel 2006-01-24 09:33:47 +10:00
parent ba177b48d5
commit 8df21a1cb1
3 changed files with 52 additions and 36 deletions

View File

@ -657,15 +657,15 @@ static void functions_def( wchar_t *name )
array_list_t ev;
event_t search;
int i;
search.function_name = name;
search.type = EVENT_ANY;
al_init( &ev );
event_get( &search, &ev );
sb_append2( sb_out,
L"function ",
name,
@ -674,11 +674,11 @@ static void functions_def( wchar_t *name )
if( desc && wcslen(desc) )
{
wchar_t *esc_desc = escape( desc, 1 );
sb_append2( sb_out, L" --description ", esc_desc, (void *)0 );
free( esc_desc );
}
for( i=0; i<al_get_count( &ev); i++ )
{
event_t *next = (event_t *)al_get( &ev, i );
@ -689,7 +689,7 @@ static void functions_def( wchar_t *name )
sb_printf( sb_out, L" --on-signal %ls", sig2wcs( next->param1.signal ) );
break;
}
case EVENT_VARIABLE:
{
sb_printf( sb_out, L" --on-variable %ls", next->param1.variable );
@ -714,17 +714,17 @@ static void functions_def( wchar_t *name )
}
}
}
al_destroy( &ev );
sb_append2( sb_out,
L"\n\t",
def,
L"\nend\n\n",
(void *)0);
}
@ -744,7 +744,7 @@ static int builtin_functions( wchar_t **argv )
int list=0;
int show_hidden=0;
int res = 0;
woptind=0;
const static struct woption
@ -775,7 +775,7 @@ static int builtin_functions( wchar_t **argv )
while( 1 )
{
int opt_index = 0;
int opt = wgetopt_long( argc,
argv,
L"ed:na",
@ -783,7 +783,7 @@ static int builtin_functions( wchar_t **argv )
&opt_index );
if( opt == -1 )
break;
switch( opt )
{
case 0:
@ -820,10 +820,8 @@ static int builtin_functions( wchar_t **argv )
return 1;
}
}
}
/*
Erase, desc and list are mutually exclusive
@ -833,13 +831,12 @@ static int builtin_functions( wchar_t **argv )
sb_printf( sb_err,
_( L"%ls: Invalid combination of options\n" ),
argv[0] );
builtin_print_help( argv[0], sb_err );
return 1;
}
if( erase )
{

View File

@ -1234,7 +1234,7 @@ static const wchar_t *complete_function_desc( const wchar_t *fn )
\param cmd the command string to find completions for
B\param comp the list to add all completions to
\param comp the list to add all completions to
*/
static void complete_cmd( const wchar_t *cmd,
array_list_t *comp )

49
util.h
View File

@ -165,19 +165,29 @@ float minf( float a, float b );
*/
void q_init( dyn_queue_t *q );
/** Destroy the queue */
/**
Destroy the queue
*/
void q_destroy( dyn_queue_t *q );
/** Insert element into queue */
/**
Insert element into queue
*/
int q_put( dyn_queue_t *q, void *e );
/** Remove and return next element from queue */
/**
Remove and return next element from queue
*/
void *q_get( dyn_queue_t *q);
/** Return next element from queue without removing it */
/**
Return next element from queue without removing it
*/
void *q_peek( dyn_queue_t *q);
/** Returns 1 if the queue is empty, 0 otherwise */
/**
Returns 1 if the queue is empty, 0 otherwise
*/
int q_empty( dyn_queue_t *q );
/**
@ -251,15 +261,15 @@ void hash_get_keys( hash_table_t *h,
void hash_get_data( hash_table_t *h,
array_list_t *arr );
/**
Call the function func for each key/data pair in the table
/**
Call the function func for each key/data pair in the table
*/
void hash_foreach( hash_table_t *h,
void (*func)( const void *, const void * ) );
/**
Same as hash_foreach, but the function func takes an additional
argument, which is provided by the caller in the variable aux
/**
Same as hash_foreach, but the function func takes an additional
argument, which is provided by the caller in the variable aux
*/
void hash_foreach2( hash_table_t *h, void (*func)( const void *,
const void *,
@ -273,7 +283,8 @@ int hash_str_func( const void *data );
/**
Hash comparison function suitable for character strings
*/
int hash_str_cmp( const void *a, const void *b );
int hash_str_cmp( const void *a,
const void *b );
/**
Hash function suitable for wide character strings.
@ -283,7 +294,8 @@ int hash_wcs_func( const void *data );
/**
Hash comparison function suitable for wide character strings
*/
int hash_wcs_cmp( const void *a, const void *b );
int hash_wcs_cmp( const void *a,
const void *b );
/**
Initialize the priority queue
@ -296,12 +308,12 @@ void pq_init( priority_queue_t *q,
/**
Add element to the queue
\param q the queue
\param e the new element
\param q the queue
\param e the new element
*/
int pq_put( priority_queue_t *q,
void *e );
void *e );
/**
Removes and returns the last entry in the priority queue
*/
@ -445,6 +457,10 @@ void al_foreach2( array_list_t *l, void (*func)(const void *, void *), void *aux
int wcsfilecmp( const wchar_t *a, const wchar_t *b );
/*
String buffer functions
*/
/**
Initialize the specified string_buffer
*/
@ -503,6 +519,9 @@ void sb_destroy( string_buffer_t * );
*/
void sb_clear( string_buffer_t * );
/*
Buffer functions
*/
/**
Initialize the specified buffer_t