From 728c597690056536a15910fb64a2b6ea104aa975 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 24 Aug 2009 15:24:16 +0000 Subject: Fixed a minor helper in Bu::MemBuf, and corrected some docs on Bu::Stream, the synopsis line made the canWrite function misleading. I also addad a script that could actually be used for any project, it builds a tarball release of all the files that are in SVN, so it will skip object code and the like. --- mksvnpkg.sh | 24 ++++++++++++++++++++++++ src/membuf.cpp | 2 +- src/stream.h | 6 +++--- 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100755 mksvnpkg.sh diff --git a/mksvnpkg.sh b/mksvnpkg.sh new file mode 100755 index 0000000..cf14d2f --- /dev/null +++ b/mksvnpkg.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +TEMP=$(mktemp) +expand() +{ + local DIR="$1" + for fl in $(svn ls "$DIR"); do + if [ ${fl:(-1)} == "/" ]; then + expand "${DIR}${fl}" + else + echo "${DIR}${fl}" >> $TEMP + fi + done +} + +echo Building file lists from SVN... +expand ./ + +OUTNAME="libbu++-r$(svnversion).tar.bz2" +tar -vcT "${TEMP}" | bzip2 -9 > "$OUTNAME" + +rm $TEMP + +echo Produced "$OUTNAME" diff --git a/src/membuf.cpp b/src/membuf.cpp index 11cc1bb..35580d3 100644 --- a/src/membuf.cpp +++ b/src/membuf.cpp @@ -113,7 +113,7 @@ bool Bu::MemBuf::canRead() bool Bu::MemBuf::canWrite() { - return isEos(); + return true; } bool Bu::MemBuf::isReadable() diff --git a/src/stream.h b/src/stream.h index d6b914c..f0f1af3 100644 --- a/src/stream.h +++ b/src/stream.h @@ -105,9 +105,9 @@ namespace Bu /** * In non-blocking streams this indicates if a write operation will - * succeed or fail. In some cases writing is not allowed (e.g. - * internal buffers are full) temporarilly. In blocking streams this - * should return the same value as isWritable. + * actually write one or more bytes. In some cases writing is not + * allowed (e.g. internal buffers are full) temporarilly. In blocking + * streams this should return the same value as isWritable. */ virtual bool canWrite() = 0; -- cgit v1.2.3