david@doe.utoronto.ca (David Megginson) (03/26/91)
I have found a bug in my tr(1v) clone for MiNT--under some circumstances, the program will write out the last buffer twice. I am posting this patch to comp.sys.atari.st and comp.sources.atari.st, and I will post the full fixed sources and binaries in a week or so (they should take another week to appear). Until then, could anyone using my tr or wc please send in any other bugs, comments or requests, so that I can (maybe) incorporate them? Thank you. David Apply this patch to tr.c: ======CUT HERE====== 16a17 > /* -DDEBUG Trace buffer handling */ 20c21 < /* $Id: tr.c,v 1.2 1991/03/05 09:01:38 david Exp $ */ --- > /* $Id: tr.c,v 1.3 1991/03/25 07:51:28 david Exp $ */ 23a25,27 > * Revision 1.3 1991/03/25 07:51:28 david > * Fixed error in do_translate() which output last buffer twice. > * 32c36 < static char * version = "$Id: tr.c,v 1.2 1991/03/05 09:01:38 david Exp $"; --- > static char * version = "$Id: tr.c,v 1.3 1991/03/25 07:51:28 david Exp $"; 342c346 < if( total_read > 0 ) --- > if( total_read > 0 ) { 344c348,352 < write(1,buffer2,total_write); --- > write(1,buffer2,total_write); > } > #ifdef DEBUG > fprintf(stderr,"Total read: %ld, Total write: %ld\n",total_read,total_write); > #endif -- //////////////////////////////////////////////////////////////////////// / David Megginson david@doe.utoronto.ca / / Centre for Medieval Studies meggin@vm.epas.utoronto.ca / ////////////////////////////////////////////////////////////////////////