-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhb_extra.c
30 lines (25 loc) · 817 Bytes
/
hb_extra.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//Copyright (c) 2024 Eric Lendvai, MIT License unless specified otherwise
#include "hbapi.h"
#include "hbapiitm.h"
//Modified version of contrib\hbfoxpro\relfunc.c Copyright 2016 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
//Changes Copyright (c) 2024 Eric Lendvai, MIT license.
HB_FUNC( EL_INLISTPOS )
{
int iResult = 0;
int iPCount = hb_pcount();
if( iPCount > 1 )
{
PHB_ITEM pValue = hb_param( 1, HB_IT_ANY );
int iParam;
for( iParam = 2; iParam <= iPCount; ++iParam )
{
if( hb_itemEqual( pValue, hb_param( iParam, HB_IT_ANY ) ) )
{
iResult = iParam -1;
break;
}
}
}
hb_retni( iResult );
}
//=================================================================================================================