diff options
author | Charles Edward Pax <charles.pax@gmail.com> | 2017-07-29 16:25:15 -0400 |
---|---|---|
committer | Charles Edward Pax <charles.pax@gmail.com> | 2017-07-29 16:25:15 -0400 |
commit | a2fbd1b04efd61c61b964b69fd007e19ddd7930e (patch) | |
tree | f3f118241ede277c038a2a7291eb503be093a056 /src | |
parent | 403074fdb7872051eb95737f4a8bff88a8310a18 (diff) |
Doxygen comments in trigger.c.
Diffstat (limited to 'src')
-rw-r--r-- | src/trigger.c | 92 |
1 files changed, 87 insertions, 5 deletions
diff --git a/src/trigger.c b/src/trigger.c index 4de1a88..cf09c09 100644 --- a/src/trigger.c +++ b/src/trigger.c @@ -1,8 +1,49 @@ -/* - * R.Pollak - * This is general trigger support, Idea behind triggers, is when ever a value is changed triggers will be called on Write - * and when ever a value will be evaluated a READ trigger will be fired - * ent structure is extended with trigger structure +/******************************************************************************* + * 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 trigger.c + * \author Andrés Martinelli <andmarti@gmail.com> + * \date 2017-07-18 + * \brief TODO Write a tbrief file description. + * \details This is general trigger support. The idea behind triggers is + * that whenever a value is changed, triggers will be called on Write. And + * whenever a value will be evaluated a READ trigger will be fired. ent + * structure is extended with trigger structure. * * Triggers need mode,type,file,function flags * mode - can be R,W,RW @@ -34,6 +75,18 @@ #include "lua.h" #endif +/** + * \brief TODO Document set_trigger() + * + * \param[in] r + * \param[in] c + * \param[in] rf + * \param[in] cf + * \param[in] str + * + * \return none + */ + void set_trigger(int r, int c, int rf, int cf, char * str) { if (any_locked_cells(r, c, rf, cf)) { sc_error("Locked cells encountered. Nothing changed"); @@ -107,6 +160,17 @@ void set_trigger(int r, int c, int rf, int cf, char * str) { return; } +/** + * \brief TODO Document del_trigger() + * + * \param[in] r + * \param[in] c + * \param[in] rf + * \param[in] cf + * + * \return none + */ + void del_trigger(int r, int c, int rf, int cf ) { if (any_locked_cells(r, c, rf, cf)) { sc_error("Locked cells encountered. Nothing changed"); @@ -135,6 +199,15 @@ void del_trigger(int r, int c, int rf, int cf ) { static int in_trigger = 0; +/** + * \brief TODO Document do_trigger() + * + * \param[in] p + * \param[in] rw + * + * \return none + */ + void do_trigger( struct ent *p , int rw) { struct trigger * trigger = p->trigger; if(in_trigger) return; @@ -149,6 +222,15 @@ void do_trigger( struct ent *p , int rw) { return; } +/** + * \brief TODO Document do_C_Trigger_cell() + * + * \param[in] p + * \param[in] rw + * + * \return none + */ + void do_C_Trigger_cell(struct ent * p, int rw) { int (*function)(struct ent *, int ); |