From 2948fe8d6055f6dfe6289e64bce426b5e0bb552f Mon Sep 17 00:00:00 2001 From: cassiopc Date: Fri, 31 Aug 2012 11:02:27 +0200 Subject: inclusion of dir 1.5.1 for boca --- boca-1.5.1/doc/tests/fontes/bits-diffbug.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 boca-1.5.1/doc/tests/fontes/bits-diffbug.c (limited to 'boca-1.5.1/doc/tests/fontes/bits-diffbug.c') diff --git a/boca-1.5.1/doc/tests/fontes/bits-diffbug.c b/boca-1.5.1/doc/tests/fontes/bits-diffbug.c new file mode 100644 index 0000000..3703152 --- /dev/null +++ b/boca-1.5.1/doc/tests/fontes/bits-diffbug.c @@ -0,0 +1,25 @@ +/* this file illustrate a bug in diff that, even using -w -B -b, + * it will think that the files are different and will return + * exit code 1, when the only difference between them is a line + * in the end with a single white space. + * Author: cassio@ime.usp.br + * Last updated: 18/aug/2008 + */ +#include +int main(void) { + int i, j, n, max, inst=0; + while(42) { + scanf("%d", &n); + if(!n) break; + max=1; + for(i=0; imax) max=j; + } + for(i=0; max>0; i++) + max >>= 1; + printf("Instancia %d\n%d\n\n", ++inst, i*n); + } + printf(" \n"); + return 0; +} -- cgit v1.2.3