
pwd
# do the main pattern search
#rgrep 'G_SUFFIX|_[Gg]' agent make src test \
rgrep 'G_SUFFIX|_[Gg]' make \
| sed '
      # ignore Mercurial meta data:
      /\/\.hg\//d
      # ignore JAR files:
      /\.jar:/d
      /\.jar matches/d
      # ignore _g variable decls:
      /\.[ch]pp:.* _g;/d
      # ignore _g ptr variable uses:
      /\.[ch]pp:.*_g->/d
      /\.[ch]pp:.*_g)->/d
      # ignore _g function calls:
      /\.ad:.*_g(/d
      /\.[ch]pp:.*_g(/d
      # ignore _[Gg] as part of a var name (no _ in trailing pattern)
      /_[Gg][0-9a-zA-Z]/d
      # special case for this variable name:
      /R_G_nums/d
      '
