]> mj.ucw.cz Git - libucw.git/commitdiff
Merge branch 'dev-trans'
authorMartin Mares <mj@ucw.cz>
Sat, 11 Feb 2012 11:20:31 +0000 (12:20 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 11 Feb 2012 11:20:31 +0000 (12:20 +0100)
Conflicts:
ucw/Makefile
ucw/string.h

1  2 
ucw/Makefile
ucw/doc/index.txt
ucw/fb-atomic.c
ucw/fb-direct.c
ucw/fb-file.c
ucw/fb-mmap.c
ucw/fb-param.c
ucw/lib.h
ucw/string.h
ucw/threads.h

diff --cc ucw/Makefile
index 1778ee847e1054b21eaefdeeba4dfa5fc4aff8a1,15e56870a0a8c2e821be77297bca77913546b891..145792aad817ace3430a4ecb16c176ea623f3495
@@@ -10,28 -10,31 +10,29 @@@ endi
  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
Simple merge
diff --cc ucw/fb-atomic.c
index 8b4544858327da99991c19a19042976c31f9118e,227e324cb929bb0dbc21d47bf2b77fd7533dbba1..aef0018ac03ddaeca722b5a5594348de96139ada
@@@ -9,8 -9,9 +9,9 @@@
  
  #include "ucw/lib.h"
  #include "ucw/fastbuf.h"
 -#include "ucw/lfs.h"
 +#include "ucw/io.h"
  #include "ucw/conf.h"
+ #include "ucw/trans.h"
  
  #include <string.h>
  #include <fcntl.h>
diff --cc ucw/fb-direct.c
Simple merge
diff --cc ucw/fb-file.c
Simple merge
diff --cc ucw/fb-mmap.c
Simple merge
diff --cc ucw/fb-param.c
index 528765cb01ae5950909273cf1687a7561cded4c2,e59444cbde876cf440dc3f4a263e3b89f9ded0f8..e8d035b22e39b022fd660e653554c187dab8f3ae
@@@ -10,8 -10,9 +10,9 @@@
  
  #include "ucw/lib.h"
  #include "ucw/conf.h"
 -#include "ucw/lfs.h"
 +#include "ucw/io.h"
  #include "ucw/fastbuf.h"
+ #include "ucw/trans.h"
  
  #include <fcntl.h>
  #include <stdio.h>
diff --cc ucw/lib.h
Simple merge
diff --cc ucw/string.h
index 8cfe164501060d5aee8482a3d9fb0f85bf211e8e,b5faa9ac2afcd7cec12ea155f803d656cebd691f..8ec579c7d3c382c1a8ceb6d25b3204f4987fd07b
  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 */
diff --cc ucw/threads.h
Simple merge