Doxygen for fldigi

* Added scripts to generate Doxygen documentation from fldigi git repository / source
 * Also executes "cppcheck" and includes those results on Doxygen page (if installed on system)
 * Generates patches and log for the last 125 commits: includes links on Doxygen page
pull/1/head
John Phelps 2013-07-24 05:28:20 -05:00 zatwierdzone przez David Freese
rodzic 86bb08b90b
commit 989a11136b
6 zmienionych plików z 1862 dodań i 1 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -0,0 +1,115 @@
#! /bin/bash -e
#
# KL4YFD 2013
# Released under GNU GPL
#
# This script generates DOXYGEN documentation from the fldigi source tree
# Checks are done to ensure needed binaries and files exists first
cd $( dirname ${BASH_SOURCE[0]} )
function usage
{
printf "\n\nThis script generates Doxygen documentation from the "
printf "\nfldigi sourcecode. By default, the tool \"cppcheck\" is also called. \nNote: This analysis takes longer than compilation and produces about 1.8GiB of data."
printf "\n\nUsage:"
printf "\n\tGenerate Doxygen documentation:\t ./gen_doxygen_docs.sh run"
printf "\n\tClean up after Doxygen run:\t ./gen_doxygen_docs.sh clean"
printf "\n\tClean up after Doxygen run:\t ./gen_doxygen_docs.sh nocppcheck"
printf "\n\tPrint this usage summary:\t ./gen_doxygen_docs.sh help \n\n"
}
function doxygen_clean {
rm -Rf HTML
printf "\ndoxygen documentation deleted!\n"
}
case "$1" in
"run")
doxygen_clean
../tests/cppcheck/gen_cppcheck_results.sh clean
# Continue with rest of script...
break
;;
"nocppcheck")
cppcheck_clean
exit
;;
"clean")
doxygen_clean
../tests/cppcheck/gen_cppcheck_results.sh clean
exit
;;
"--help" | "help")
usage
exit
;;
*)
usage
exit
;;
esac
printf "\nUsing support binaries:\n"
# Ensure the binary "doxygen" is on the system
if ! which doxygen ; then
printf "\n\nERROR: Generating the Fldigi Doxygen documents requires the program: doxygen"
printf "\n\tPlease install this program to continue."
printf "\n\n === ABORTING === \n\n"
exit 1
fi
# Ensure the binary "dot" is on the system
if ! which dot ; then
printf "\n\nERROR: Generating the Fldigi Doxygen documents requires the program: dot"
printf "\n\tThis program is part of the package: graphviz \n\n"
printf "\n\tPlease install this program to continue."
printf "\n\n === ABORTING === \n\n"
exit 1
fi
# Ensure the binary "mscgen" is on the system
if ! which mscgen ; then
printf "\n\nERROR: Generating the Fldigi Doxygen documents requires the program: mscgen"
printf "\n\tPlease install this program to continue."
printf "\n\n === ABORTING === \n\n"
exit 1
fi
# Ensure the Doxygen config file exists
if [ ! -e ./fldigi_doxyfile.txt ]; then
printf "\n\nERROR: Doxygen configuration file: \"fldigi_doxyfile.txt\" not found."
printf "\n\n === ABORTING === \n\n"
exit 1
fi
doxygen fldigi_doxyfile.txt
# Go create some really useful information using git
cd HTML
mkdir __git; cd __git
git format-patch --summary -n HEAD~125 # Create patches for the last 125 commits
git log --stat -n 125 > gitlog.txt # Dump the history of the last 125 commits
cd ..
cd ..
if ! which cppcheck ; then
printf "\n\nWARNING: Binary \"cppcheck\" not found."
printf "\n\n\t Skipping sourcecode analysis. Install cppcheck and re-run.\n\n"
else
../tests/cppcheck/gen_cppcheck_results.sh run
fi
printf "\n\n === DOXYGEN documentation generation complete. ==="
printf "\n\nDocumentation Directory: $(pwd)/HTML"
printf "\nMain file: $(pwd)/HTML/index.html\n\n"
# Open the main-Doxygen page in a web-browser.
if which xdg-open ; then
xdg-open ./HTML/index.html # Ubuntu, Linux, etc...
else
open ./HTML/index.html # OSX, Unix, etc..
fi

Wyświetl plik

