r18628 - gnucash/trunk - Move count.* to util

Geert Janssens gjanssens at code.gnucash.org
Mon Feb 8 15:53:35 EST 2010


Author: gjanssens
Date: 2010-02-08 15:53:35 -0500 (Mon, 08 Feb 2010)
New Revision: 18628
Trac: http://svn.gnucash.org/trac/changeset/18628

Added:
   gnucash/trunk/util/src-count/
   gnucash/trunk/util/src-count/count.dat
   gnucash/trunk/util/src-count/count.gplot
   gnucash/trunk/util/src-count/count.sh
Removed:
   gnucash/trunk/src/count.dat
   gnucash/trunk/src/count.gplot
   gnucash/trunk/src/count.sh
Log:
Move count.* to util

Also I made a first attempt at improving the line count.
The old script missed a number of files in the directories
it counted.

The script is still not in line with the current code base
though. A number of directories are still not counted (like
gnome, engine, ledger, ...)

Deleted: gnucash/trunk/src/count.dat
===================================================================
--- gnucash/trunk/src/count.dat	2010-02-08 17:59:15 UTC (rev 18627)
+++ gnucash/trunk/src/count.dat	2010-02-08 20:53:35 UTC (rev 18628)
@@ -1,33 +0,0 @@
-#
-# file: count.dat
-#
-# Raw data for the number of KLOC of code in gnucash,
-# as a function of date.  Taken from the web page
-# http://www.gnucash.org/en/sizing.phtml
-# format: day/month/year <tab> KLOC
-# plot this by saying "gnuplot count.gplot" at the command line
-#
-# xacc-0.9 Sept 97
-1/9/1997	8.8
-# xacc-0.9w Dec 97
-1/12/1997	16.2
-# xacc-1.0.17 Feb 98
-1/2/1998	18.3
-# gnucash-1.1.15 Aug 98
-1/8/1998	34.7
-# gnucash-1.2.2 Aug 99
-1/8/1999	39.0
-# gnucash-1.3.6 April 2000
-1/4/2000	95.1
-# gnucash-1.4.6 Sept 2000
-# 1/9/2000	101.9
-# gnucash-1.4.12 April 2001
-# 1/4/2001	108.2
-# gnucash-1.5.2 Sept 2000
-1/9/2000	114.2
-# gnucash-1.6.0 June 2001
-1/6/2001	193.9
-# gnucash-1.7.2 November 2002
-1/11/2002	297.1
-# gnucash-1.8.4 June 2003
-1/6/2003	385.5

Deleted: gnucash/trunk/src/count.gplot
===================================================================
--- gnucash/trunk/src/count.gplot	2010-02-08 17:59:15 UTC (rev 18627)
+++ gnucash/trunk/src/count.gplot	2010-02-08 20:53:35 UTC (rev 18628)
@@ -1,26 +0,0 @@
-#
-# file: count.gplot
-# function: plot the number of lines of code in gnucash as function of date
-# To generate the graph, say "gnuplot count.gplot" at the command line
-#
-# history: created by Linas Vepstas July 2004
-#
-# set term x11
-# set term pbm
-# set term gif size 400,300
-set term pbm medium color
-set out 'count.png'
-set data style linespoints 
-set xdata time
-set timefmt "%d/%m/%Y"
-# set format x "%m/%y"
-set format x "%Y"
-set xrange ["01/09/1997":"01/12/2003"]
-set title "Number of Lines of code in GnuCash"
-set key right
-set xlabel "Year"
-set logscale y
-set ylabel "KLOC\nLogarithmic Scale"
-plot "count.dat" using 1:2	title "kloc"
-
-# pause 1000

