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


Ignore:
Timestamp:
2012-08-09T21:18:40Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0153c87
Parents:
05f5fbf
Message:

Bithenge: initial FAT script, "in" outside expression transforms, and bugfixes

File:
1 edited

Legend:

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

    r05f5fbf rc9797067  
    4141#include "transform.h"
    4242
     43
     44
     45/***************** transform                                 *****************/
     46
    4347/** Initialize a new transform.
    4448 * @param[out] self Transform to initialize.
     
    165169}
    166170
     171
     172
     173/***************** scope                                     *****************/
     174
    167175/** Create a transform scope. It must be dereferenced with @a
    168176 * bithenge_scope_dec_ref after it is used. Takes ownership of nothing.
     
    318326}
    319327
     328
     329
     330/***************** barrier_transform                         *****************/
     331
    320332typedef struct {
    321333        bithenge_transform_t base;
     
    344356                return rc;
    345357        bithenge_scope_set_barrier(inner_scope);
    346         rc = bithenge_transform_apply(self->transform, scope, in, out);
     358        bithenge_scope_set_in_node(inner_scope, in);
     359        rc = bithenge_transform_apply(self->transform, inner_scope, in, out);
    347360        bithenge_scope_dec_ref(inner_scope);
    348361        return rc;
     
    358371                return rc;
    359372        bithenge_scope_set_barrier(inner_scope);
    360         rc = bithenge_transform_prefix_length(self->transform, scope, in, out);
     373        bithenge_scope_set_in_node(inner_scope, bithenge_blob_as_node(in));
     374        rc = bithenge_transform_prefix_length(self->transform, inner_scope, in,
     375            out);
    361376        bithenge_scope_dec_ref(inner_scope);
    362377        return rc;
     
    373388                return rc;
    374389        bithenge_scope_set_barrier(inner_scope);
    375         rc = bithenge_transform_prefix_apply(self->transform, scope, in,
     390        bithenge_scope_set_in_node(inner_scope, bithenge_blob_as_node(in));
     391        rc = bithenge_transform_prefix_apply(self->transform, inner_scope, in,
    376392            out_node, out_length);
    377393        bithenge_scope_dec_ref(inner_scope);
Note: See TracChangeset for help on using the changeset viewer.