@ -0,0 +1,17 @@
scripts/doxygen/readme.txt
This directory contains the run-script: gen_doxygen_docs.sh and
configuration file: fldigi_doxyfile.txt used for auto-generating
DOXYGEN source-code documentation.
This documentation can be extremely useful for both learning and debugging fldigi/flarq.
== Usage ==
1) Execute: ' ./gen_doxygen_docs.sh run ' on a Unix-Like system. (OSX, Linux, etc...)
- the script will complain usefully if anything is missing
- NOTE: this will generate 1.8GiB of data and take longer than compilation.
2) Once generation completes, a web-browser will automatically open the file: HTML/index.html
- URL Example: file:///tmp/fldigi/scripts/doxygen/HTML/index.html

Wyświetl plik

@ -0,0 +1,103 @@
#! /bin/bash
#
# KL4YFD 2013
# Released under GNU GPL
#
# This script runs automatic source-code checks using the tool: "cppcheck"
# Checks are done to ensure needed binary exists first
cd $( dirname ${BASH_SOURCE[0]} )
INCLUDEDIR="../../../src/include"
SRCDIR="../../../src"
RESULTSDIR="results"
THREADS=8
function usage
{
printf "\n\nThis script executes the tool \"cppcheck\" and "
printf "\nsorts the results into separate files by severity / type\n Note: This analysis takes about the same time as compilation."
printf "\n\nUsage:"
printf "\n\tRun cppcheck tests:\t ./gen_cppcheck_results.sh run"
printf "\n\tClean up all files:\t ./gen_cppcheck_results.sh clean"
printf "\n\tPrint this usage:\t ./gen_cppcheck_results.sh help \n\n"
}
function cppcheck_clean {
rm -Rf $RESULTSDIR
printf "\ncppcheck results deleted!\n"
}
case "$1" in
"run")
cppcheck_clean
# Continue with rest of script...
break
;;
"clean")
cppcheck_clean
exit
;;
"--help" | "help")
usage
exit
;;
*)
usage
exit
;;
esac
# Ensure the binary "cppcheck" is on the system
if ! which cppcheck ; then
printf "\n\nERROR: Running the Fldigi cppcheck tests requires the program: cppcheck"
printf "\n\t Please install this program to continue."
printf "\n\n === ABORTING === \n\n"
exit 1
fi
mkdir $RESULTSDIR
cppcheck --inline-suppr --inconclusive --enable=all -I $INCLUDEDIR -j $THREADS --force --verbose $SRCDIR 2> $RESULTSDIR/ALL.txt
cd $RESULTSDIR
# Separate out the results into files based on their "cppcheck types"
cat ALL.txt | grep "(error)" > error.txt
cat ALL.txt | grep "(warning)" > warning.txt
cat ALL.txt | grep "(style)" > style.txt
cat ALL.txt | grep "(performance)" > performance.txt
cat ALL.txt | grep "(portability)" > portability.txt
cat ALL.txt | grep "(information)" > information.txt
cat ALL.txt | grep "(debug)" > debug.txt
# Separate out the tests with inconclusive results
cat ALL.txt | grep "(error, inconclusive)" > error_inconclusive.txt
cat ALL.txt | grep "(warning, inconclusive)" > warning_inconclusive.txt
cat ALL.txt | grep "(style, inconclusive)" > style_inconclusive.txt
cat ALL.txt | grep "(performance, inconclusive)" > performance_inconclusive.txt
cat ALL.txt | grep "(portability, inconclusive)" > portability_inconclusive.txt
cat ALL.txt | grep "(information, inconclusive)" > information_inconclusive.txt
#cat ALL.txt | grep "(debug, inconclusive)" > debug.txt # debug is for Messages from cppcheck itself, not a test-result. Therefore no such combination.
# Just in case... Catch everything _not_ in the above blocks.
cat ALL.txt | grep --invert-match "(error)" \
| grep --invert-match "(warning)" \
| grep --invert-match "(style)" \
| grep --invert-match "(performance)" \
| grep --invert-match "(portability)" \
| grep --invert-match "(information)" \
| grep --invert-match "(debug)" \
| grep --invert-match "(error, inconclusive)" \
| grep --invert-match "(warning, inconclusive)" \
| grep --invert-match "(style, inconclusive)" \
| grep --invert-match "(performance, inconclusive)" \
| grep --invert-match "(portability, inconclusive)" \
| grep --invert-match "(information, inconclusive)" > leftover.txt
cd ..
printf "\n\n === cppcheck source-code analysis complete. ==="
printf "\n\nResults saved in: $(pwd)/results \n\n"

Wyświetl plik

