diff --git a/qse/include/qse/cmn/htb.h b/qse/include/qse/cmn/htb.h index d7d6d094..08de6d8c 100644 --- a/qse/include/qse/cmn/htb.h +++ b/qse/include/qse/cmn/htb.h @@ -40,7 +40,7 @@ * @code * #include * #include - * #include + * #include * * static qse_htb_walk_t walk (qse_htb_t* htb, qse_htb_pair_t* pair, void* ctx) * { @@ -54,6 +54,7 @@ * qse_htb_t* s1; * int i; * + * qse_openstdsios (); * s1 = qse_htb_open (QSE_MMGR_GETDFL(), 0, 30, 75, 1, 1); // error handling skipped * qse_htb_setstyle (s1, qse_gethtbstyle(QSE_HTB_STYLE_INLINE_COPIERS)); * @@ -66,6 +67,7 @@ * qse_htb_walk (s1, walk, QSE_NULL); * * qse_htb_close (s1); + * qse_closestdsios (); * return 0; * } * @endcode @@ -482,6 +484,10 @@ QSE_EXPORT qse_htb_pair_t* qse_htb_update ( * existing value delimited by a comma if the key is found. * * @code + * #include + * #include + * #include + * * qse_htb_walk_t print_map_pair (qse_htb_t* map, qse_htb_pair_t* pair, void* ctx) * { * qse_printf (QSE_T("%.*s[%d] => %.*s[%d]\n"), @@ -512,13 +518,13 @@ QSE_EXPORT qse_htb_pair_t* qse_htb_update ( * // allocate a new pair, but without filling the actual value. * // note vptr is given QSE_NULL for that purpose * new_pair = qse_htb_allocpair ( - * htb, kptr, klen, QSE_NULL, pair->vlen + 1 + v->len); + * htb, kptr, klen, QSE_NULL, QSE_HTB_VLEN(pair) + 1 + v->len); * if (new_pair == QSE_NULL) return QSE_NULL; * * // fill in the value space - * vptr = new_pair->vptr; - * qse_memcpy (vptr, pair->vptr, pair->vlen*QSE_SIZEOF(qse_char_t)); - * vptr += pair->vlen*QSE_SIZEOF(qse_char_t); + * vptr = QSE_HTB_VPTR(new_pair); + * qse_memcpy (vptr, QSE_HTB_VPTR(pair), QSE_HTB_VLEN(pair)*QSE_SIZEOF(qse_char_t)); + * vptr += QSE_HTB_VLEN(pair)*QSE_SIZEOF(qse_char_t); * qse_memcpy (vptr, &comma, QSE_SIZEOF(qse_char_t)); * vptr += QSE_SIZEOF(qse_char_t); * qse_memcpy (vptr, v->ptr, v->len*QSE_SIZEOF(qse_char_t)); @@ -538,11 +544,12 @@ QSE_EXPORT qse_htb_pair_t* qse_htb_update ( * qse_char_t* keys[] = { QSE_T("one"), QSE_T("two"), QSE_T("three") }; * qse_char_t* vals[] = { QSE_T("1"), QSE_T("2"), QSE_T("3"), QSE_T("4"), QSE_T("5") }; * + * qse_openstdsios (); * s1 = qse_htb_open ( * QSE_MMGR_GETDFL(), 0, 10, 70, * QSE_SIZEOF(qse_char_t), QSE_SIZEOF(qse_char_t) * ); // note error check is skipped - * qse_htb_setstyle (s1, &style1); + * qse_htb_setstyle (s1, qse_gethtbstyle(QSE_HTB_STYLE_INLINE_COPIERS)); * * for (i = 0; i < QSE_COUNTOF(vals); i++) * { @@ -556,6 +563,7 @@ QSE_EXPORT qse_htb_pair_t* qse_htb_update ( * qse_htb_walk (s1, print_map_pair, QSE_NULL); * * qse_htb_close (s1); + * qse_closestdsios (); * return 0; * } * @endcode diff --git a/qse/include/qse/si/Makefile.am b/qse/include/qse/si/Makefile.am index d2a0715c..d7b27ceb 100644 --- a/qse/include/qse/si/Makefile.am +++ b/qse/include/qse/si/Makefile.am @@ -1,9 +1,9 @@ -pkgincludedir = $(includedir)/qse/sys +pkgincludedir = $(includedir)/qse/si pkginclude_HEADERS = \ aio.h \ aio-pro.h \ - aio-sck.h + aio-sck.h \ cnd.h \ dir.h \ fio.h \ diff --git a/qse/include/qse/si/Makefile.in b/qse/include/qse/si/Makefile.in index 06a5e078..22f69716 100644 --- a/qse/include/qse/si/Makefile.in +++ b/qse/include/qse/si/Makefile.in @@ -118,8 +118,10 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__pkginclude_HEADERS_DIST = aio.h aio-pro.h aio-sck.h \ - SocketAddress.hpp Socket.hpp +am__pkginclude_HEADERS_DIST = aio.h aio-pro.h aio-sck.h cnd.h dir.h \ + fio.h fs.h glob.h intr.h mtx.h mux.h nwad.h nwif.h nwio.h \ + pio.h rwl.h sck.h sio.h task.h thr.h tio.h SocketAddress.hpp \ + Socket.hpp am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -169,7 +171,7 @@ am__define_uniq_tagged_files = \ ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkgincludedir = $(includedir)/qse/sys +pkgincludedir = $(includedir)/qse/si ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ @@ -345,7 +347,9 @@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -pkginclude_HEADERS = aio.h aio-pro.h aio-sck.h $(am__append_1) +pkginclude_HEADERS = aio.h aio-pro.h aio-sck.h cnd.h dir.h fio.h fs.h \ + glob.h intr.h mtx.h mux.h nwad.h nwif.h nwio.h pio.h rwl.h \ + sck.h sio.h task.h thr.h tio.h $(am__append_1) all: all-am .SUFFIXES: @@ -608,24 +612,6 @@ uninstall-am: uninstall-pkgincludeHEADERS ps ps-am tags tags-am uninstall uninstall-am \ uninstall-pkgincludeHEADERS - cnd.h \ - dir.h \ - fio.h \ - fs.h \ - glob.h \ - intr.h \ - mtx.h \ - mux.h \ - nwad.h \ - nwif.h \ - nwio.h \ - pio.h \ - rwl.h \ - sck.h \ - sio.h \ - task.h \ - thr.h \ - tio.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/qse/lib/cmn/fmt-out.h b/qse/lib/cmn/fmt-out.h index 53ddca68..8710ce91 100644 --- a/qse/lib/cmn/fmt-out.h +++ b/qse/lib/cmn/fmt-out.h @@ -377,7 +377,7 @@ reswitch: case T('c'): /* zerpad must not take effect for 'c' */ - if (flagc & FLAGC_ZEROPAD) padc = QSE_T(' '); + if (flagc & FLAGC_ZEROPAD) padc = T(' '); if (((lm_flag & LF_H) && (QSE_SIZEOF(char_t) > QSE_SIZEOF(ochar_t))) || ((lm_flag & LF_L) && (QSE_SIZEOF(char_t) < QSE_SIZEOF(ochar_t)))) goto uppercase_c; lowercase_c: @@ -399,7 +399,7 @@ reswitch: case T('C'): /* zerpad must not take effect for 'C' */ - if (flagc & FLAGC_ZEROPAD) padc = QSE_T(' '); + if (flagc & FLAGC_ZEROPAD) padc = T(' '); if (((lm_flag & LF_H) && (QSE_SIZEOF(char_t) < QSE_SIZEOF(ochar_t))) || ((lm_flag & LF_L) && (QSE_SIZEOF(char_t) > QSE_SIZEOF(ochar_t)))) goto lowercase_c; uppercase_c: @@ -443,7 +443,7 @@ reswitch: case T('s'): /* zerpad must not take effect for 's' */ - if (flagc & FLAGC_ZEROPAD) padc = QSE_T(' '); + if (flagc & FLAGC_ZEROPAD) padc = T(' '); if (((lm_flag & LF_H) && (QSE_SIZEOF(char_t) > QSE_SIZEOF(ochar_t))) || ((lm_flag & LF_L) && (QSE_SIZEOF(char_t) < QSE_SIZEOF(ochar_t)))) goto uppercase_s; lowercase_s: @@ -475,7 +475,7 @@ reswitch: case T('S'): /* zerpad must not take effect for 'S' */ - if (flagc & FLAGC_ZEROPAD) padc = QSE_T(' '); + if (flagc & FLAGC_ZEROPAD) padc = T(' '); if (((lm_flag & LF_H) && (QSE_SIZEOF(char_t) < QSE_SIZEOF(ochar_t))) || ((lm_flag & LF_L) && (QSE_SIZEOF(char_t) > QSE_SIZEOF(ochar_t)))) goto lowercase_s; uppercase_s: @@ -636,21 +636,21 @@ reswitch: /* compose back the format specifier */ fmtlen = 0; fltfmt.ptr[fmtlen++] = QSE_MT('%'); - if (flagc & FLAGC_SPACE) fltfmt.ptr[fmtlen++] = QSE_T(' '); - if (flagc & FLAGC_SHARP) fltfmt.ptr[fmtlen++] = QSE_T('#'); - if (flagc & FLAGC_SIGN) fltfmt.ptr[fmtlen++] = QSE_T('+'); - if (flagc & FLAGC_LEFTADJ) fltfmt.ptr[fmtlen++] = QSE_T('-'); - if (flagc & FLAGC_ZEROPAD) fltfmt.ptr[fmtlen++] = QSE_T('0'); + if (flagc & FLAGC_SPACE) fltfmt.ptr[fmtlen++] = QSE_MT(' '); + if (flagc & FLAGC_SHARP) fltfmt.ptr[fmtlen++] = QSE_MT('#'); + if (flagc & FLAGC_SIGN) fltfmt.ptr[fmtlen++] = QSE_MT('+'); + if (flagc & FLAGC_LEFTADJ) fltfmt.ptr[fmtlen++] = QSE_MT('-'); + if (flagc & FLAGC_ZEROPAD) fltfmt.ptr[fmtlen++] = QSE_MT('0'); - if (flagc & FLAGC_STAR1) fltfmt.ptr[fmtlen++] = QSE_T('*'); + if (flagc & FLAGC_STAR1) fltfmt.ptr[fmtlen++] = QSE_MT('*'); else if (flagc & FLAGC_WIDTH) { fmtlen += qse_fmtuintmaxtombs ( &fltfmt.ptr[fmtlen], fltfmt.capa - fmtlen, width, 10, -1, QSE_MT('\0'), QSE_NULL); } - if (flagc & FLAGC_DOT) fltfmt.ptr[fmtlen++] = QSE_T('.'); - if (flagc & FLAGC_STAR2) fltfmt.ptr[fmtlen++] = QSE_T('*'); + if (flagc & FLAGC_DOT) fltfmt.ptr[fmtlen++] = QSE_MT('.'); + if (flagc & FLAGC_STAR2) fltfmt.ptr[fmtlen++] = QSE_MT('*'); else if (flagc & FLAGC_PRECISION) { fmtlen += qse_fmtuintmaxtombs (