File: udm_vars.h

package info (click to toggle)
mnogosearch 3.3.7-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 17,484 kB
  • ctags: 4,565
  • sloc: ansic: 94,097; xml: 16,864; sh: 8,915; makefile: 1,727; perl: 801; php: 561; sql: 15
file content (70 lines) | stat: -rw-r--r-- 4,066 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Copyright (C) 2000-2006 Lavtech.com corp. All rights reserved.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
*/

#ifndef _UDM_VARS_H
#define _UDM_VARS_H

extern __C_LINK UDM_VARLIST * __UDMCALL UdmVarListInit(UDM_VARLIST * vars);
extern __C_LINK void __UDMCALL UdmVarListFree(UDM_VARLIST * vars);
extern void UdmVarFree(UDM_VAR *);
extern int UdmVarType(UDM_VAR *);

extern int UdmVarListAddEnviron(UDM_VARLIST *vars, const char *name);

extern int UdmVarAppendStrn(UDM_VAR *var, const char *val, size_t len);
extern __C_LINK int __UDMCALL UdmVarListAddStr(UDM_VARLIST * vars,const char * name, const char * val);
extern int UdmVarListAddQueryStr(UDM_VARLIST * vars,const char * name, const char * val);
extern int UdmVarListAddInt(UDM_VARLIST * vars,const char * name, int val);
extern int UdmVarListAddUnsigned(UDM_VARLIST * vars, const char * name, uint4 val);
extern int UdmVarListAddDouble(UDM_VARLIST * vars, const char * name, double val);
extern int UdmVarListAdd(UDM_VARLIST * Lst,UDM_VAR * S);
extern int UdmVarListDel(UDM_VARLIST * Lst,const char *name);
extern int UdmVarListDelBySection(UDM_VARLIST * Lst, int secno);
extern int UdmVarListDelByName(UDM_VARLIST * Lst, const char *name);
extern int UdmVarListReplace(UDM_VARLIST * Lst,UDM_VAR * S);
extern int UdmVarListCreateObject(UDM_VARLIST *Lst,
                                  const char *name, int type,
                                  UDM_VAR **args, size_t nargs);
extern int UdmVarListInvokeMethod(UDM_VARLIST *Lst,
                                  UDM_VAR *Var, const char *method,
                                  UDM_VAR **args, size_t nargs);
extern int UdmVarListAddLst(UDM_VARLIST * Lst,UDM_VARLIST *Src, const char *name, const char *w);
extern int UdmVarListInsLst(UDM_VARLIST * Lst,UDM_VARLIST *Src, const char *name, const char *w);
extern int UdmVarListReplaceLst(UDM_VARLIST * Lst,UDM_VARLIST *Src, const char *name, const char *w);
extern int UdmVarListMerge(UDM_VARLIST * Lst,UDM_VARLIST *Src1, UDM_VARLIST *Src2);

extern __C_LINK int __UDMCALL UdmVarListReplaceStr(UDM_VARLIST * vars,const char * name,const char * val);
extern __C_LINK int __UDMCALL UdmVarListReplaceInt(UDM_VARLIST * vars,const char * name,int val);
extern __C_LINK int __UDMCALL UdmVarListReplaceUnsigned(UDM_VARLIST * vars, const char * name, uint4 val);
extern int UdmVarListReplaceDouble(UDM_VARLIST * vars, const char * name, double val);

size_t UdmDSTRParse(UDM_DSTR *d, const char *fmt, UDM_VARLIST *L);

extern int UdmVarListInsStr(UDM_VARLIST * vars,const char * name,const char * val);
extern int UdmVarListInsInt(UDM_VARLIST * vars,const char * name,int val);

extern UDM_VAR *UdmVarListFind(UDM_VARLIST * vars,const char * name);
extern UDM_VAR *UdmVarListFindWithValue(UDM_VARLIST * vars,const char * name,const char * val);

extern __C_LINK const char * __UDMCALL UdmVarListFindStr(UDM_VARLIST * vars,const char * name,const char * defval);
extern __C_LINK int          UdmVarListFindInt(UDM_VARLIST * vars,const char * name,int defval);
extern __C_LINK int          UdmVarListFindBool(UDM_VARLIST * vars,const char * name,int defval);
extern __C_LINK unsigned     UdmVarListFindUnsigned(UDM_VARLIST * vars, const char * name, unsigned defval);
extern __C_LINK double       UdmVarListFindDouble(UDM_VARLIST * vars, const char * name, double defval);

extern int UdmVarListConvert(UDM_VARLIST *L, UDM_CONV *conv);
#endif