From: Antoine Cellerier Date: Tue, 16 Nov 2004 01:14:23 +0000 (+0000) Subject: * consider tabs as white spaces when parsing vlm command line X-Git-Tag: 0.8.2~1665 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=eb75ac5f69997fa7f5b8337cbb883b32c37e12dc;p=vlc * consider tabs as white spaces when parsing vlm command line * all lines where first non white space char is a # is a comment --- diff --git a/src/misc/vlm.c b/src/misc/vlm.c index f70434a0a5..c815e67fa7 100644 --- a/src/misc/vlm.c +++ b/src/misc/vlm.c @@ -252,7 +252,7 @@ static int ExecuteCommand(vlm_t *vlm, char *command, vlm_message_t **p_message) while( *cmd != '\0' ) { - if( *cmd == ' ' ) + if( *cmd == ' ' || *cmd == '\t' ) { cmd++; } @@ -261,6 +261,13 @@ static int ExecuteCommand(vlm_t *vlm, char *command, vlm_message_t **p_message) char *p_temp; int i_temp; + /* support for comments */ + if( i_command == 0 && *cmd == '#') + { + message = vlm_MessageNew( "", NULL ); + goto success; + } + p_temp = FindEndCommand( cmd ); if( p_temp == NULL ) goto error; @@ -273,6 +280,7 @@ static int ExecuteCommand(vlm_t *vlm, char *command, vlm_message_t **p_message) p_command[ i_command ][ i_temp ] = '\0'; i_command++; + cmd = p_temp; } }