filename | src/tools/actparse.c |
changeset | 981:79fcace1ab43 |
prev | 979:2cc7b486ea6c |
next | 1169:23a9613aceb1 |
author | nkeynes |
date | Wed Jun 03 10:29:16 2009 +0000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Allow multiple input hooks to be registered for the same key - useful to allow eg binding the same hotkey for run/stop so that it works as a toggle. |
file | annotate | diff | log | raw |
1.1 --- a/src/tools/actparse.c Wed Feb 04 00:58:54 2009 +00001.2 +++ b/src/tools/actparse.c Wed Jun 03 10:29:16 2009 +00001.3 @@ -67,7 +67,8 @@1.4 for( i=0; i<rules->rule_count; i++ ) {1.5 if( strcasecmp(rules->rules[i]->format, operation) == 0 ) {1.6 if( actions[i].text != NULL ) {1.7 - fprintf( stderr, "Duplicate actions for operation '%s'\n", operation );1.8 + fprintf( stderr, "gendec:%d: Duplicate actions for operation '%s' (previous action on line %d)\n", line, operation,1.9 + actions[i].lineno );1.10 return -1;1.11 }1.12 actions[i].filename = file;1.13 @@ -76,7 +77,7 @@1.14 return 0;1.15 }1.16 }1.17 - fprintf(stderr, "No operation found matching '%s'\n", operation );1.18 + fprintf(stderr, "gendec:%d: No operation found matching '%s'\n", line, operation );1.19 return -1;1.20 }1.22 @@ -118,10 +119,6 @@1.24 actiontoken_t action_file_next( actionfile_t af )1.25 {1.26 - if( af->token.symbol == ACTIONS ) {1.27 - /* Destroy previous actions */1.28 - memset( af->token.actions, 0, sizeof(af->token.actions) );1.29 - }1.30 af->token.lineno = af->yyline;1.31 if( af->yyposn == af->length ) {1.32 af->token.symbol = END;1.33 @@ -129,6 +126,7 @@1.34 (af->token.symbol == NONE && af->text[af->yyposn] == '%' && af->text[af->yyposn+1] == '%') ) {1.35 /* Begin action block */1.36 af->token.symbol = ACTIONS;1.37 + memset( af->token.actions, 0, sizeof(af->token.actions) );1.39 char *operation = &af->text[af->yyposn];1.40 while( af->yyposn < af->length ) {
.