LIBUCW_MODS= \
threads \
alloc alloc_str realloc bigalloc mempool mempool-str mempool-fmt eltpool \
- mmap partmap hashfunc \
+ partmap hashfunc \
slists simple-lists bitsig \
- log log-stream log-file log-syslog log-conf proctitle tbf \
+ log log-stream log-file log-syslog log-conf tbf \
conf-alloc conf-dump conf-input conf-intr conf-journal conf-parse conf-section \
ipaccess \
- profile \
fastbuf ff-binary ff-string ff-printf ff-unicode ff-stkstring \
- fb-file carefulio fb-mem fb-temp tempfile fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \
+ fb-file fb-mem fb-temp tempfile fb-mmap fb-limfd fb-buffer fb-grow fb-pool fb-atomic fb-param fb-socket \
char-cat char-upper char-lower unicode stkstring \
wildmatch regex \
- prime primetable random timer randomkey \
+ prime primetable random timer \
bit-ffs bit-fls \
url \
- mainloop main-block \
- exitstatus runcmd sighandler \
- lizard lizard-safe adler32 \
+ mainloop main-block main-rec \
+ proctitle exitstatus runcmd \
+ lizard lizard-safe adler32 sighandler \
md5 sha1 sha1-hmac \
base64 base224 \
- sync \
- qache \
+ io-careful io-sync io-mmap io-size \
- string str-esc str-split str-match str-imatch str-hex \
+ string str-esc str-split str-match str-imatch str-hex str-fix \
bbuf gary \
getopt \
- strtonum
+ strtonum \
+ resource trans res-fd res-mem res-subpool res-mempool res-eltpool
LIBUCW_MAIN_INCLUDES= \
lib.h log.h threads.h \
prime.h \
bitops.h \
conf.h getopt.h ipaccess.h \
- profile.h \
- fastbuf.h lfs.h ff-unicode.h ff-binary.h \
+ fastbuf.h io.h ff-unicode.h ff-binary.h \
url.h \
mainloop.h \
- lizard.h \
- md5.h \
+ process.h \
+ lizard.h sighandler.h \
+ md5.h sha1.h \
base64.h base224.h \
- qache.h \
kmp.h kmp-search.h binsearch.h \
partmap.h \
- strtonum.h
+ strtonum.h \
+ resource.h trans.h
ifdef CONFIG_UCW_THREADS
# Some modules require threading
uns strnlen(const char *str, uns n);
#endif
+ /**
+ * Format a set of flag bits. When the i-th bit of @flags is 1,
+ * set the i-th character of @dest to @fmt[i], otherwise to '-'.
+ **/
char *str_format_flags(char *dest, const char *fmt, uns flags);
+
+ /** Counts occurrences of @chr in @str. **/
uns str_count_char(const char *str, uns chr);
+/** Returns a non-zero value if @haystack starts with @needle. **/
+int str_starts_with(const char *haystack, const char *needle);
+
+/** Returns a non-zero value if @haystack ends with @needle. **/
+int str_ends_with(const char *haystack, const char *needle);
+
/* str-esc.c */
+ /**
+ * Decode a string with backslash escape sequences as in C99 strings.
+ * It is safe to pass @dest equal to @src.
+ **/
char *str_unesc(char *dest, const char *src);
/* str-split.c */