From 4510f5c31c36b93451c78f396fe457fce3ded8da Mon Sep 17 00:00:00 2001 From: Alexey Gladkov Date: Mon, 6 Jan 2014 04:42:42 +0400 Subject: [PATCH] docs: Add header for libkeymap Signed-off-by: Alexey Gladkov --- .gitignore | 2 ++ docs/reference/libkeymap/Doxyfile.in | 4 ++-- docs/reference/libkeymap/Doxyheader | 31 +++++++++++++++++++++++++++++++ docs/reference/libkeymap/Makefile.am | 21 ++++++++++++--------- src/libkeymap/keymap/charset.h | 4 ++++ src/libkeymap/keymap/common.h | 9 +++++---- src/libkeymap/keymap/context.h | 5 +++++ src/libkeymap/keymap/dump.h | 4 ++++ src/libkeymap/keymap/findfile.h | 7 +++++++ src/libkeymap/keymap/kernel.h | 4 ++++ src/libkeymap/keymap/kmap.h | 4 ++++ src/libkeymap/keymap/logging.h | 4 ++++ 12 files changed, 84 insertions(+), 15 deletions(-) create mode 100644 docs/reference/libkeymap/Doxyheader diff --git a/.gitignore b/.gitignore index 93712e4..cc0a953 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,8 @@ install-sh libtool missing Makefile +docs/reference/libkeymap/Doxyfile +docs/reference/libkeymap/html src/chvt src/clrunimap src/deallocvt diff --git a/docs/reference/libkeymap/Doxyfile.in b/docs/reference/libkeymap/Doxyfile.in index dcd4090..7ca07eb 100644 --- a/docs/reference/libkeymap/Doxyfile.in +++ b/docs/reference/libkeymap/Doxyfile.in @@ -648,7 +648,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = @SOURCEDIR@/keymap +INPUT = @SOURCEDIR@/keymap @BUILDDIR@/Doxyheader # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -666,7 +666,7 @@ INPUT_ENCODING = UTF-8 # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl -FILE_PATTERNS = +FILE_PATTERNS = *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. diff --git a/docs/reference/libkeymap/Doxyheader b/docs/reference/libkeymap/Doxyheader new file mode 100644 index 0000000..aac155a --- /dev/null +++ b/docs/reference/libkeymap/Doxyheader @@ -0,0 +1,31 @@ +/** \mainpage LibKeymap API Documentation + * + * \section intro_sec Introduction + * + * Libkeymap is a library for manipulating kernel keymaps. This library was + * created from the loadkeys/dumpkeys utilities. I'm still trying to make it + * faster and easier to use, in addition to providing better documentation. + * + * + * \section license_sec License + * + * LibKeymap is released under the following license: + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Legal disclaimer: note that depending on where you are, the use of + * cryptography may be limited or forbidden by law. Before using this library, + * make sure you are legally entitled to do so. + */ diff --git a/docs/reference/libkeymap/Makefile.am b/docs/reference/libkeymap/Makefile.am index b11720c..8fe90af 100644 --- a/docs/reference/libkeymap/Makefile.am +++ b/docs/reference/libkeymap/Makefile.am @@ -1,18 +1,21 @@ DOC_MODULE = libkeymap -EXTRA_DIST = Doxyfile.in -CLEANFILES = Doxyfile +EXTRA_DIST = Doxyfile.in Doxyheader +CLEANFILES = Doxyfile html/* -install-data-hook: +htmldir = $(docdir)/html +html_DATA = html/* + +$(abs_builddir)/Doxyfile: $(abs_srcdir)/Doxyfile.in sed \ -e 's,[@]VERSION[@],$(VERSION),g' \ -e 's,[@]MODULE[@],$(DOC_MODULE),g' \ -e 's,[@]TOPDIR[@],$(abs_top_srcdir),g' \ -e 's,[@]SOURCEDIR[@],$(abs_top_srcdir)/src/$(DOC_MODULE),g' \ - -e 's,[@]BUILDDIR[@],$(DESTDIR)$(docdir),g' \ - < $(srcdir)/Doxyfile.in >$(builddir)/Doxyfile - mkdir -p -- $(DESTDIR)$(docdir) - doxygen $(builddir)/Doxyfile + -e 's,[@]BUILDDIR[@],$(abs_builddir),g' \ + <$< >$@ + +apidocs: $(abs_builddir)/Doxyfile + doxygen $< -uninstall-hook: - rm -rf -- $(DESTDIR)$(docdir)/html +html/*: apidocs diff --git a/src/libkeymap/keymap/charset.h b/src/libkeymap/keymap/charset.h index 153dd36..689836c 100644 --- a/src/libkeymap/keymap/charset.h +++ b/src/libkeymap/keymap/charset.h @@ -1,3 +1,7 @@ +/** + * @file charset.h + * @brief Functions for charset manipulation. + */ #ifndef LK_CHARSET_H #define LK_CHARSET_H diff --git a/src/libkeymap/keymap/common.h b/src/libkeymap/keymap/common.h index 55deef5..6b9cead 100644 --- a/src/libkeymap/keymap/common.h +++ b/src/libkeymap/keymap/common.h @@ -1,9 +1,10 @@ +/** + * @file common.h + * @brief Functions for initialization and release of resources as well + * as functions to handle parameters. + */ #ifndef LK_COMMON_H #define LK_COMMON_H -/** @file - * This file contains functions for initialization and release of resources - * as well as functions to handle parameters. - */ #include diff --git a/src/libkeymap/keymap/context.h b/src/libkeymap/keymap/context.h index 0a01745..c8c1189 100644 --- a/src/libkeymap/keymap/context.h +++ b/src/libkeymap/keymap/context.h @@ -1,3 +1,8 @@ +/** + * @file context.h + * @brief Header contains flags, keywords and context structure. + */ + #ifndef LK_CONTEXT_H #define LK_CONTEXT_H diff --git a/src/libkeymap/keymap/dump.h b/src/libkeymap/keymap/dump.h index e38e478..a23bb7f 100644 --- a/src/libkeymap/keymap/dump.h +++ b/src/libkeymap/keymap/dump.h @@ -1,3 +1,7 @@ +/** + * @file dump.h + * @brief Functions for keymap output. + */ #ifndef LK_DUMP_H #define LK_DUMP_H diff --git a/src/libkeymap/keymap/findfile.h b/src/libkeymap/keymap/findfile.h index c59efbe..8af63c7 100644 --- a/src/libkeymap/keymap/findfile.h +++ b/src/libkeymap/keymap/findfile.h @@ -1,9 +1,16 @@ +/** + * @file findfile.h + * @brief Functions for search, open and close a file objects. + */ #ifndef LK_FINDFILE_H #define LK_FINDFILE_H #include #include +/** + * @brief Structure contains information about an open keymap file. + */ typedef struct lkfile { FILE *fd; int pipe; diff --git a/src/libkeymap/keymap/kernel.h b/src/libkeymap/keymap/kernel.h index 7e6a026..01a0fd8 100644 --- a/src/libkeymap/keymap/kernel.h +++ b/src/libkeymap/keymap/kernel.h @@ -1,3 +1,7 @@ +/** + * @file kernel.h + * @brief Functions for loading objects into the kernel. + */ #ifndef LK_KERNEL_H #define LK_KERNEL_H diff --git a/src/libkeymap/keymap/kmap.h b/src/libkeymap/keymap/kmap.h index ae2715a..b16d31f 100644 --- a/src/libkeymap/keymap/kmap.h +++ b/src/libkeymap/keymap/kmap.h @@ -1,3 +1,7 @@ +/** + * @file kmap.h + * @brief Functions for keymaps manipulation (add/delete keys). + */ #ifndef LK_KMAP_H #define LK_KMAP_H diff --git a/src/libkeymap/keymap/logging.h b/src/libkeymap/keymap/logging.h index b5cd7c0..b16c0f9 100644 --- a/src/libkeymap/keymap/logging.h +++ b/src/libkeymap/keymap/logging.h @@ -1,3 +1,7 @@ +/** + * @file logging.h + * @brief Functions for logging. + */ #ifndef LK_LOGGING_H #define LK_LOGGING_H -- 2.7.4