On Fri, 2010-02-12 at 15:53 +0100, Frank Schoenheit, Sun Microsystems
Germany wrote:
> finding consensus ... (and finally, perhaps it's good for something)
>
> So, in my opinion we would need 3 levels, at least, not 2:
> (1) traces (today: OSL_TRACE, DBG_TRACE)
> (2) error reports (today: DBG_ERROR, DBG_ASSERT, OSL_ENSURE, OSL_ASSERT,
> OSL_PRECOND, OSL_POSTCOND, and more)
> (3) error reports which the program does not survive, in particular in
> a product build, i.e. at the customer's machine
> (future: OSL_ASSERT_ABORT?)
>
Not having much knowledge, let me offer a factoid instead. This is from
the "core" tarfile.
Script ...
#!/bin/bash
#
# count assertions in OOo source
#
# execute within top unpacked directory of OOo
#
echo "counting assertions and so forth in $(pwd)"
for str in OSL_TRACE DBG_TRACE \
DBG_ERROR OSL_ENSURE OSL_ASSERT \
OSL_PRECOND OSL_POSTCOND \
OSL_ASSERT_ABORT
do
printf " %.25s : " "$str ........................."
grep --recursive \
--regexp="$str" \
. \
| wc --lines
done
echo done
Result ...
counting assertions and so forth in /tmp/DEV300_m71
OSL_TRACE ............... : 2427
DBG_TRACE ............... : 290
DBG_ERROR ............... : 4007
OSL_ENSURE .............. : 10372
OSL_ASSERT .............. : 3867
OSL_PRECOND ............. : 735
OSL_POSTCOND ............ : 108
OSL_ASSERT_ABORT ........ : 0
done
Cheers,
Terry.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]