File: cmd-diff.sh

package info (click to toggle)
xconq 7.1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,056 kB
  • ctags: 7,960
  • sloc: ansic: 88,493; perl: 2,057; sh: 1,766; makefile: 1,110; csh: 81; awk: 47; lisp: 39
file content (21 lines) | stat: -rwxr-xr-x 979 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

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

grep DEF_CMD $1/../*/*cmd.def | sed -e 's/\\\\/\\/' | sed -e 's/^[^(]*(\([^,]*\), "\([^"]*\)".*$/\1 \2/' | sed -e "s/C('\(.\)')/C-\1/" -e "s/ *'\(.\)' /\1/" -e 's/   0  /0/' | grep -v '0 D' | sort | uniq >src.cmds

grep -h "^\`@code"  $1/../doc/play.texi $1/../doc/*chap.texi | sed -e 's/@@/@/'| sed -e 's/^\`@code{\(.\)}. @code{\([^}]*\)}.*$/\1 \2/' >doc.cmds1

grep -h "^@code{[^C]"    $1/../doc/play.texi $1/../doc/*chap.texi | sed -e 's/@@/@/' | sed -e 's/^@code{\([^C][^}]*\)}.*$/0 \1/' >doc.cmds2

grep -h "^@code{C-" $1/../doc/play.texi $1/../doc/*chap.texi | sed -e 's/@@/@/' | sed -e 's/^@code{\(C-.\)} @code{\([^}]*\)}.*$/\1 \2/' >doc.cmds3

cat doc.cmds[123] | sort | uniq >doc.cmds

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

diff -w doc.cmds src.cmds

exit 0