/*
 *   FreeAdhocUDF - copyright (c) 2004/2006 adhoc dataservice GmbH
 *   Christoph Theuring / Peter Mandrella / Georg Horn
 *   (bug-)reports only to udf@adhoc-data.de
 *      based on FreeUDFLibC - copyright (c) 1999 Gregory Deatz
 *   Declarations script for all FreeAdhocUDF UDFs
 *   length of some cstring = 8190 or 4095 
 *   because so you can use one this UDF 4 (8) times in a piped string
 *   4 x 8190 = 32760 < 32762 (15 bit - 6 byte internal use)
 *   Functions in alphabetical order
 */

/******************************************************************************/
/****              User Defined Functions - converting functions           ****/
/******************************************************************************/

/* distance */

DECLARE EXTERNAL FUNCTION F_C_IN2M
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'in2m' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_FT2M
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ft2m' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_YD2M
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'yd2m' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_MILE2KM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'mile2km' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SM2KM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sm2km' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_FM2M
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'fm2m' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_P2MM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'p2mm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_M2IN
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'm2in' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_M2FT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'm2ft' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_M2YD
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'm2yd' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_KM2MILE
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'km2mile' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_KM2SM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'km2sm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_M2FM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'm2fm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_MM2P
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'mm2p' MODULE_NAME 'FreeAdhocUDF';

/* area */

DECLARE EXTERNAL FUNCTION F_C_AR2SQM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ar2sqm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_HA2SQM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ha2sqm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_MORGEN2SQM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'morgen2sqm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQFT2SQM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqft2sqm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_AC2SQM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ac2sqm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQYD2SQM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqyd2sqm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQM2AR
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqm2ar' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQM2HA
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqm2ha' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQM2MORGEN
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqm2morgen' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQM2SQFT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqm2sqft' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQM2AC
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqm2ac' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_SQM2SQYD
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'sqm2sqyd' MODULE_NAME 'FreeAdhocUDF';

/* volume */

DECLARE EXTERNAL FUNCTION F_C_BBL2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'bbl2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_GBFLOZ2ML
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'gbfloz2ml' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_USFLOZ2ML
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'usfloz2ml' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_GBPT2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'gbpt2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_USPT2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'uspt2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_GBQT2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'gbqt2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_USQT2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'usqt2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_GBGAL2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'gbgal2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_USGAL2L
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'usgal2l' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_RT2CBM
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'rt2cbm' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2BBL
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2bbl' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_ML2GBFLOZ
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ml2gbfloz' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_ML2USFLOZ
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ml2usfloz' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2GBPT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2gbpt' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2USPT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2uspt' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2GBQT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2gbqt' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2USQT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2usqt' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2GBGAL
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2gbgal' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_L2USGAL
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'l2usgal' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_CBM2RT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'cbm2rt' MODULE_NAME 'FreeAdhocUDF';

/* weight */

DECLARE EXTERNAL FUNCTION F_C_CT2G
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ct2g' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_OZ2G
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'oz2g' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_OZTR2G
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'oztr2g' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_LB2KG
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'lb2kg' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_G2CT
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'g2ct' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_G2OZ
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'g2oz' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_G2OZTR 
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'g2oztr' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_KG2LB
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'kg2lb' MODULE_NAME 'FreeAdhocUDF';

/* technical */

DECLARE EXTERNAL FUNCTION F_C_G2T
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'g2t' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_BAR2TORR
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'bar2torr' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_BAR2PA
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'bar2pa' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_PSI2PA
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'psi2pa' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_TORR2PA 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'torr2pa' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_CAL2J 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'cal2j' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_PS2KW 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'ps2kw' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_BHP2KW
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'bhp2kw' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_T2G 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 't2g' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_TORR2BAR
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'torr2bar' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_PA2BAR 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'pa2bar' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_PA2PSI
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'pa2psi' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_PA2TORR
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'pa2torr' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_J2CAL
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'j2cal' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_KW2PS 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'kw2ps' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_KW2BHP 
    DOUBLE PRECISION 
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'kw2bhp' MODULE_NAME 'FreeAdhocUDF';

/* temperature */

DECLARE EXTERNAL FUNCTION F_C_C2F
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'c2f' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_C_F2C
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'f2c' MODULE_NAME 'FreeAdhocUDF';

/* number system */

DECLARE EXTERNAL FUNCTION F_ROMAN2ARABIC
    CSTRING(50)
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'roman2arabic' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_ARABIC2ROMAN
    INTEGER
    RETURNS CSTRING(250) FREE_IT
    ENTRY_POINT 'arabic2roman' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CONVERTFROM33
    CSTRING(254)
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'convertfrom33' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CONVERTFROMBASE
    CSTRING(254),
    INTEGER,
    CSTRING(254)
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'convertfrombase' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CONVERTTO33
    INTEGER
    RETURNS CSTRING(254) FREE_IT
    ENTRY_POINT 'convertto33' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_CONVERTTOBASE
    INTEGER,
    INTEGER,
    CSTRING(254)
    RETURNS CSTRING(254) FREE_IT
    ENTRY_POINT 'converttobase' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_INTTOHEX
    INTEGER,
    INTEGER
    RETURNS CSTRING(254) FREE_IT
    ENTRY_POINT 'inttohex' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_HEXTOINT
    CSTRING(20)
    RETURNS INTEGER FREE_IT
    ENTRY_POINT 'hextoint' MODULE_NAME 'FreeAdhocUDF';

/* geometrical */

DECLARE EXTERNAL FUNCTION F_DEGTORAD
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'degtorad' MODULE_NAME 'FreeAdhocUDF';

DECLARE EXTERNAL FUNCTION F_RADTODEG
    DOUBLE PRECISION
    RETURNS DOUBLE PRECISION FREE_IT
    ENTRY_POINT 'radtodeg' MODULE_NAME 'FreeAdhocUDF';

/* adhoc 2006-11-30 */
