.
For more information see the SLOCCount website
at
http://www.dwheeler.com/sloccount. Note that more detailed
documentation is available both on the website and with the SLOCCount
package.
fubar
here=`pwd`
test $? -eq 0 || exit 1
temp=/tmp/$$
mkdir $temp
test $? -eq 0 || exit 1
fail() {
cd $here
rm -rf $temp
exit 1
}
trap "fail" 1 2 3 15
HOME=$temp
export HOME
( cd $temp ; sloccount "$@" ) | sed '1,/Computing results/d' > $temp/out.txt
if test ! -s $temp/out.txt
then
echo ""
echo "sloccount produced nothing" 1>&2
echo ""
fail
fi
cat $temp/out.txt
rm -rf $temp
echo '
'
echo 'This page last updated'
date
echo ''
exit 0
07070100000030000081a40000000000000000000000014fb892ef00000c3c000000000000000000000000000000000000001200000000src/etc/tags.cook /*
* contrast - compare files token by token
* Copyright (C) 2006, 2009 Peter Miller
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
* version 3, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
* .
*/
if [find_command ctags] then
{
/*
* There are three different versions of these commands,
* and they take completely different command line options. We
* assume minimal posix syntax if nothing better is available.
* (What were they thinking? Were they even thinking?)
*/
ctags-variant = posix;
/*
* The '|| true' is needed because if ctags fails the build stops.
*/
ctags-version = [collect ctags --version || true];
if [in Exuberant [ctags-version]] then
{
ctags-variant = exuberant;
}
else
if [in Emacs [ctags-version]] then
{
ctags-variant = emacs;
}
all += tags;
if [find_command etags] then
{
etags = etags;
all += TAGS;
}
/*
* xargs can invoke ctags/etags more than once if the underling
* shell does not handle so much arguments. In order to not
* truncate the target the '-a' options must be used. It is posix
* compliant and should be supported by different ctags variant.
*/
ctags-opts = -a;
if [in posix [ctags-variant]] then
ctags-opts += -f;
if [in exuberant [ctags-variant]] then
{
ctags-opts += --c-types\=+px -f;
etags = ctags -e;
all += TAGS;
}
/*
* The (GNU) Emacs variant of ctags (based an Exuberant) use -o
* to set the output file name.
*/
if [in emacs [ctags-variant]] then
ctags-opts += --declarations --defines --globals --members --typedefs
/* --no-warn (the man page says the --no-warn option exists,
but is doesn't, really) */
-o
;
}
tags: [change_files]
set shallow no-cascade
{
xargs ctags [ctags-opts] [target]
set meter;
data
[unsplit "\n"
[resolve
[stringset [source_files] - [match_mask %0%.h [source_files]]]
[match_mask %0%.h [source_files]]
[fromto %0%.def %0%.cc [match_mask %0%.def [source_files]]]
[fromto %0%.def %0%.h [match_mask %0%.def [source_files]]]
]
]
dataend
}
TAGS: [change_files]
set shallow no-cascade
{
xargs [etags] [ctags-opts] [target]
set meter;
data
[unsplit "\n"
[resolve
[source_files]
[fromto %0%.def %0%.cc [match_mask %0%.def [source_files]]]
[fromto %0%.def %0%.h [match_mask %0%.def [source_files]]]
]
]
dataend
}
07070100000031000081a40000000000000000000000014fb892ef00000697000000000000000000000000000000000000001500000000src/etc/tarball.cook
/*
* example-c-plus-plus - an example Aegis project
* Copyright (C) 2006, 2009, 2010 Peter Miller
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License,
* version 3, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
* .
*/
integration-build-targets += web-site/[project-minus].tar.gz;
tarball_files =
README
[sort
LICENSE
BUILDING
[source_files]
Makefile.in
configure
install-sh
lib/config.h.in
lib/patchlevel.h
etc/version.so
etc/new.so
etc/ref-index.so
etc/ref-parts.so
];
web-site/[project-minus].tar.gz: [tarball_files]
debian/changelog
{
tar -c -h -f - [resolve [tarball_files]
debian/changelog
debian/compat
debian/contrast.install
debian/control
debian/rules
]
| tardy -unu 0 -gnu 0
-p [project-minus]
-ms 0644 -mc 07022
-now
[prepost "-rp=" "" [search_list]]
| gzip -9
> [target];
}
check-tarball: web-site/[project-minus].tar.gz
{
sh [resolve etc/check-tarball.sh]
[pathname [resolve web-site/[project-minus].tar.gz]];
}
07070100000032000081a40000000000000000000000014fb892ef00000554000000000000000000000000000000000000001400000000src/etc/template/cc
//
// ${project trunk_name} - ${project trunk_description}
// Copyright (C) ${date %Y} ${copyright_owner}
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, version 3, as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
#include <${trim_ext $fn}.h>
${id ${trim_dir ${trim_ext $fn}}}::~${id ${trim_dir ${trim_ext $fn}}}()
{
}
${id ${trim_dir ${trim_ext $fn}}}::${id ${trim_dir ${trim_ext $fn}}}() :
${id ${trim_dir ${dirname_rel $fn}}}()
{
}
${id ${trim_dir ${trim_ext $fn}}}::${id ${trim_dir ${trim_ext $fn}}}(const ${id
${trim_dir ${trim_ext $fn}}} &arg) :
${id ${trim_dir ${dirname_rel $fn}}}(arg)
{
}
${id ${trim_dir ${trim_ext $fn}}} &
${id ${trim_dir ${trim_ext $fn}}}::operator=(const ${id ${trim_dir ${trim_ext
$fn}}} &arg)
{
if (this != &arg)
{
${id ${trim_dir ${dirname_rel $fn}}}::operator=(arg);
...
}
return *this;
}
07070100000033000081a40000000000000000000000014fb892ef000002b7000000000000000000000000000000000000001600000000src/etc/template/cook /*
* ${project trunk_name} - ${project trunk_description}
* Copyright (C) ${date %Y} ${copyright_owner}
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
07070100000034000081a40000000000000000000000014fb892ef00000580000000000000000000000000000000000000001c00000000src/etc/template/etc-new-so
.\"
.\" ${project trunk_name} - ${project trunk_description}
.\" Copyright (C) ${date %Y} ${user name}
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the Free
.\" Software Foundation; either version 3 of the License, or (at your option)
.\" any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
.\" for more details.
.\"
.\" You should have received a copy of the GNU General Public License along
.\" with this program. If not, see .
.\"
.\" ------------------------------------------------------------------------
.\"
.\" you can create the initial cut of this file using the
.\"
.\" aereport -f /usr/local/share/aegis/report/chan_so.rpt \
.\" -p ${project trunk_name}.${trim_ext ${project version}
} -c ${substring ${project version} ${length ${trim-ext ${project version}}.
} 9} -unf
.\"
.\" command, and then editing it to be more appropriate.
.\"
.\" ------------------------------------------------------------------------
.\" Add new entries above this line.
.ne 2i
.SS Version ${project version} (${date %Y\\[hy]%b\\[hy]%d})
.\" vim: set ts=8 sw=4 et :
07070100000035000081a40000000000000000000000014fb892ef000002a6000000000000000000000000000000000000001900000000src/etc/template/generic
#
# ${project trunk_name} - ${project trunk_description}
# Copyright (C) ${date %Y} ${copyright_owner}
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
07070100000036000081a40000000000000000000000014fb892ef000005bd000000000000000000000000000000000000001300000000src/etc/template/h
//
// ${project trunk_name} - ${project trunk_description}
// Copyright (C) ${date %Y} ${copyright_owner}
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, version 3, as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
#ifndef ${id ${upcase $fn}}
#define ${id ${upcase $fn}}
#include <${dirname_rel $fn}.h>
/**
* The ${id ${trim_dir ${trim_ext $fn}}} class is used to represent
*/
class ${id ${trim_dir ${trim_ext $fn}}}:
public ${id ${trim_dir ${dirname_rel $fn}}}
{
public:
/**
* The destructor.
*/
virtual ~${id ${trim_dir ${trim_ext $fn}}}();
/**
* The default constructor.
*/
${id ${trim_dir ${trim_ext $fn}}}();
/**
* The copy constructor.
*/
${id ${trim_dir ${trim_ext $fn}}}(const ${id ${trim_dir ${trim_ext
$fn}}} &);
/**
* The assignment operator.
*/
${id ${trim_dir ${trim_ext $fn}}} &operator=(const ${id ${trim_dir
${trim_ext $fn}}} &);
};
#endif // ${id ${upcase $fn}}
07070100000037000081a40000000000000000000000014fb892ef00000574000000000000000000000000000000000000001600000000src/etc/template/main //
// ${project trunk_name} - ${project trunk_description}
// Copyright (C) ${date %Y} ${copyright_owner}
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, version 3, as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
#include
#include
#include
#include
#include
static void
usage()
{
const char *prog = progname_get();
fprintf(stderr, "Usage: %s [