5 if [ "$1" = "-C" ] ; then
16 [ "$file" = "" ] && [ -e err-list
] && file=err-list
17 if [[ "$file" = "" ]] ; then
18 echo "Usage: $0 [-C <lines>] [-b] [-k] <file with smatch messages>"
19 echo " -C <lines>: Print <lines> of context"
23 cat $file |
while read line
; do
24 code_file
=$
(echo $line | cut
-d ':' -f 1)
25 lineno
=$
(echo $line | cut
-d ' ' -f 1 | cut
-d ':' -f 2)
26 echo "========================================================="
29 tail -n +$
(($lineno - ($context - 1))) $code_file |
head -n $
(($context - 1))
30 echo "---------------------------------------------------------"
31 tail -n +${lineno} $code_file |
head -n $context