From 32af35602d5a1bba94d30ecfb0093010fa736d34 Mon Sep 17 00:00:00 2001 From: Pedro Date: Fri, 6 Mar 2015 07:02:47 +0000 Subject: [PATCH] Add tableofcontents and generally nitpick things --- build/documentation/DoxygenLayout.xml | 1 - build/documentation/pages/page_building.dox | 6 ++++- .../pages/page_featured_options.dox | 4 ++- build/documentation/pages/page_quickref.dox | 2 ++ .../documentation/pages/page_tidy_config.dox | 4 +++ .../pages/page_tidy_quickstart.dox | 2 ++ build/documentation/pages/page_tidylib.dox | 25 +++++++++++++++++++ 7 files changed, 41 insertions(+), 3 deletions(-) diff --git a/build/documentation/DoxygenLayout.xml b/build/documentation/DoxygenLayout.xml index 6d8ed41..1580088 100644 --- a/build/documentation/DoxygenLayout.xml +++ b/build/documentation/DoxygenLayout.xml @@ -3,7 +3,6 @@ - diff --git a/build/documentation/pages/page_building.dox b/build/documentation/pages/page_building.dox index a376757..15b22b9 100644 --- a/build/documentation/pages/page_building.dox +++ b/build/documentation/pages/page_building.dox @@ -5,6 +5,7 @@ How to compile and install Tidy from source code. +\tableofcontents \section Prerequisites @@ -79,7 +80,10 @@ make cmake --build . --config Release \endcode -

Install

+ +\section compileOnstall Install +Install the applicatio and library with + \code{.sh} # *nix [sudo] make install diff --git a/build/documentation/pages/page_featured_options.dox b/build/documentation/pages/page_featured_options.dox index 9a8e36f..564adf9 100644 --- a/build/documentation/pages/page_featured_options.dox +++ b/build/documentation/pages/page_featured_options.dox @@ -3,7 +3,9 @@ \page featured_options Featured Options -Overview of common tasks +Overview of popular features and problems + +\tableofcontents \section indenting Indenting output for readability diff --git a/build/documentation/pages/page_quickref.dox b/build/documentation/pages/page_quickref.dox index 94f6530..8ccf47b 100644 --- a/build/documentation/pages/page_quickref.dox +++ b/build/documentation/pages/page_quickref.dox @@ -4,6 +4,8 @@ Quick reference generated from the tidy command + + \htmlinclude quickref_include.html diff --git a/build/documentation/pages/page_tidy_config.dox b/build/documentation/pages/page_tidy_config.dox index 9f04d40..f8b3d21 100644 --- a/build/documentation/pages/page_tidy_config.dox +++ b/build/documentation/pages/page_tidy_config.dox @@ -2,6 +2,10 @@ \page tidy_config Configuration +Configuration settings and files + +\tableofcontents + To get a list of all configuration settings, see \ref config_options below or use: \code{.sh} tidy -help-config diff --git a/build/documentation/pages/page_tidy_quickstart.dox b/build/documentation/pages/page_tidy_quickstart.dox index 1b05df3..4cde469 100644 --- a/build/documentation/pages/page_tidy_quickstart.dox +++ b/build/documentation/pages/page_tidy_quickstart.dox @@ -2,6 +2,8 @@ \page tidy_quickstart tidy command quickstart +\tableofcontents + This is the syntax for invoking Tidy from the command line: \code{.sh} tidy [[options] filename] diff --git a/build/documentation/pages/page_tidylib.dox b/build/documentation/pages/page_tidylib.dox index 3e7d726..ebd534a 100644 --- a/build/documentation/pages/page_tidylib.dox +++ b/build/documentation/pages/page_tidylib.dox @@ -6,6 +6,8 @@ About the tidylib C library and code +\tableofcontents + \section about_tidylib TidyLib features - easy to integrate. Because of the near universal adoption of C linkage, a C interface may be called from a great number of programming languages. @@ -18,6 +20,29 @@ About the tidylib C library and code - uses adaptable I/O. As part of the larger integration strategy it was decided to fully abstract all I/O. This means a (relatively) clean separation between character encoding processing and shovelling bytes back and forth. Internally, the library reads from sources and writes to sinks. This abstraction is used for both markup and configuration “files”. Concrete implementations are provided for file and memory I/O, and new sources and sinks may be provided via the public interface. +\section return_code Return codes + +It’s important to understand that API functions that return an integer almost universally adhere to the following convention: + +- \b 0 == \b Success + - Good to go. +- \b 1 == \b Warnings, but no errors + - Check the error buffer or track error messages for details. +- \b 2 == \b Errors (and maybe warnings) + - By default, Tidy will not produce output. You can force output with the TidyForceOutput option. As with warnings, check error buffer or track error messages for details. +- < 0 == Severe error + - Usually value equals `-errno`. See errno.h. + +Also, by default, warning and error messages are sent to stderr. You can redirect diagnostic +output using either tidySetErrorFile() or tidySetErrorBuffer(). See tidy.h for details. + + +\section app_notes Application Notes + +Of course, there are functions to parse and save both markup and configuration files. For the adventurous, it is possible to create new input sources and output sinks. For example, a URL source could pull the markup from a given URL. + +It is also worth remembering that an application may instantiate any number of document and buffer objects. They are fairly cheap to initialize and destroy (just memory allocation and zeroing, really), so they may be created and destroyed locally, as needed. There is no problem keeping them around a while for keeping state. For example, a server app might keep a global document as a master configuration. As documents are parsed, they can copy their configuration data from the master instance. See tidyOptCopyConfig(). If the master copy is initialized at startup, no synchronization is necessary. + \section example_hello tidylib example