Changeset 03cad47 in mainline for uspace/app/bithenge/transform.c
- Timestamp:
- 2012-07-28T00:20:31Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4056ad0
- Parents:
- 6e34bd0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bithenge/transform.c
r6e34bd0 r03cad47 44 44 * @param[out] self Transform to initialize. 45 45 * @param[in] ops Operations provided by the transform. 46 * @param num_params The number of parameters required. If this is nonzero, the 47 * transform will get its own context with parameters, probably provided by a 48 * param_wrapper. If this is zero, the existing outer context will be used with 49 * whatever parameters it has. 46 50 * @return EOK or an error code from errno.h. */ 47 51 int bithenge_init_transform(bithenge_transform_t *self, 48 const bithenge_transform_ops_t *ops )52 const bithenge_transform_ops_t *ops, int num_params) 49 53 { 50 54 assert(ops); … … 53 57 self->ops = ops; 54 58 self->refs = 1; 59 self->num_params = num_params; 55 60 return EOK; 56 61 } … … 99 104 /** The ASCII text transform. */ 100 105 bithenge_transform_t bithenge_ascii_transform = { 101 &ascii_ops, 1 106 &ascii_ops, 1, 0 102 107 }; 103 108 … … 159 164 \ 160 165 bithenge_transform_t bithenge_##NAME##_transform = { \ 161 &NAME##_ops, 1 166 &NAME##_ops, 1, 0 \ 162 167 } 163 168 … … 222 227 /** The zero-terminated data transform. */ 223 228 bithenge_transform_t bithenge_zero_terminated_transform = { 224 &zero_terminated_ops, 1 229 &zero_terminated_ops, 1, 0 225 230 }; 226 231 … … 480 485 } 481 486 rc = bithenge_init_transform(struct_as_transform(self), 482 &struct_transform_ops );487 &struct_transform_ops, 0); 483 488 if (rc != EOK) 484 489 goto error; … … 579 584 } 580 585 rc = bithenge_init_transform(compose_as_transform(self), 581 &compose_transform_ops );586 &compose_transform_ops, 0); 582 587 if (rc != EOK) 583 588 goto error;
Note:
See TracChangeset
for help on using the changeset viewer.