Deleted: gnucash/trunk/src/count.sh
===================================================================
--- gnucash/trunk/src/count.sh	2010-02-08 17:59:15 UTC (rev 18627)
+++ gnucash/trunk/src/count.sh	2010-02-08 20:53:35 UTC (rev 18628)
@@ -1,106 +0,0 @@
-#! /bin/sh
-#
-# Simple stupid utility to count lines of code
-# The output may deceive you, remember to subtract 1 from file count
-
-echo 
-echo
-echo "app utils:"
-wc app-file/*.c app-utils/*.c calculation/*.c core-utils/*.c gnc-module/*.c network-utils/*.c tax/us/*.c
-wc app-file/*.c app-utils/*.c calculation/*.c core-utils/*.c gnc-module/*.c network-utils/*.c tax/us/*.c | wc
-echo 
-echo
-echo "app utils:"
-wc app-file/*.h app-utils/*.h calculation/*.h core-utils/*.h gnc-module/*.h network-utils/*.h tax/us/*.h
-wc app-file/*.h app-utils/*.h calculation/*.h core-utils/*.h gnc-module/*.h network-utils/*.h tax/us/*.h | wc
-echo 
-echo
-echo "app utils:"
-wc app-file/*.scm app-utils/*.scm calculation/*.scm core-utils/*.scm gnc-module/*.scm network-utils/*.scm tax/us/*.scm
-wc app-file/*.scm app-utils/*.scm calculation/*.scm core-utils/*.scm gnc-module/*.scm network-utils/*.scm tax/us/*.scm | wc
-
-
-echo 
-echo
-echo "import export:"
-wc import-export/*.c import-export/*/*.c
-wc import-export/*.c import-export/*/*.c |wc
-
-echo 
-echo
-echo "import export:"
-wc import-export/*.h import-export/*/*.h
-wc import-export/*.h import-export/*/*.h | wc
-
-echo 
-echo
-echo "import export:"
-wc import-export/*.scm import-export/*/*.scm
-wc import-export/*.scm import-export/*/*.scm | wc
-
-echo 
-echo
-echo "reports:"
-wc report/*/*.c
-wc report/*/*.c |wc
-
-echo 
-echo
-echo "reports:"
-wc report/*/*.h
-wc report/*/*.h |wc
-
-echo 
-echo
-echo "reports:"
-wc report/*/*.scm
-wc report/*/*.scm |wc
-
-echo 
-echo
-echo "scheme misc:"
-wc scm/*.scm scm/*/*.scm
-wc scm/*.scm scm/*/*.scm |wc
-
-echo 
-echo
-echo "Business:"
-wc business/*/*.c
-wc business/*/*.c |wc
-
-echo 
-echo
-echo "Business:"
-wc business/*/*.h
-wc business/*/*.h |wc 
-
-echo 
-echo
-echo "Business:"
-wc business/*/*.scm
-wc business/*/*.scm | wc
-
-echo 
-echo
-echo "test:"
-wc test-core/*.c */test/*.c  */*/test/*.c */*/*/test/*.c 
-wc test-core/*.c */test/*.c  */*/test/*.c */*/*/test/*.c  |wc
-
-echo 
-echo
-echo "test:"
-wc test-core/*.h */test/*.h  */*/test/*.h */*/*/test/*.h 
-wc test-core/*.h */test/*.h  */*/test/*.h */*/*/test/*.h  |wc
-
-echo 
-echo
-echo "test:"
-wc test-core/*.scm */test/*.scm  */*/test/*.scm */*/*/test/*.scm 
-wc test-core/*.scm */test/*.scm  */*/test/*.scm */*/*/test/*.scm  |wc
-
-echo 
-echo
-echo "internal docs"
-wc README* */README* */*/README* */*/*/README* *.txt */*.txt */*/*.txt */*/*/*.txt doc/*.html doc/*/*.html doc/*.texinfo doc/*/*.texinfo doc/xml/*.dtd
-wc README* */README* */*/README* */*/*/README* *.txt */*.txt */*/*.txt */*/*/*.txt doc/*.html doc/*/*.html doc/*.texinfo doc/*/*.texinfo doc/xml/*.dtd |wc
-

Copied: gnucash/trunk/util/src-count/count.dat (from rev 18624, gnucash/trunk/src/count.dat)
===================================================================
--- gnucash/trunk/util/src-count/count.dat	                        (rev 0)
+++ gnucash/trunk/util/src-count/count.dat	2010-02-08 20:53:35 UTC (rev 18628)
@@ -0,0 +1,33 @@
+#
+# file: count.dat
+#
+# Raw data for the number of KLOC of code in gnucash,
+# as a function of date.  Taken from the web page
+# http://www.gnucash.org/en/sizing.phtml
+# format: day/month/year <tab> KLOC
+# plot this by saying "gnuplot count.gplot" at the command line
+#
+# xacc-0.9 Sept 97
+1/9/1997	8.8
+# xacc-0.9w Dec 97
+1/12/1997	16.2
+# xacc-1.0.17 Feb 98
+1/2/1998	18.3
+# gnucash-1.1.15 Aug 98
+1/8/1998	34.7
+# gnucash-1.2.2 Aug 99
+1/8/1999	39.0
+# gnucash-1.3.6 April 2000
+1/4/2000	95.1
+# gnucash-1.4.6 Sept 2000
+# 1/9/2000	101.9
+# gnucash-1.4.12 April 2001
+# 1/4/2001	108.2
+# gnucash-1.5.2 Sept 2000
+1/9/2000	114.2
+# gnucash-1.6.0 June 2001
+1/6/2001	193.9
+# gnucash-1.7.2 November 2002
+1/11/2002	297.1
+# gnucash-1.8.4 June 2003
+1/6/2003	385.5

Copied: gnucash/trunk/util/src-count/count.gplot (from rev 18624, gnucash/trunk/src/count.gplot)
===================================================================
--- gnucash/trunk/util/src-count/count.gplot	                        (rev 0)
+++ gnucash/trunk/util/src-count/count.gplot	2010-02-08 20:53:35 UTC (rev 18628)
@@ -0,0 +1,26 @@
+#
+# file: count.gplot
+# function: plot the number of lines of code in gnucash as function of date
+# To generate the graph, say "gnuplot count.gplot" at the command line
+#
+# history: created by Linas Vepstas July 2004
+#
+# set term x11
+# set term pbm
+# set term gif size 400,300
+set term pbm medium color
+set out 'count.png'
+set data style linespoints 
+set xdata time
+set timefmt "%d/%m/%Y"
+# set format x "%m/%y"
+set format x "%Y"
+set xrange ["01/09/1997":"01/12/2003"]
+set title "Number of Lines of code in GnuCash"
+set key right
+set xlabel "Year"
+set logscale y
+set ylabel "KLOC\nLogarithmic Scale"
+plot "count.dat" using 1:2	title "kloc"
+
+# pause 1000

Copied: gnucash/trunk/util/src-count/count.sh (from rev 18624, gnucash/trunk/src/count.sh)
===================================================================
--- gnucash/trunk/util/src-count/count.sh	                        (rev 0)
+++ gnucash/trunk/util/src-count/count.sh	2010-02-08 20:53:35 UTC (rev 18628)
@@ -0,0 +1,139 @@
+#! /bin/sh
+#
+# Simple stupid utility to count lines of code
+# The output may deceive you, remember to subtract 1 from file count
+
+#
+# FIXME This script is very out of date. It doesn't count a number
+#       of source directories (such as gnome, ledger, engine,...)
+#
+
+SRC_DIR=$(dirname $0)/../../src
+
+cd $SRC_DIR
+
+echo 
+echo
+echo "app utils:"
+wc $(find app-utils core-utils calculation gnc-module tax \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort )
+wc $(find app-utils core-utils calculation gnc-module tax \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort ) | wc
+
+echo
+echo
+echo "import export:"
+wc $(find import-export \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort )
+wc $(find import-export \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort ) | wc
+
+echo
+echo
+echo "reports:"
+wc $(find report \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort )
+wc $(find report \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort ) | wc
+
+echo
+echo
+echo "scheme misc:"
+wc $(find scm \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort )
+wc $(find scm \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort ) |wc
+
+echo
+echo
+echo "Business:"
+wc $(find business \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort )
+wc $(find business \
+            \( -regex '.*test[^/]*' -prune \) -o \
+            \( -path '*.svn' -prune \)        -o \
+            \( \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort ) | wc
+
+echo
+echo
+echo "test:"
+wc $(find . \( -path '*.svn' -prune \)        -o \
+            \( -regex '.*/test.*/.*'      -a \
+               \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort )
+wc $(find . \( -path '*.svn' -prune \)        -o \
+            \( -regex '.*/test.*/.*'      -a \
+               \( -name '*.c'         -o \
+                  -name '*.h'         -o \
+                  -name '*.scm' \)        -a \
+               -print \) | sort ) | wc
+
+echo
+echo
+echo "internal docs"
+wc $(find .. \( -path '*.svn' -prune \) -o \
+            \( -name 'README*'             -o \
+               -name '*.txt'               -o \
+               -name '*.html'              -o \
+               -name '*.texinfo'           -o \
+               -name '*.dtd' \)                -a \
+             -print | sort )
+wc $(find .. \( -path '*.svn' -prune \) -o \
+            \( -name 'README*'             -o \
+               -name '*.txt'               -o \
+               -name '*.html'              -o \
+               -name '*.texinfo'           -o \
+               -name '*.dtd' \)                -a \
+             -print | sort ) | wc
+
+cd -
\ No newline at end of file



More information about the gnucash-changes mailing list