X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fdoc%2Ffastbuf.txt;h=86ab55d923dba0b55026c31489b4e050d4e9dfc9;hb=a45646a634b71708f5bc4277868c60e80daaa84c;hp=a31b6bc3b8fcef779b8a178619b4c97362dc4171;hpb=52a9ce22c23f7a61573db7bf30e58495da381952;p=libucw.git diff --git a/ucw/doc/fastbuf.txt b/ucw/doc/fastbuf.txt index a31b6bc3..86ab55d9 100644 --- a/ucw/doc/fastbuf.txt +++ b/ucw/doc/fastbuf.txt @@ -13,28 +13,34 @@ Once you have a fastbuf, you can access it by fuctions similar to those of formatted operations. Please keep in mind that fastbufs do not allow arbitrary mixing of reads and -writes on the same stream. If you need to mix them, you have to call bflush() -inbetween and remember that the file position reported by btell() points after +writes on the same stream. If you need to mix them, you have to call @bflush() +inbetween and remember that the file position reported by @btell() points after the flushed buffer, which is not necessarily the same as after the data you've really read. +Most fastbuf back-ends also participate in the libucw resource management system. +If you have a resource pool active, newly created fastbufs are automatically tied +to resources in the pool, so when the pool gets cleaned up, the fastbufs are +freed, too. The bclose() function is still available and it removes the tie +as needed. + .Back-ends: -- xref:fbparam[Files (parametrized)] -- xref:fbfile[Regular files] -- xref:fbtemp[Temporary files] -- xref:fblim[File fragments] -- xref:fbmem[In-memory streams] -- xref:fbbuf[Buffers] -- xref:fbgrow[Growing buffers] -- xref:fbpool[Memory pools] -- xref:fbatomic[Atomic files] +- <> +- <> +- <> +- <> +- <> +- <> +- <> +- <> +- <> .Front-ends: -- xref:ffbasic[Basic functions] +- <> .Other reading: -- xref:internal[Internal structure] -- xref:bconfig[Configuring streams] +- <> +- <> ucw/fastbuf.h ------------- @@ -53,11 +59,11 @@ ucw/ff-unicode.h Reading and writing of unicode characters. -Invalid codes are replaced by +UNI_REPLACEMENT+ when reading. +Invalid codes are replaced by `UNI_REPLACEMENT` when reading. !!ucw/ff-unicode.h ucw/ff-binary.h --------------- -Reading and writing of binary values. +!!ucw/ff-binary.h