diff -r mbuffer-20010626/CHANGES mbuffer-20010628/CHANGES 0a1,10 > 20010628: > - added Option -d to use blocksize of output device > for write (was default behaviour, but isn't needed > in most cases and slows data transfer down) > - changed statusline (proposal by Dan Hollis) > - minor bugfix for handling read errors (size of > writable block fragment is now set correctly) > [probably nobody ever cares anyway] > - updates for experimental networking (configure) > diff -r mbuffer-20010626/configure mbuffer-20010628/configure 648c648 < VERSION=20010626 --- > VERSION=20010628 1852a1853,1977 > > echo $ac_n "checking for library containing socket""... $ac_c" 1>&6 > echo "configure:1856: checking for library containing socket" >&5 > if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then > echo $ac_n "(cached) $ac_c" 1>&6 > else > ac_func_search_save_LIBS="$LIBS" > ac_cv_search_socket="no" > cat > conftest.$ac_ext < #line 1863 "configure" > #include "confdefs.h" > /* Override any gcc2 internal prototype to avoid an error. */ > /* We use char because int might match the return type of a gcc2 > builtin and then its argument prototype would still apply. */ > char socket(); > > int main() { > socket() > ; return 0; } > EOF > if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then > rm -rf conftest* > ac_cv_search_socket="none required" > else > echo "configure: failed program was:" >&5 > cat conftest.$ac_ext >&5 > fi > rm -f conftest* > test "$ac_cv_search_socket" = "no" && for i in socket; do > LIBS="-l$i $ac_func_search_save_LIBS" > cat > conftest.$ac_ext < #line 1885 "configure" > #include "confdefs.h" > /* Override any gcc2 internal prototype to avoid an error. */ > /* We use char because int might match the return type of a gcc2 > builtin and then its argument prototype would still apply. */ > char socket(); > > int main() { > socket() > ; return 0; } > EOF > if { (eval echo configure:1896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then > rm -rf conftest* > ac_cv_search_socket="-l$i" > break > else > echo "configure: failed program was:" >&5 > cat conftest.$ac_ext >&5 > fi > rm -f conftest* > done > LIBS="$ac_func_search_save_LIBS" > fi > > echo "$ac_t""$ac_cv_search_socket" 1>&6 > if test "$ac_cv_search_socket" != "no"; then > test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS" > > else : > { echo "configure: error: could not find the library containing network functions!" 1>&2; exit 1; } > fi > > echo $ac_n "checking for library containing inet_pton""... $ac_c" 1>&6 > echo "configure:1918: checking for library containing inet_pton" >&5 > if eval "test \"`echo '$''{'ac_cv_search_inet_pton'+set}'`\" = set"; then > echo $ac_n "(cached) $ac_c" 1>&6 > else > ac_func_search_save_LIBS="$LIBS" > ac_cv_search_inet_pton="no" > cat > conftest.$ac_ext < #line 1925 "configure" > #include "confdefs.h" > /* Override any gcc2 internal prototype to avoid an error. */ > /* We use char because int might match the return type of a gcc2 > builtin and then its argument prototype would still apply. */ > char inet_pton(); > > int main() { > inet_pton() > ; return 0; } > EOF > if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then > rm -rf conftest* > ac_cv_search_inet_pton="none required" > else > echo "configure: failed program was:" >&5 > cat conftest.$ac_ext >&5 > fi > rm -f conftest* > test "$ac_cv_search_inet_pton" = "no" && for i in nsl; do > LIBS="-l$i $ac_func_search_save_LIBS" > cat > conftest.$ac_ext < #line 1947 "configure" > #include "confdefs.h" > /* Override any gcc2 internal prototype to avoid an error. */ > /* We use char because int might match the return type of a gcc2 > builtin and then its argument prototype would still apply. */ > char inet_pton(); > > int main() { > inet_pton() > ; return 0; } > EOF > if { (eval echo configure:1958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then > rm -rf conftest* > ac_cv_search_inet_pton="-l$i" > break > else > echo "configure: failed program was:" >&5 > cat conftest.$ac_ext >&5 > fi > rm -f conftest* > done > LIBS="$ac_func_search_save_LIBS" > fi > > echo "$ac_t""$ac_cv_search_inet_pton" 1>&6 > if test "$ac_cv_search_inet_pton" != "no"; then > test "$ac_cv_search_inet_pton" = "none required" || LIBS="$ac_cv_search_inet_pton $LIBS" > > else : > { echo "configure: error: could not find the library containing name convertion functions!" 1>&2; exit 1; } > fi > diff -r mbuffer-20010626/configure.in mbuffer-20010628/configure.in 12c12 < VERSION=20010626 --- > VERSION=20010628 74,75c74,79 < AC_DEFINE_UNQUOTED(EXPERIMENTAL), < ) --- > AC_DEFINE_UNQUOTED(EXPERIMENTAL) > AC_SEARCH_LIBS(socket,socket,, > AC_MSG_ERROR(could not find the library containing network functions!)) > AC_SEARCH_LIBS(inet_pton,nsl,, > AC_MSG_ERROR(could not find the library containing name convertion functions!)) > ,) diff -r mbuffer-20010626/mbuffer.1.in mbuffer-20010628/mbuffer.1.in 43a44,46 > .TP > \fB\-d\fR > use blocksize of device for output (needed for some devices) diff -r mbuffer-20010626/mbuffer.c mbuffer-20010628/mbuffer.c 170c170 < fprintf(Terminal,"\rin at %8.1f kB/sec - out at %8.1f kB/sec - %Lu kB totally transfered - buffer %3.0f%% full",in,out,total,fill); --- > fprintf(Terminal,"\r%8.1f kB/s in - %8.1f kB/s out - %Lu kB total - buffer %3.0f%% full",in,out,total,fill); 194a195 > debugmsg("requesting new volume for input\n"); 197c198 < fprintf(Terminal,"\ninsert next volume..."); --- > fprintf(Terminal,"\ninsert next volume and press return to continue..."); 205a207 > fflush(Terminal); 229c231,234 < sem_post(&Buf2Dev); --- > if (num) { > Rest = num; > sem_post(&Buf2Dev); > } 313c318 < /* use Outsize which is the blocksize of the device */ --- > /* use Outsize which could be the blocksize of the device (option -d) */ 348d352 < 411d414 < 433a437,439 > #ifdef HAVE_ST_BLKSIZE > "-d : use blocksize of device for output\n" > #endif 502a509 > int setOutsize = 0; 523a531,535 > #ifdef HAVE_ST_BLKSIZE > } else if (!argcheck("-d",argv,&c)) { > setOutsize = 1; > debugmsg("setting output size according to the blocksize of the device\n"); > #endif 686,698c698,712 < debugmsg("checking blocksize for output...\n"); < if (-1 == fstat(Out,&st)) < fatal("could not stat output: %s\n",strerror(errno)); < if ((st.st_mode & S_IFBLK) || (st.st_mode & S_IFCHR)) { < infomsg("blocksize on output device is %i\n",st.st_blksize); < if (Blocksize%st.st_blksize != 0) < warningmsg("Blocksize should be a multiple of the blocksize of the output device (is %i)!\n",st.st_blksize); < if (Blocksize > st.st_blksize) { < infomsg("setting output blocksize to %i\n",st.st_blksize); < Outsize = st.st_blksize; < } < } else < infomsg("no device on output stream\n"); --- > if (setOutsize) { > debugmsg("checking blocksize for output...\n"); > if (-1 == fstat(Out,&st)) > fatal("could not stat output: %s\n",strerror(errno)); > if ((st.st_mode & S_IFBLK) || (st.st_mode & S_IFCHR)) { > infomsg("blocksize on output device is %i\n",st.st_blksize); > if (Blocksize%st.st_blksize != 0) > warningmsg("Blocksize should be a multiple of the blocksize of the output device (is %i)!\n",st.st_blksize); > if (Blocksize > st.st_blksize) { > infomsg("setting output blocksize to %i\n",st.st_blksize); > Outsize = st.st_blksize; > } > } else > infomsg("no device on output stream\n"); > }