Changes in uspace/lib/bithenge/src/compound.c [b7fd2a0:6cd10ac] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/bithenge/src/compound.c
rb7fd2a0 r6cd10ac 62 62 } 63 63 64 static errno_t compose_apply(bithenge_transform_t *base, bithenge_scope_t *scope,64 static int compose_apply(bithenge_transform_t *base, bithenge_scope_t *scope, 65 65 bithenge_node_t *in, bithenge_node_t **out) 66 66 { 67 errno_t rc;67 int rc; 68 68 compose_transform_t *self = transform_as_compose(base); 69 69 bithenge_node_inc_ref(in); … … 81 81 82 82 *out = in; 83 return EOK;84 } 85 86 static errno_t compose_prefix_length(bithenge_transform_t *base,83 return rc; 84 } 85 86 static int compose_prefix_length(bithenge_transform_t *base, 87 87 bithenge_scope_t *scope, bithenge_blob_t *blob, aoff64_t *out) 88 88 { … … 115 115 * @param num The number of transforms. 116 116 * @return EOK on success or an error code from errno.h. */ 117 errno_t bithenge_new_composed_transform(bithenge_transform_t **out,117 int bithenge_new_composed_transform(bithenge_transform_t **out, 118 118 bithenge_transform_t **xforms, size_t num) 119 119 { … … 126 126 } 127 127 128 errno_t rc;128 int rc; 129 129 compose_transform_t *self = malloc(sizeof(*self)); 130 130 if (!self) { … … 168 168 } 169 169 170 static errno_t if_transform_choose(if_transform_t *self, bithenge_scope_t *scope,170 static int if_transform_choose(if_transform_t *self, bithenge_scope_t *scope, 171 171 bool *out) 172 172 { 173 173 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); 175 175 if (rc != EOK) 176 176 return rc; … … 184 184 } 185 185 186 static errno_t if_transform_apply(bithenge_transform_t *base,186 static int if_transform_apply(bithenge_transform_t *base, 187 187 bithenge_scope_t *scope, bithenge_node_t *in, bithenge_node_t **out) 188 188 { 189 189 if_transform_t *self = transform_as_if(base); 190 190 bool cond; 191 errno_t rc = if_transform_choose(self, scope, &cond);191 int rc = if_transform_choose(self, scope, &cond); 192 192 if (rc != EOK) 193 193 return rc; … … 196 196 } 197 197 198 static errno_t if_transform_prefix_length(bithenge_transform_t *base,198 static int if_transform_prefix_length(bithenge_transform_t *base, 199 199 bithenge_scope_t *scope, bithenge_blob_t *in, aoff64_t *out) 200 200 { 201 201 if_transform_t *self = transform_as_if(base); 202 202 bool cond; 203 errno_t rc = if_transform_choose(self, scope, &cond);203 int rc = if_transform_choose(self, scope, &cond); 204 204 if (rc != EOK) 205 205 return rc; … … 231 231 * @param false_xform The transform to apply if the expression is false. 232 232 * @return EOK on success or an error code from errno.h. */ 233 errno_t bithenge_if_transform(bithenge_transform_t **out,233 int bithenge_if_transform(bithenge_transform_t **out, 234 234 bithenge_expression_t *expr, bithenge_transform_t *true_xform, 235 235 bithenge_transform_t *false_xform) 236 236 { 237 errno_t rc;237 int rc; 238 238 if_transform_t *self = malloc(sizeof(*self)); 239 239 if (!self) { … … 282 282 } 283 283 284 static errno_t partial_transform_apply(bithenge_transform_t *base,284 static int partial_transform_apply(bithenge_transform_t *base, 285 285 bithenge_scope_t *scope, bithenge_node_t *in, bithenge_node_t **out) 286 286 { … … 309 309 * @param xform The subtransform to apply. 310 310 * @return EOK on success or an error code from errno.h. */ 311 errno_t bithenge_partial_transform(bithenge_transform_t **out,311 int bithenge_partial_transform(bithenge_transform_t **out, 312 312 bithenge_transform_t *xform) 313 313 { 314 errno_t rc;314 int rc; 315 315 partial_transform_t *self = malloc(sizeof(*self)); 316 316 if (!self) {
Note:
See TracChangeset
for help on using the changeset viewer.