mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.12.2.2
This commit is contained in:
@@ -363,6 +363,25 @@ Step 5: Write your custom function
|
||||
very_tiny_variable = z1tol(z_num);
|
||||
}
|
||||
|
||||
You can (and should) add debugging statements to your custom code
|
||||
by examining bit 8 of the calc_debug config flag:
|
||||
|
||||
if (conf->calc_debug & CALCDBG_CUSTOM) {
|
||||
fprintf(stderr, "%ssome custom debug note: msg\n",
|
||||
(conf->tab_ok ? "\t" : ""),
|
||||
((msg == NULL) ? "((NULL))" : msg));
|
||||
}
|
||||
|
||||
One is able to set bit 8 by way of the calc command line:
|
||||
|
||||
calc -D 128
|
||||
|
||||
See the calc man page for details. One may also set that bit
|
||||
while running calc by way of the config() builtin function:
|
||||
|
||||
config("calc_debug", 128);
|
||||
|
||||
See the help/config file for details on calc_debug.
|
||||
|
||||
Step 6: Register the function in the custom interface table
|
||||
|
||||
@@ -642,8 +661,8 @@ Step 12: Contribute
|
||||
## received a copy with calc; if not, write to Free Software Foundation, Inc.
|
||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
##
|
||||
## @(#) $Revision: 30.3 $
|
||||
## @(#) $Id: HOW_TO_ADD,v 30.3 2007/07/13 23:45:54 chongo Exp $
|
||||
## @(#) $Revision: 30.4 $
|
||||
## @(#) $Id: HOW_TO_ADD,v 30.4 2007/09/21 01:27:27 chongo Exp $
|
||||
## @(#) $Source: /usr/local/src/cmd/calc/custom/RCS/HOW_TO_ADD,v $
|
||||
##
|
||||
## Under source code control: 1997/03/10 03:03:21
|
||||
|
@@ -524,7 +524,11 @@ DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
|
||||
LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
|
||||
"-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
|
||||
LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
|
||||
ifdef ALLOW_CUSTOM
|
||||
LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
|
||||
else
|
||||
LIBCUSTCALC_SHLIB=
|
||||
endif
|
||||
#
|
||||
CC_STATIC=
|
||||
LD_STATIC=
|
||||
@@ -553,7 +557,11 @@ CC_SHARE= -fPIC
|
||||
DEFAULT_LIB_INSTALL_PATH= ${PWD}:${LIBDIR}:/usr/local/lib
|
||||
LD_SHARE= ${DARWIN_ARCH}
|
||||
LIBCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib
|
||||
ifdef ALLOW_CUSTOM
|
||||
LIBCUSTCALC_SHLIB= -single_module -undefined dynamic_lookup -dynamiclib
|
||||
else
|
||||
LIBCUSTCALC_SHLIB=
|
||||
endif
|
||||
#
|
||||
CC_STATIC=
|
||||
LD_STATIC= ${DARWIN_ARCH}
|
||||
@@ -601,7 +609,11 @@ DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
|
||||
LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
|
||||
"-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
|
||||
LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
|
||||
ifdef ALLOW_CUSTOM
|
||||
LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
|
||||
else
|
||||
LIBCUSTCALC_SHLIB=
|
||||
endif
|
||||
#
|
||||
CC_STATIC=
|
||||
LD_STATIC=
|
||||
@@ -620,12 +632,12 @@ MAKE= gmake
|
||||
#
|
||||
endif
|
||||
|
||||
######################
|
||||
# Sun Solaris target #
|
||||
######################
|
||||
################
|
||||
# SunOS target #
|
||||
################
|
||||
|
||||
# XXX - this needs to be tested
|
||||
ifeq ($(target),solaris)
|
||||
ifeq ($(target),SunOS)
|
||||
#
|
||||
BLD_TYPE= calc-dynamic-only
|
||||
#
|
||||
@@ -634,7 +646,11 @@ DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
|
||||
LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
|
||||
"-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
|
||||
LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
|
||||
ifdef ALLOW_CUSTOM
|
||||
LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
|
||||
else
|
||||
LIBCUSTCALC_SHLIB=
|
||||
endif
|
||||
#
|
||||
CC_STATIC=
|
||||
LIBCALC_STATIC=
|
||||
@@ -715,7 +731,11 @@ DEFAULT_LIB_INSTALL_PATH= ${PWD}:/lib:/usr/lib:${LIBDIR}:/usr/local/lib
|
||||
LD_SHARE= "-Wl,-rpath,${DEFAULT_LIB_INSTALL_PATH}" \
|
||||
"-Wl,-rpath-link,${DEFAULT_LIB_INSTALL_PATH}"
|
||||
LIBCALC_SHLIB= -shared "-Wl,-soname,libcalc${LIB_EXT_VERSION}"
|
||||
ifdef ALLOW_CUSTOM
|
||||
LIBCUSTCALC_SHLIB= -shared "-Wl,-soname,libcustcalc${LIB_EXT_VERSION}"
|
||||
else
|
||||
LIBCUSTCALC_SHLIB=
|
||||
endif
|
||||
#
|
||||
CC_STATIC=
|
||||
LIBCALC_STATIC=
|
||||
@@ -757,7 +777,6 @@ CFLAGS= ${ICFLAGS} ${CCOPT}
|
||||
#
|
||||
ILDFLAGS= ${COMMON_LDFLAGS}
|
||||
LDFLAGS= ${LD_DEBUG} ${ILDFLAGS}
|
||||
|
||||
#endif /* end of skip for non-Gnu makefiles */
|
||||
|
||||
#######################################################################
|
||||
|
Reference in New Issue
Block a user