diff options
author | axel <axel@liljencrantz.se> | 2005-12-12 08:21:01 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2005-12-12 08:21:01 +1000 |
commit | 1d69e70b7a298178e9f6415ba65d88fdda964e92 (patch) | |
tree | d95c5c9ec7b3a7e051c0b60b8b8abaca2991b251 /parser.h | |
parent | 2cac04850b950184ea431c9d9b5d1261236d4ed9 (diff) |
Initial blocking implementation
darcs-hash:20051211222101-ac50b-6e11220bd608187fbb32a0313b5b73dbdc8354fc.gz
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 36 |
1 files changed, 32 insertions, 4 deletions
@@ -11,6 +11,27 @@ #include "util.h" #include "parser.h" +typedef struct event_block +{ + /** + The types of events to block. This is interpreted as a bitset + whete the value is 1 for every bit corresponding to a blocked + event type. For example, if EVENT_VARIABLE type events should + be blocked, (type & 1<<EVENT_BLOCKED) should be set. + + Note that EVENT_ANY can be used to specify any event. + */ + int type; + + /** + The next event_block struct + */ + struct event_block *next; +} + event_block_t; + + + /** block_t represents a block of commands. */ @@ -21,12 +42,12 @@ typedef struct block int tok_pos; /**< The start index of the block */ /** - Status for the current loop block. Can be anu of the values from the loop_status enum. + Status for the current loop block. Can be any of the values from the loop_status enum. */ int loop_status; /** - The log that is currently evaluated in the specified block. + The job that is currently evaluated in the specified block. */ job_t *job; @@ -68,8 +89,11 @@ typedef struct block array_list_t *function_events; } param4; - - + /** + Some naming confusion. This is a pointer to the first element in the list of all event blocks. + */ + event_block_t *first_event_block; + /** Next outer block */ @@ -159,6 +183,10 @@ enum parser_error /** The current innermost block */ extern block_t *current_block; +/** Global event blocks */ +extern event_block_t *global_event_block; + + /** The current error code */ extern int error_code; |