diff options
author | Charles Edward Pax <charles.pax@gmail.com> | 2017-07-27 23:59:42 +0800 |
---|---|---|
committer | Charles Edward Pax <charles.pax@gmail.com> | 2017-07-27 23:59:42 +0800 |
commit | 3e186b9e678c79d366708eea4a3e94eb8d32bc85 (patch) | |
tree | 43b554cf42307ec2d8bf59f8a8540ba9e8764c30 | |
parent | f7120446a54e3d42ba13d6d2cf90068dc9b3528a (diff) |
Doxygen help.c.
-rw-r--r-- | src/help.c | 80 |
1 files changed, 78 insertions, 2 deletions
@@ -1,3 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2013-2017, Andrés Martinelli <andmarti@gmail.com * + * All rights reserved. * + * * + * This file is a part of SC-IM * + * * + * SC-IM is a spreadsheet program that is based on SC. The original authors * + * of SC are James Gosling and Mark Weiser, and mods were later added by * + * Chuck Martin. * + * * + * Redistribution and use in source and binary forms, with or without * + * modification, are permitted provided that the following conditions are met: * + * 1. Redistributions of source code must retain the above copyright * + * notice, this list of conditions and the following disclaimer. * + * 2. Redistributions in binary form must reproduce the above copyright * + * notice, this list of conditions and the following disclaimer in the * + * documentation and/or other materials provided with the distribution. * + * 3. All advertising materials mentioning features or use of this software * + * must display the following acknowledgement: * + * This product includes software developed by Andrés Martinelli * + * <andmarti@gmail.com>. * + * 4. Neither the name of the Andrés Martinelli nor the * + * names of other contributors may be used to endorse or promote products * + * derived from this software without specific prior written permission. * + * * + * THIS SOFTWARE IS PROVIDED BY ANDRES MARTINELLI ''AS IS'' AND ANY * + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * + * DISCLAIMED. IN NO EVENT SHALL ANDRES MARTINELLI BE LIABLE FOR ANY * + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;* + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * + *******************************************************************************/ + +/** + * \file help.c + * \author Andrés Martinelli <andmarti@gmail.com> + * \date 2017-07-18 + * \brief Help functions + */ + #ifdef NCURSES #include <ncurses.h> #include <unistd.h> @@ -22,7 +66,12 @@ static char word_looked[50] = ""; extern WINDOW * main_win; extern WINDOW * input_win; -// Load the contents of help_doc into memory +/** + * \brief Load the contents of help_doc into memory + * + * \return 0 on success; -1 on error + */ + int load_help () { register FILE * f; int line; @@ -90,7 +139,12 @@ int load_help () { return 0; } -// main function of help +/** + * \brief Main function of help + * + * \return none + */ + void help() { if (load_help() == -1) { sc_error("Cannot open help file"); @@ -251,6 +305,15 @@ void help() { wrefresh(main_win); } +/** + * \brief TODO Document find_word() + * + * \param[in] word + * \param[in] order + * + * \return none + */ + void find_word(char * word, char order) { int i; if (order == 'f') { // forward @@ -278,6 +341,12 @@ void find_word(char * word, char order) { return; } +/** + * \brief TODO Document show_lines() + * + * \return gwretch + */ + int show_lines() { int lineno, i, k, key = 0, bold = 0 ; @@ -339,6 +408,13 @@ int show_lines() { } #else // implement this function if want to create another UI + +/** + * @brief Template for a second help() function + * + * returns: none + */ + void help() { } #endif |