view libinterp/find-defun-files.sh @ 18798:89448a7523b2

Add some more callbacks for root properties (bug #42347). * graphics.in.h (root prop. errormessage): set read-only and declare custom get method * graphics.in.h (root prop. diary, diaryfile, echo, recursionlimit): declare custom get/set methods * graphics.cc (root::properties::get_errormessage, set_diary, get_diary, set_diaryfile, get_diaryfile, set_echo, get_echo, set_recursionlimit, get_recursionlimit): new methods. * pager.cc (F__diaryfile__, F__diarystate__): new functions to retrieve diary info. * pager.cc: set default value "diary" for diary_file static variable. * input.cc (F__echostate__): new function to retrieve echo info.
author Pantxo Diribarne <pantxo.diribarne@gmail.com>
date Tue, 13 May 2014 18:51:52 +0200
parents 39096b290a2f
children
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,\\$srcdir/,," | $SED 's/\.cc$/.df/; s/\.ll$/.df/; s/\.in.yy$/.df/';
  fi
done