Changes in uspace/lib/bithenge/src/expression.c [1433ecda:7c3fb9b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/bithenge/src/expression.c
r1433ecda r7c3fb9b 47 47 * @param[out] self Expression to initialize. 48 48 * @param[in] ops Operations provided by the expression. 49 * @return EOK or an error code from errno.h. */ 49 * @return EOK or an error code from errno.h. 50 */ 50 51 errno_t bithenge_init_expression(bithenge_expression_t *self, 51 52 const bithenge_expression_ops_t *ops) … … 156 157 break; 157 158 case BITHENGE_EXPRESSION_INTEGER_DIVIDE: 158 /* Integer division can behave in three major ways when the 159 operands are signed: truncated, floored, or Euclidean. When 159 /* 160 * Integer division can behave in three major ways when the 161 * operands are signed: truncated, floored, or Euclidean. When 160 162 * b > 0, we give the same result as floored and Euclidean; 161 163 * otherwise, we currently raise an error. See 162 164 * https://en.wikipedia.org/wiki/Modulo_operation and its 163 * references. */ 165 * references. 166 */ 164 167 if (b_int <= 0) { 165 168 rc = EINVAL; … … 249 252 * @param a The first operand. 250 253 * @param b The second operand. 251 * @return EOK on success or an error code from errno.h. */ 254 * @return EOK on success or an error code from errno.h. 255 */ 252 256 errno_t bithenge_binary_expression(bithenge_expression_t **out, 253 257 bithenge_binary_op_t op, bithenge_expression_t *a, … … 305 309 /** Create an expression that gets the current input node. 306 310 * @param[out] out Holds the new expression. 307 * @return EOK on success or an error code from errno.h. */ 311 * @return EOK on success or an error code from errno.h. 312 */ 308 313 errno_t bithenge_in_node_expression(bithenge_expression_t **out) 309 314 { … … 339 344 /** Create an expression that gets the current node being created. 340 345 * @param[out] out Holds the new expression. 341 * @return EOK on success or an error code from errno.h. */ 346 * @return EOK on success or an error code from errno.h. 347 */ 342 348 errno_t bithenge_current_node_expression(bithenge_expression_t **out) 343 349 { … … 389 395 * @param[out] out Holds the created expression. 390 396 * @param index The index of the parameter to get. 391 * @return EOK on success or an error code from errno.h. */ 397 * @return EOK on success or an error code from errno.h. 398 */ 392 399 errno_t bithenge_param_expression(bithenge_expression_t **out, int index) 393 400 { … … 454 461 * @param[out] out Holds the created expression. 455 462 * @param node The constant. 456 * @return EOK on success or an error code from errno.h. */ 463 * @return EOK on success or an error code from errno.h. 464 */ 457 465 errno_t bithenge_const_expression(bithenge_expression_t **out, 458 466 bithenge_node_t *node) … … 536 544 * @param[out] out Holds the new expression. 537 545 * @param key The key to search for in nodes being created. 538 * @return EOK on success or an error code from errno.h. */ 546 * @return EOK on success or an error code from errno.h. 547 */ 539 548 errno_t bithenge_scope_member_expression(bithenge_expression_t **out, 540 549 bithenge_node_t *key) … … 657 666 * @param absolute_limit If true, the limit is an absolute offset; otherwise, 658 667 * it is relative to the start. 659 * @return EOK on success or an error code from errno.h. */ 668 * @return EOK on success or an error code from errno.h. 669 */ 660 670 errno_t bithenge_subblob_expression(bithenge_expression_t **out, 661 671 bithenge_expression_t *blob, bithenge_expression_t *start, … … 815 825 * @param transform The transform for which parameters are calculated. 816 826 * @param params The expressions used to calculate the parameters. 817 * @return EOK on success or an error code from errno.h. */ 827 * @return EOK on success or an error code from errno.h. 828 */ 818 829 errno_t bithenge_param_wrapper(bithenge_transform_t **out, 819 830 bithenge_transform_t *transform, bithenge_expression_t **params) … … 899 910 * @param[out] out Holds the new transform. 900 911 * @param expr The expression to evaluate. 901 * @return EOK on success or an error code from errno.h. */ 912 * @return EOK on success or an error code from errno.h. 913 */ 902 914 errno_t bithenge_expression_transform(bithenge_transform_t **out, 903 915 bithenge_expression_t *expr) … … 956 968 * @param[out] out Holds the new transform. 957 969 * @param expr The expression to evaluate. 958 * @return EOK on success or an error code from errno.h. */ 970 * @return EOK on success or an error code from errno.h. 971 */ 959 972 errno_t bithenge_inputless_transform(bithenge_transform_t **out, 960 973 bithenge_expression_t *expr) … … 1117 1130 * @param a The first blob. 1118 1131 * @param b The second blob. 1119 * @return EOK on success or an error code from errno.h. */ 1132 * @return EOK on success or an error code from errno.h. 1133 */ 1120 1134 errno_t bithenge_concat_blob(bithenge_node_t **out, bithenge_blob_t *a, 1121 1135 bithenge_blob_t *b) … … 1159 1173 * @param b_expr An expression to calculate the second blob. 1160 1174 * @param scope The scope in which @a b_expr should be evaluated. 1161 * @return EOK on success or an error code from errno.h. */ 1175 * @return EOK on success or an error code from errno.h. 1176 */ 1162 1177 errno_t bithenge_concat_blob_lazy(bithenge_node_t **out, bithenge_blob_t *a, 1163 1178 bithenge_expression_t *b_expr, bithenge_scope_t *scope)
Note:
See TracChangeset
for help on using the changeset viewer.