Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/bithenge/src/compound.c

    rb7fd2a0 r6cd10ac  
    6262}
    6363
    64 static errno_t compose_apply(bithenge_transform_t *base, bithenge_scope_t *scope,
     64static int compose_apply(bithenge_transform_t *base, bithenge_scope_t *scope,
    6565    bithenge_node_t *in, bithenge_node_t **out)
    6666{
    67         errno_t rc;
     67        int rc;
    6868        compose_transform_t *self = transform_as_compose(base);
    6969        bithenge_node_inc_ref(in);
     
    8181
    8282        *out = in;
    83         return EOK;
    84 }
    85 
    86 static errno_t compose_prefix_length(bithenge_transform_t *base,
     83        return rc;
     84}
     85
     86static int compose_prefix_length(bithenge_transform_t *base,
    8787    bithenge_scope_t *scope, bithenge_blob_t *blob, aoff64_t *out)
    8888{
     
    115115 * @param num The number of transforms.
    116116 * @return EOK on success or an error code from errno.h. */
    117 errno_t bithenge_new_composed_transform(bithenge_transform_t **out,
     117int bithenge_new_composed_transform(bithenge_transform_t **out,
    118118    bithenge_transform_t **xforms, size_t num)
    119119{
     
    126126        }
    127127
    128         errno_t rc;
     128        int rc;
    129129        compose_transform_t *self = malloc(sizeof(*self));
    130130        if (!self) {
     
    168168}
    169169
    170 static errno_t if_transform_choose(if_transform_t *self, bithenge_scope_t *scope,
     170static int if_transform_choose(if_transform_t *self, bithenge_scope_t *scope,
    171171    bool *out)
    172172{
    173173        bithenge_node_t *cond_node;
    174         errno_t rc = bithenge_expression_evaluate(self->expr, scope, &cond_node);
     174        int rc = bithenge_expression_evaluate(self->expr, scope, &cond_node);
    175175        if (rc != EOK)
    176176                return rc;
     
    184184}
    185185
    186 static errno_t if_transform_apply(bithenge_transform_t *base,
     186static int if_transform_apply(bithenge_transform_t *base,
    187187    bithenge_scope_t *scope, bithenge_node_t *in, bithenge_node_t **out)
    188188{
    189189        if_transform_t *self = transform_as_if(base);
    190190        bool cond;
    191         errno_t rc = if_transform_choose(self, scope, &cond);
     191        int rc = if_transform_choose(self, scope, &cond);
    192192        if (rc != EOK)
    193193                return rc;
     
    196196}
    197197
    198 static errno_t if_transform_prefix_length(bithenge_transform_t *base,
     198static int if_transform_prefix_length(bithenge_transform_t *base,
    199199    bithenge_scope_t *scope, bithenge_blob_t *in, aoff64_t *out)
    200200{
    201201        if_transform_t *self = transform_as_if(base);
    202202        bool cond;
    203         errno_t rc = if_transform_choose(self, scope, &cond);
     203        int rc = if_transform_choose(self, scope, &cond);
    204204        if (rc != EOK)
    205205                return rc;
     
    231231 * @param false_xform The transform to apply if the expression is false.
    232232 * @return EOK on success or an error code from errno.h. */
    233 errno_t bithenge_if_transform(bithenge_transform_t **out,
     233int bithenge_if_transform(bithenge_transform_t **out,
    234234    bithenge_expression_t *expr, bithenge_transform_t *true_xform,
    235235    bithenge_transform_t *false_xform)
    236236{
    237         errno_t rc;
     237        int rc;
    238238        if_transform_t *self = malloc(sizeof(*self));
    239239        if (!self) {
     
    282282}
    283283
    284 static errno_t partial_transform_apply(bithenge_transform_t *base,
     284static int partial_transform_apply(bithenge_transform_t *base,
    285285    bithenge_scope_t *scope, bithenge_node_t *in, bithenge_node_t **out)
    286286{
     
    309309 * @param xform The subtransform to apply.
    310310 * @return EOK on success or an error code from errno.h. */
    311 errno_t bithenge_partial_transform(bithenge_transform_t **out,
     311int bithenge_partial_transform(bithenge_transform_t **out,
    312312    bithenge_transform_t *xform)
    313313{
    314         errno_t rc;
     314        int rc;
    315315        partial_transform_t *self = malloc(sizeof(*self));
    316316        if (!self) {
Note: See TracChangeset for help on using the changeset viewer.