Commit eb75ac5f authored by Antoine Cellerier's avatar Antoine Cellerier

* consider tabs as white spaces when parsing vlm command line

 * all lines where first non white space char is a # is a comment
parent baf42c66
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment