modified: SpatialOmicsCoord.py
[GalaxyCodeBases.git] / c_cpp / etc / calc / custom / c_help.c
blob6b26749ff0a24befac990bcf88a6108ff79f5560
1 /*
2 * c_help - custom help function
4 * Copyright (C) 1999-2004 Landon Curt Noll
6 * Calc is open software; you can redistribute it and/or modify it under
7 * the terms of the version 2.1 of the GNU Lesser General Public License
8 * as published by the Free Software Foundation.
10 * Calc is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
13 * Public License for more details.
15 * A copy of version 2.1 of the GNU Lesser General Public License is
16 * distributed with calc under the filename COPYING-LGPL. You should have
17 * received a copy with calc; if not, write to Free Software Foundation, Inc.
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * @(#) $Revision: 30.1 $
21 * @(#) $Id: c_help.c,v 30.1 2007/03/16 11:10:04 chongo Exp $
22 * @(#) $Source: /usr/local/src/bin/calc/custom/RCS/c_help.c,v $
24 * Under source code control: 1997/03/09 05:25:41
25 * File existed as early as: 1997
27 * chongo <was here> /\oo/\ http://www.isthe.com/chongo/
28 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
32 #if defined(CUSTOM)
34 #include "have_unistd.h"
35 #if defined(HAVE_UNISTD_H)
36 #include <unistd.h>
37 #endif
39 #include "have_const.h"
40 #include "value.h"
41 #include "custom.h"
43 #include "have_unused.h"
47 * c_help - custom help function
49 * This function assumes that a help file with the same name as
50 * the custom function has been installed by the custom/Makefile
51 * (as listed in the CUSTOM_HELP makefile variable) under the
52 * CUSTOMHELPDIR == HELPDIR/custhelp directory.
54 * The help command first does a search in HELPDIR and later
55 * in CUSTOMHELPDIR. If a custom help file has the same name
56 * as a file under HELPDIR then help will display the HELPDIR
57 * file and NOT the custom file. This function will ignore
58 * and HELPDIR file and work directly with the custom help file.
60 * given:
61 * vals[0] name of the custom help file to directly access
63 /*ARGSUSED*/
64 VALUE
65 c_help(char UNUSED *name, int UNUSED count, VALUE **vals)
67 VALUE result; /* what we will return */
70 * parse args
72 if (vals[0]->v_type != V_STR) {
73 math_error("custom help arg 1 must be a string");
74 /*NOTREACHED*/
78 * give the help
80 customhelp((char *)vals[0]->v_str);
83 * return NULL
85 result.v_type = V_NULL;
86 return result;
89 #endif /* CUSTOM */