#include <rtosc/rtosc.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <stdio.h>
Go to the source code of this file.
|
| static bool | rtosc_match_number (const char **pattern, const char **msg) |
| const char * | rtosc_match_options (const char *pattern, const char **msg) |
| const char * | rtosc_match_path (const char *pattern, const char *msg, const char **path_end) |
| static bool | rtosc_match_args (const char *pattern, const char *msg) |
| bool | rtosc_match (const char *pattern, const char *msg, const char **path_end) |
| static bool | is_charwise (uint8_t c) |
| int | rtosc_subpath_pat_type (const char *pattern) |
| static bool | rtosc_match_char (const char **path, const char **pattern) |
| bool | rtosc_match_partial (const char *a, const char *b) |
| int | rtosc_matchable_path (const char *pattern) |
| int | chunk_path (const char *a, int b, const char *c) |
| void | advance_path (const char **a) |
| bool | rtosc_match_full_path (const char *pattern, const char *message) |
◆ RTOSC_MATCH_ALL
| #define RTOSC_MATCH_ALL 1 |
◆ RTOSC_MATCH_CHAR
| #define RTOSC_MATCH_CHAR 2 |
◆ RTOSC_MATCH_ENUMERATED
| #define RTOSC_MATCH_ENUMERATED 7 |
◆ RTOSC_MATCH_OPTIONS
| #define RTOSC_MATCH_OPTIONS 5 |
◆ RTOSC_MATCH_PARTIAL_CHAR
| #define RTOSC_MATCH_PARTIAL_CHAR 3 |
◆ RTOSC_MATCH_PARTIAL_OPTIONS
| #define RTOSC_MATCH_PARTIAL_OPTIONS 6 |
◆ RTOSC_MATCH_SUBSTRING
| #define RTOSC_MATCH_SUBSTRING 4 |
◆ advance_path()
◆ chunk_path()
◆ is_charwise()
◆ rtosc_match()
| bool rtosc_match |
( |
const char * | pattern, |
|
|
const char * | msg, |
|
|
const char ** | path_end ) |
This is a non-compliant pattern matcher for dispatching OSC messages
Overall the pattern specification is (normal-path)(#digit-specifier)?(/)?(:argument-restrictor)*
- Parameters
-
| pattern | The pattern string stored in the Port |
| msg | The OSC message to be matched |
| path_end | if non-NULL, will point to where parsing stopped in the path (in case of a match, *path_end is always '/' or '\0') |
- Returns
- true if a normal match and false if unmatched
◆ rtosc_match_args()
| bool rtosc_match_args |
( |
const char * | pattern, |
|
|
const char * | msg ) |
|
static |
◆ rtosc_match_char()
| bool rtosc_match_char |
( |
const char ** | path, |
|
|
const char ** | pattern ) |
|
static |
◆ rtosc_match_full_path()
| bool rtosc_match_full_path |
( |
const char * | pattern, |
|
|
const char * | message ) |
◆ rtosc_match_number()
| bool rtosc_match_number |
( |
const char ** | pattern, |
|
|
const char ** | msg ) |
|
static |
◆ rtosc_match_options()
| const char * rtosc_match_options |
( |
const char * | pattern, |
|
|
const char ** | msg ) |
◆ rtosc_match_partial()
| bool rtosc_match_partial |
( |
const char * | a, |
|
|
const char * | b ) |
◆ rtosc_match_path()
Attempt to match a rtosc style path while ignoring arguments
- Parameters
-
| pattern | rtosc pattern |
| msg | a normal C string or a rtosc message |
| path_end | if non-NULL, will point to where parsing stopped in the path (in case of a match, *path_end is always '/' or '\0') |
◆ rtosc_matchable_path()
| int rtosc_matchable_path |
( |
const char * | pattern | ) |
|
◆ rtosc_subpath_pat_type()
| int rtosc_subpath_pat_type |
( |
const char * | pattern | ) |
|