diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-08-24 15:24:16 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-08-24 15:24:16 +0000 |
commit | 728c597690056536a15910fb64a2b6ea104aa975 (patch) | |
tree | 882f9dcd9c5683e673beba0fb85122ffefe027bd | |
parent | 6d4a2e8f5153eefcada061d346aa5d852f2500ee (diff) | |
download | libbu++-728c597690056536a15910fb64a2b6ea104aa975.tar.gz libbu++-728c597690056536a15910fb64a2b6ea104aa975.tar.bz2 libbu++-728c597690056536a15910fb64a2b6ea104aa975.tar.xz libbu++-728c597690056536a15910fb64a2b6ea104aa975.zip |
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.
-rwxr-xr-x | mksvnpkg.sh | 24 | ||||
-rw-r--r-- | src/membuf.cpp | 2 | ||||
-rw-r--r-- | src/stream.h | 6 |
3 files changed, 28 insertions, 4 deletions
diff --git a/mksvnpkg.sh b/mksvnpkg.sh new file mode 100755 index 0000000..cf14d2f --- /dev/null +++ b/mksvnpkg.sh | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | TEMP=$(mktemp) | ||
4 | expand() | ||
5 | { | ||
6 | local DIR="$1" | ||
7 | for fl in $(svn ls "$DIR"); do | ||
8 | if [ ${fl:(-1)} == "/" ]; then | ||
9 | expand "${DIR}${fl}" | ||
10 | else | ||
11 | echo "${DIR}${fl}" >> $TEMP | ||
12 | fi | ||
13 | done | ||
14 | } | ||
15 | |||
16 | echo Building file lists from SVN... | ||
17 | expand ./ | ||
18 | |||
19 | OUTNAME="libbu++-r$(svnversion).tar.bz2" | ||
20 | tar -vcT "${TEMP}" | bzip2 -9 > "$OUTNAME" | ||
21 | |||
22 | rm $TEMP | ||
23 | |||
24 | 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() | |||
113 | 113 | ||
114 | bool Bu::MemBuf::canWrite() | 114 | bool Bu::MemBuf::canWrite() |
115 | { | 115 | { |
116 | return isEos(); | 116 | return true; |
117 | } | 117 | } |
118 | 118 | ||
119 | bool Bu::MemBuf::isReadable() | 119 | 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 | |||
105 | 105 | ||
106 | /** | 106 | /** |
107 | * In non-blocking streams this indicates if a write operation will | 107 | * In non-blocking streams this indicates if a write operation will |
108 | * succeed or fail. In some cases writing is not allowed (e.g. | 108 | * actually write one or more bytes. In some cases writing is not |
109 | * internal buffers are full) temporarilly. In blocking streams this | 109 | * allowed (e.g. internal buffers are full) temporarilly. In blocking |
110 | * should return the same value as isWritable. | 110 | * streams this should return the same value as isWritable. |
111 | */ | 111 | */ |
112 | virtual bool canWrite() = 0; | 112 | virtual bool canWrite() = 0; |
113 | 113 | ||