Subject Re: [firebird-support] Re: Trouble installing UDF function on Linux
Author Helen Borrie
At 10:46 PM 29/06/2004 +0000, you wrote:

>The RTRIM function would do the trick for me. Problem is I get the
>same error. I am using the declare statement found in the
>/opt/interbase/examples/udf.sql file:
>
>DECLARE EXTERNAL FUNCTION trim
> CSTRING(256)
> RETURNS CHAR (80) FREE_IT
> ENTRY_POINT 'fn_trim' MODULE_NAME 'udflib';
>
>Module name is not correct there, I've changed it to 'ib_udf' already.
>The entry point could be wrong too but I dont know what the correct
>one would be.

You have picked up the declaration from the example file for *writing* udfs.

The standard library is called ib_udf and the declarations are in
ib_udf.sql. Look in the ../UDF library for this file - that's where it
*should* be but it did tend to move about a bit during the Fb 1.0
releases. If you don't have it at all, you can pick it up from the CVS
tree.
(http://cvs.sourceforge.net/viewcvs.py/*checkout*/firebird/interbase/extlib/ib_udf.sql?rev=1.4)

The declaration for RTRIM in ib_udf.sql is:

*****************************************/
DECLARE EXTERNAL FUNCTION rtrim
CSTRING(80)
RETURNS CSTRING(80) FREE_IT
ENTRY_POINT 'IB_UDF_rtrim' MODULE_NAME 'ib_udf';

/heLen