view src/find-defun-files.sh @ 14596:ad1d7a53b1ca stable

perform convolution properly independently of matrix orientation (bug #34893) * cconv2.f (cconv2i), csconv2.f (csconv2i), dconv2.f (dconv2i), sconv2.f (sconv2i), zconv2.f (zconv2i), zdconv2.f (zdconv2i): Fix iteration over the a matrix, so it's properly reversed. * conv2.cc: Uncomment test to check for this, and add a new xtest.
author Sunghyun Cho <sodomau@gmail.com>
date Tue, 17 Apr 2012 12:47:34 +0100
parents 4cf7356a99d0
children e753177cde93
line wrap: on
line source

#! /bin/sh

set -e
SED=${SED:-sed}
EGREP=${EGREP:-egrep}

# Some stupid egreps don't like empty elements in alternation patterns,
# so we have to repeat ourselves because some stupid egreps don't like
# empty elements in alternation patterns.

DEFUN_PATTERN="^[ \t]*DEF(CONSTFUN|CMD|UN|UN_DLD|UNX_DLD|UN_TEXT)[ \t]*\\("

srcdir="$1"
shift

for arg
do
  if [ -f "$arg" ]; then
    file="$arg"
  else
    file="$srcdir/$arg"
  fi
  if [ "`$EGREP -l "$DEFUN_PATTERN" $file`" ]; then
    echo "$file" | $SED 's,.*/,,; s/\.cc$/.df/; s/\.ll$/.df/; s/\.yy$/.df/';
  fi
done