@ -0,0 +1,107 @@
// ----------------------------------------------------------------------------
// doxygen.h
//
// Copyright (C) 2013
// John Phelps, KL4YFD
//
// This file is part of fldigi.
//
// fldigi 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.
//
// fldigi 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 <http://www.gnu.org/licenses/>.
// ----------------------------------------------------------------------------
/*
This include file is not indended to be included by any source file in Fldigi,
but is used only for DOXYGEN automatic-documentation generation.
Please put only comments & Doxygen info in this file.
*/
/** \mainpage Fldigi 3.21 doxygen documentation
<div align="center"><img src="../../../data/fldigi-psk.png" ></div>
\section intro Introduction
Welcome to the Fldigi doxygen documentation.
Here you'll find information useful for developing and debugging fldigi and flarq.
fldigi - Digital modem program for Linux, Free-BSD, OS X, Windows XP, NT, W2K, Vista and Win7.
flarq - Automatic Repeat reQuest program.
Fldigi and Flarq are separate programs that are packaged together as source, binary, and installation files.
Build updated to fltk-1.3.0 library standards. Can also be built using fltk-1.1.10
\section download To Download Fldigi :
<UL>
<LI> latest release version at: <A HREF="http://www.w1hkj.com/download.html">http://www.w1hkj.com/download.html</A></LI>
<LI> beta versions at: <A HREF="http://www.w1hkj.com/beta">http://www.w1hkj.com/beta</A></LI>
<LI> alpha versions at: <A HREF="http://www.w1hkj.com/alpha">http://www.w1hkj.com/alpha</A></LI>
<LI> pre-alpha & test versions at: <A HREF="http://www.w1hkj.com/temp">http://www.w1hkj.com/temp</A></LI>
<LI> To pull latest source from main repository: <B>git clone git://git.berlios.de/fldigi</B></LI>
</UL>
\section entry Good Entry-Points for Navigating the Doxygen Documentation :
<UL>
<LI><A HREF="annotated.html">List of all Classes and Data Structures</A></LI>
<LI><A HREF="classmodem.html">The modem:: class documentation</A></LI>
<LI><A HREF="classmodem__inherit__graph.png">The modem:: class inheritange graph</A></LI>
<LI><A HREF="globals.html">list of all functions, variables, defines, enums, and typedefs with links to the files they belong to</A></LI>
</UL>
\section cppcheck_results Results from the cppcheck static program analysis tool:
Analysis was ran during doxygen documentation generation.
<UL>
<LI><A HREF="../../tests/cppcheck/results/error.txt">Errors</A></LI>
<LI><A HREF="../../tests/cppcheck/results/warning.txt">Warnings</A></LI>
<LI><A HREF="../../tests/cppcheck/results/style.txt">Code-Style Issues</A></LI>
<LI><A HREF="../../tests/cppcheck/results/performance.txt">Performance Issues</A></LI>
<LI><A HREF="../../tests/cppcheck/results/portability.txt">Portability Issues</A></LI>
<LI><A HREF="../../tests/cppcheck/results/information.txt">Information</A></LI>
<LI><B>Inconclusive tests did not FAIL, but also did not PASS</B></LI>
<LI><A HREF="../../tests/cppcheck/results/error_inconclusive.txt"><I>Inconclusive Errors</I></A></LI>
<LI><A HREF="../../tests/cppcheck/results/warning_inconclusive.txt"><I>Inconclusive Warnings</I></A></LI>
<LI><A HREF="../../tests/cppcheck/results/style_inconclusive.txt"><I>Inconclusive Code-Style Issues</I></A></LI>
<LI><A HREF="../../tests/cppcheck/results/performance_inconclusive.txt"><I>Inconclusive Performance Issues</I></A></LI>
<LI><A HREF="../../tests/cppcheck/results/portability_inconclusive.txt"><I>Inconclusive Portability Issues</I></A></LI>
<LI><A HREF="../../tests/cppcheck/results/information_inconclusive.txt"><I>Inconclusive Information</I></A></LI>
</UL>
\section git Information from git :
<UL>
<LI><A HREF="__git/">Patches for the last 125 commits</A></LI>
<LI><A HREF="__git/gitlog.txt">git-log for the last 125 commits</A></LI>
</UL>
\section license License
fldigi 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.
fldigi 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 http://www.gnu.org/licenses
*/

Wyświetl plik

@ -7,7 +7,7 @@
#include <stdio.h>
/** \mainpage irrXML 1.2 API documentation
/** irrXML 1.2 API documentation
<div align="center"><img src="logobig.png" ></div>
\section intro Introduction