Real Time Open Sound Control librtosc: /build/rtosc/src/rtosc-0.3.1/include/rtosc/arg-val-cmp.h File Reference

Real Time Open Sound Control librtosc

Loading...
Searching...
No Matches
Functions
arg-val-cmp.h File Reference

Two- and three-way comparison of argument values. More...

`#include <rtosc/rtosc.h>`

Go to the source code of this file.

## Functions
int | rtosc_arg_vals_cmp_has_next (const rtosc_arg_val_itr *litr, const rtosc_arg_val_itr *ritr, size_t lsize, size_t rsize)
int | rtosc_arg_vals_eq_after_abort (const rtosc_arg_val_itr *litr, const rtosc_arg_val_itr *ritr, size_t lsize, size_t rsize)
int | rtosc_arg_vals_eq_single (const rtosc_arg_val_t *_lhs, const rtosc_arg_val_t *_rhs, const rtosc_cmp_options *opt)
int | rtosc_arg_vals_cmp_single (const rtosc_arg_val_t *_lhs, const rtosc_arg_val_t *_rhs, const rtosc_cmp_options *opt)
int | rtosc_arg_vals_eq (const rtosc_arg_val_t *lhs, const rtosc_arg_val_t *rhs, size_t lsize, size_t rsize, const rtosc_cmp_options *opt)
| Check if two arrays of rtosc_arg_val_t are equal.
int | rtosc_arg_vals_cmp (const rtosc_arg_val_t *lhs, const rtosc_arg_val_t *rhs, size_t lsize, size_t rsize, const rtosc_cmp_options *opt)
| Compare two arrays of rtosc_arg_val_t.

## Detailed Description

Two- and three-way comparison of argument values.

Test
  arg-val-cmp.c

## Function Documentation

## ◆ rtosc_arg_vals_cmp()

int rtosc_arg_vals_cmp | ( | const rtosc_arg_val_t * | lhs,
|  | const rtosc_arg_val_t * | rhs,
|  | size_t | lsize,
|  | size_t | rsize,
|  | const rtosc_cmp_options * | opt )

Compare two arrays of rtosc_arg_val_t.

Whether an argument value is less or greater than another is computed

- using memcmp for blobs
- using strcmp for strings and identifiers
- using numerical comparison for all other types. As an exception, the timestamp "immediately" is defined to be smaller than every other timestamp.

Parameters

  opt | Comparison options or NULL for default options
  lsize | Array size of lhs, e.g. 3 if lhs is just one counting range

Returns
  An integer less than, equal to, or greater than zero if lhs is found, respectively, to be less than, to match, or be greater than rhs.

## ◆ rtosc_arg_vals_eq()

int rtosc_arg_vals_eq | ( | const rtosc_arg_val_t * | lhs,
|  | const rtosc_arg_val_t * | rhs,
|  | size_t | lsize,
|  | size_t | rsize,
|  | const rtosc_cmp_options * | opt )

Check if two arrays of rtosc_arg_val_t are equal.

Parameters

  lsize | Array size of lhs, e.g. 3 if lhs is just one counting range
  opt | Comparison options or NULL for default options

Returns
  One if they are equal, zero if not