sbcl.sbcl/wc.sh
William Harold Newman a18f0a95bc 0.6.11.40:
added code to support coming changes in (probably) 0.6.11.41..
	..moving Unix opendir/readdir/closedir iteration down to the C
		level, so that all structure layouts and whatnot can be
		read directly from #include files, so that directory
		operations become inherently portable (or at least as
		much as C/Unix ever is:-) and work on OpenBSD
	..replacing old *UNIX-ERROR* cruft with STRERROR and
		SIMPLE-PERROR
	GET-ERRNO belongs in SB-C-CALL, it's not Unix-specific.
2001-04-17 14:43:42 +00:00

25 lines
1 KiB
Bash
Executable file

#!/bin/sh
# How big is this project anyway? Crudely estimate non-comment source lines..
echo -n "approximate Lisp source lines: "
find . -name "*.lisp" -print | xargs egrep -hs '^[ ]*[^ ;]' | wc -l
echo -n "approximate Lisp source non-whitespace chars: "
find . -name "*.lisp" -print | xargs egrep -hs '^[ ]*[^ ;]' \
| perl -ne 's/\s//g ; print' | wc -c
# some errors in Lisp counting above:
# * doesn't catch #| .. |#
# * doesn't catch #+NIL convention for commenting out forms
# * doesn't catch stale source files which are no longer used
echo -n "approximate C source lines: "
find . -name "*.[ch]" -print | xargs egrep -s '^[ ]*[^ /*]' | wc -l
# errors:
# * only crudely approximates "/*"-style commenting (using the assumption
# that all lines beginning with "/" or "*" are beginning of comments or
# continuation of comments respectively)
# * doesn't catch #if 0 convention for commenting out blocks
# * doesn't catch stale source files which are no longer used
echo "(ignoring .sh, .S, etc.)"