sus-regex/amogus.h

15 lines
377 B
C
Raw Normal View History

2024-04-04 20:18:10 +03:00
// int entry(...)
//
// Parse regex. Find matching string.
// If found:
// call callback(
2024-04-08 03:25:15 +03:00
// matched string (only valid until callback return),
2024-04-04 20:18:10 +03:00
// length of the string including NUL delimiter,
// )
// return 0
// Else:
2024-04-08 03:25:15 +03:00
// return ERR
2024-04-04 20:18:10 +03:00
2024-04-08 03:25:15 +03:00
typedef void(entry_callback)(char *match, int size, void *data);
int entry(char *regex, entry_callback *callback, void *data);