#! /bin/bash
# Last edited on 2022-10-20 07:14:23 by stolfi

for kw in int int32_t stdint ; do

  egrep -l -i -e '\b'"${kw}"'\b' `cat .chfiles | egrep -v -e 'JUNK|SAVE|OLD'` \
    | sed -e 's:^[.]/::g' \
    | sort \
    > .${kw}-uses.files

done

cat .int-uses.files \
  | sed -e 's:/.*::g' \
  | uniq -c \
  | sort -k1nr \
  > .int-uses.filecounts
  
bool 1-2 .int32_t-uses.files .stdint-uses.files > .stdint-missing.files
