File: sym-diff.sh

package info (click to toggle)
xconq 7.2.2-2
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,296 kB
  • ctags: 9,199
  • sloc: ansic: 107,849; sh: 2,108; perl: 2,057; makefile: 1,177; sed: 161; csh: 50; awk: 49; lisp: 39
file content (15 lines) | stat: -rwxr-xr-x 600 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# This script extracts and compares the symbols defined in the manual
# to those defined in the source code.

grep DEF_ $1/../kernel/*.def | grep -v DEF_CMD | sed -e 's/^[^"]*"\([^ ]*\)".*$/\1/' | grep -v '^zz-' | sort | uniq >src.syms

grep '@deffn' $1/../doc/refman.texi | grep '@code' | sed -e 's/^.*@code{\([^{ }]*\)}.*$/\1/' | sed -e 's/@@/@/' | grep -v '^zz-' | sort | uniq >doc.syms

echo "Differences between symbols in reference manual and in source code:"
echo "('<' - in documentation,  '>' - in sources)"

diff -w doc.syms  src.syms | grep -v '^[0-9]' | grep -v '^---'

exit 0