1# Copyright: 2019 Masatake YAMATO 2# License: GPL-2 3# The original bug is reported by @elecalion in #2014. 4 5CTAGS=$1 6BUILDDIR=$2 7 8. ../utils.sh 9 10tmp="input file.cc" 11 12run() 13{ 14 echo '#' 15 echo '#' with $1 16 echo '#' 17 18 cp input_file.cc $BUILDDIR/"${tmp}" 19 if ! direq_maybe $BUILDDIR .; then 20 for f in input_*.rst; do 21 if ! [ -e $BUILDDIR/$f ]; then 22 cp $f $BUILDDIR 23 copied=yes 24 fi 25 done 26 fi 27 ( 28 cd $BUILDDIR 29 "${CTAGS}" --quiet --options=NONE ${1} --output-format=e-ctags \ 30 --kinds-c++=+p --fields=+iaSs \ 31 -o - \ 32 "${tmp}" \ 33 input_tab.rst input_space.rst 34 rm -f "${tmp}" 35 36 echo "# WITH SCOPE" 37 "${CTAGS}" --quiet --options=NONE ${1} --output-format=e-ctags \ 38 --fields=+s \ 39 -o - \ 40 input_scope.rst 41 42 echo "# WITHOUT SCOPE" 43 "${CTAGS}" --quiet --options=NONE ${1} --output-format=e-ctags \ 44 --fields=-s \ 45 -o - \ 46 input_scope.rst 47 48 if [ "$copied" = "yes" ]; then 49 rm -f input_*.rst 50 fi 51 ) 52} 53 54run "--sort=yes" 55run "--sort=no" 56