aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-24 06:40:14 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-24 06:40:14 +1000
commit29c488c6dc4344015a6711efdd9a618813a82249 (patch)
treeb7b8f3eee14261ddf2cd7546aa2f7102f8eb4ff0 /parser.c
parent14ae10daf7de7a14335047d2cd52bcfed9352e36 (diff)
Fixes to api documentation, added .PHONY to makefile actions, made a few private functions static
darcs-hash:20060123204014-ac50b-b9d2a10c7f00945b5d9d244cb3b8c1489fe280de.gz
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/parser.c b/parser.c
index b7d91408..b29b9779 100644
--- a/parser.c
+++ b/parser.c
@@ -311,8 +311,10 @@ typedef struct
wchar_t *cmd;
} profile_element_t;
-
-int block_count( block_t *b )
+/**
+ Return the current number of block nestings
+*/
+static int block_count( block_t *b )
{
if( b==0)
@@ -449,8 +451,12 @@ const wchar_t *parser_get_block_desc( int block )
}
-
-int parser_skip_arguments( const wchar_t *cmd )
+/**
+ Check if the specified bcommand is one of the builtins that cannot
+ have arguments, any followin argument is interpreted as a new
+ command
+*/
+static int parser_skip_arguments( const wchar_t *cmd )
{
return contains_str( cmd,
@@ -459,7 +465,6 @@ int parser_skip_arguments( const wchar_t *cmd )
(void *)0 );
}
-
int parser_is_subcommand( const wchar_t *cmd )
{
@@ -506,7 +511,10 @@ int parser_is_reserved( wchar_t *word)
(void *)0 );
}
-int parser_is_pipe_forbidden( wchar_t *word )
+/**
+ Returns 1 if the specified command is a builtin that may not be used in a pipeline
+*/
+static int parser_is_pipe_forbidden( wchar_t *word )
{
return contains_str( word,
L"exec",
@@ -817,9 +825,12 @@ void parser_init()
al_init( &forbidden_function );
}
-void print_profile( array_list_t *p,
- int pos,
- FILE *out )
+/**
+ Print profiling information to the specified stream
+*/
+static void print_profile( array_list_t *p,
+ int pos,
+ FILE *out )
{
profile_element_t *me, *prev;
int i;