Changeset a66ea217 in mainline for uspace/app/bithenge/transform.c


Ignore:
Timestamp:
2012-08-08T00:52:22Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8bd2ec
Parents:
ad5c8a48
Message:

Bithenge: use expressions to make transforms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/transform.c

    rad5c8a48 ra66ea217  
    183183        self->params = NULL;
    184184        self->current_node = NULL;
     185        self->in_node = NULL;
    185186        *out = self;
    186187        return EOK;
     
    211212}
    212213
     214/** Get the current node being created, which may be NULL.
     215 * @param scope The scope to get the current node from.
     216 * @return The node being created, or NULL. */
     217bithenge_node_t *bithenge_scope_get_current_node(bithenge_scope_t *scope)
     218{
     219        if (scope->current_node)
     220                bithenge_node_inc_ref(scope->current_node);
     221        return scope->current_node;
     222}
     223
    213224/** Set the current node being created. Takes a reference to @a node.
    214225 * @param scope The scope to set the current node in.
    215  * @param node The current node being created, or NULL.
    216  * @return EOK on success or an error code from errno.h. */
     226 * @param node The current node being created, or NULL. */
    217227void bithenge_scope_set_current_node(bithenge_scope_t *scope,
    218228    bithenge_node_t *node)
     
    220230        bithenge_node_dec_ref(scope->current_node);
    221231        scope->current_node = node;
     232}
     233
     234/** Get the current input node, which may be NULL.
     235 * @param scope The scope to get the current input node from.
     236 * @return The input node, or NULL. */
     237bithenge_node_t *bithenge_scope_in_node(bithenge_scope_t *scope)
     238{
     239        if (scope->in_node)
     240                bithenge_node_inc_ref(scope->in_node);
     241        return scope->in_node;
     242}
     243
     244/** Set the current input node. Takes a reference to @a node.
     245 * @param scope The scope to set the input node in.
     246 * @param node The input node, or NULL. */
     247void bithenge_scope_set_in_node(bithenge_scope_t *scope, bithenge_node_t *node)
     248{
     249        bithenge_node_dec_ref(scope->in_node);
     250        scope->in_node = node;
    222251}
    223252
     
    236265{
    237266        return self->barrier;
    238 }
    239 
    240 /** Get the current node being created, which may be NULL.
    241  * @param scope The scope to get the current node from.
    242  * @return The node being created, or NULL. */
    243 bithenge_node_t *bithenge_scope_get_current_node(bithenge_scope_t *scope)
    244 {
    245         if (scope->current_node)
    246                 bithenge_node_inc_ref(scope->current_node);
    247         return scope->current_node;
    248267}
    249268
Note: See TracChangeset for help on using the changeset viewer.