summaryrefslogtreecommitdiff
path: root/gs/src/gsfunc.c
diff options
context:
space:
mode:
authorL Peter Deutsch <lpd@ghostscript.com>2000-03-19 07:33:08 +0000
committerL Peter Deutsch <lpd@ghostscript.com>2000-03-19 07:33:08 +0000
commitd756f2c8695680ee042dc772084f3866e8075277 (patch)
treec7d9e2876dd98414f00dc6dbc982548db3571f7b /gs/src/gsfunc.c
parent51d9850c022eb54f2cc8bcf4fb5d1510f8a1c847 (diff)
Splits off "vanilla" Functions into separate files, in anticipation of
removing them (they were only used to implement PostScript Calculator Functions). git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@143 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gsfunc.c')
-rw-r--r--gs/src/gsfunc.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/gs/src/gsfunc.c b/gs/src/gsfunc.c
index c0b8b55b1..9ae70254b 100644
--- a/gs/src/gsfunc.c
+++ b/gs/src/gsfunc.c
@@ -107,71 +107,3 @@ fn_common_get_params(const gs_function_t *pfn, gs_param_list *plist)
}
return ecode;
}
-
-/* ---------------- Vanilla functions ---------------- */
-
-/* GC descriptor */
-private_st_function_Va();
-
-/*
- * Test whether a Vanilla function is monotonic. (This information is
- * provided at function definition time.)
- */
-private int
-fn_Va_is_monotonic(const gs_function_t * pfn_common,
- const float *lower, const float *upper,
- gs_function_effort_t effort)
-{
- const gs_function_Va_t *const pfn =
- (const gs_function_Va_t *)pfn_common;
-
- return pfn->params.is_monotonic;
-}
-
-/* Free the parameters of a Vanilla function. */
-void
-gs_function_Va_free_params(gs_function_Va_params_t * params,
- gs_memory_t * mem)
-{
- gs_free_object(mem, params->eval_data, "eval_data");
- fn_common_free_params((gs_function_params_t *) params, mem);
-}
-
-/* Allocate and initialize a Vanilla function. */
-int
-gs_function_Va_init(gs_function_t ** ppfn,
- const gs_function_Va_params_t * params,
- gs_memory_t * mem)
-{
- static const gs_function_head_t function_Va_head = {
- function_type_Vanilla,
- {
- NULL, /* filled in from params */
- (fn_is_monotonic_proc_t) fn_Va_is_monotonic,
- gs_function_get_info_default,
- fn_common_get_params, /****** WHAT TO DO ABOUT THIS? ******/
- (fn_free_params_proc_t) gs_function_Va_free_params,
- fn_common_free
- }
- };
- int code;
-
- *ppfn = 0; /* in case of error */
- code = fn_check_mnDR((const gs_function_params_t *)params, 1, params->n);
- if (code < 0)
- return code;
- {
- gs_function_Va_t *pfn =
- gs_alloc_struct(mem, gs_function_Va_t, &st_function_Va,
- "gs_function_Va_init");
-
- if (pfn == 0)
- return_error(gs_error_VMerror);
- pfn->params = *params;
- pfn->head = function_Va_head;
- pfn->head.procs.evaluate = params->eval_proc;
- pfn->head.is_monotonic = params->is_monotonic;
- *ppfn = (gs_function_t *) pfn;
- }
- return 0;
-}