| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 | 
							- #!/bin/bash
 
- #
 
- # StarPU --- Runtime system for heterogeneous multicore architectures.
 
- #
 
- # Copyright (C) 2017 CNRS
 
- #
 
- # StarPU is free software; you can redistribute it and/or modify
 
- # it under the terms of the GNU Lesser General Public License as published by
 
- # the Free Software Foundation; either version 2.1 of the License, or (at
 
- # your option) any later version.
 
- #
 
- # StarPU is distributed in the hope that it will be useful, but
 
- # WITHOUT ANY WARRANTY; without even the implied warranty of
 
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
- #
 
- # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
- dirname=$(dirname $0)
 
- cd $dirname/../../../
 
- DIRS="src tools mpi/src"
 
- #sc_hypervisor/src"
 
- for d in $DIRS
 
- do
 
-     STARPU_C_FILES=$(find $d  -name '*.c' | tr '\012' ' ')
 
-     #echo "Checking $STARPU_C_FILES"
 
-     for e in "\bmalloc(" "\bcalloc(" "\brealloc("
 
-     do
 
- 	#echo $e
 
- 	grep -n "$e" $STARPU_C_FILES | while read line
 
- 	do
 
- 	    #echo "----------------------------------------------------------------"
 
- 	    #echo "$line"
 
- 	    file=$(echo $line | awk -F':' '{print $1}')
 
- 	    count=$(echo $line | awk -F':' '{print $2}')
 
- 	    count1=$(( count + 1 ))
 
- 	    line1=$(grep -n "" $file | grep "^$count1:")
 
- 	    #    echo "$line1"
 
- 	    c=$(echo "$line1" | grep -c -E "\!|NULL")
 
- 	    #    echo $c
 
- 	    if test $c -eq 0
 
- 	    then
 
- 		echo "$line"
 
- 	    fi
 
- 	done
 
-     done
 
- done
 
 
  |