diff options
| author | Tyge Løvset <[email protected]> | 2022-12-11 10:52:32 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-12-11 10:52:32 +0100 |
| commit | 0db528ed0062920e9bd5b2c7fcdc7506bd41abad (patch) | |
| tree | 217b0c6b36964b84bac423bfc6a6c3333c0cd83d /src | |
| parent | f500cd5301433015e7860ea4446e81db29c9369e (diff) | |
| parent | 3b616b5260f2f477563508b6eec5370506565da9 (diff) | |
| download | STC-modified-0db528ed0062920e9bd5b2c7fcdc7506bd41abad.tar.gz STC-modified-0db528ed0062920e9bd5b2c7fcdc7506bd41abad.zip | |
Merge branch 'master' of github.com:tylov/STC
Diffstat (limited to 'src')
| -rw-r--r-- | src/cregex.c | 6 | ||||
| -rw-r--r-- | src/libstc.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cregex.c b/src/cregex.c index 444843bf..41c3aaf8 100644 --- a/src/cregex.c +++ b/src/cregex.c @@ -1254,11 +1254,11 @@ cregex_replace_sv(const cregex* re, csview input, const char* replace, unsigned } cstr -cregex_replace_pattern(const char* pattern, const char* input, const char* replace, unsigned count, - bool (*mfun)(int, csview, cstr*), int crflags) { +cregex_replace_pattern_n(const char* pattern, const char* input, const char* replace, unsigned count, + bool (*mfun)(int, csview, cstr*), int crflags) { cregex re = cregex_init(); if (cregex_compile(&re, pattern, crflags) != cre_success) - return cstr_new("[[error: invalid regex pattern]]"); + assert(0); csview sv = {input, strlen(input)}; cstr out = cregex_replace_sv(&re, sv, replace, count, mfun, crflags); cregex_drop(&re); diff --git a/src/libstc.c b/src/libstc.c index 30c610c6..e8980a7a 100644 --- a/src/libstc.c +++ b/src/libstc.c @@ -1,11 +1,11 @@ -#define STC_EXTERN // implement common extern, non-templated functions, e.g. _clist_mergesort(). -#define STC_HEADER // don't implement clist_int itself, just dummy declare it. +#define STC_EXTERN // implement common extern, non-templated functions and dependencies. #define i_val int +#define i_header // don't implement clist_int itself, just dummy declare it. #include "../include/stc/clist.h" #define STC_IMPLEMENT // implement the following. -#include "../include/stc/cstr.h" +#include "../include/stc/cregex.h" #include "../include/stc/csview.h" -#include "../include/stc/crandom.h" +//#include "../include/stc/crandom.h" |
