View Source

[modwtcl]
apreq.h
dist/
libapreq1/
mod_wtcl.c
mod_wtcl.h
setupExclude.txt
util/
win.def
win.mak
wt1.1/
WtAppTable.c
WtAppTable.h
WtBasicCmds.c
WtBasicCmds.h
WtClientRequest.c
WtClientRequest.h
WtCollection.c
WtCollection.h
WtCollectionCmds.c
WtCollectionCmds.h
WtContext.c
WtContext.h
WtContextEvents.c
WtContextEvents.h
WtCookie.c
WtCookie.h
WtDbSession.c
WtDbSession.h
WtExecute.c
WtExecute.h
WtHtmlEntities.c
WtHtmlEntities.h
WtInitCmds.c
WtInitCmds.h
WtMtTable.c
WtMtTable.h
WtMultiTable.c
WtMultiTable.h
WtOS.h
WtProcSession.c
WtProcSession.h
WtResponse.c
WtResponse.h
WtServerCmds.c
WtServerCmds.h
WtSession.c
WtSession.h
WtSettings.c
WtSettings.h
WtTable.c
WtTable.h
WtTableCmds.c
WtTableCmds.h
WtTableUtil.c
WtTableUtil.h
WtUpload.c
WtUpload.h
WtUtil.c
WtUtil.h
WtWebErrors.c
WtWebErrors.h
WtWindows.h
File: / archive / modwtcl / WtUtil.h

Lines Size Modified Created Owner MIME Types
78 2,937 2010/05/08 18:46:41 2011/06/13 15:35:16 BUILTIN\Administrators text/x-chdr

0001
/*
0002
 * Copyright 2001 Alexander Boverman and the original authors.
0003
 * 
0004
 * Licensed under the Apache License, Version 2.0 (the "License");
0005
 * you may not use this file except in compliance with the License.
0006
 * You may obtain a copy of the License at
0007
 * 
0008
 *      http://www.apache.org/licenses/LICENSE-2.0
0009
 * 
0010
 * Unless required by applicable law or agreed to in writing, software
0011
 * distributed under the License is distributed on an "AS IS" BASIS,
0012
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013
 * See the License for the specific language governing permissions and
0014
 * limitations under the License.
0015
 */
0016
0017
#ifndef _WT_UTIL_H
0018
#define _WT_UTIL_H
0019
0020
#include <tcl.h>
0021
#include "WtContext.h"
0022
0023
char *WtToString(Tcl_Obj *obj);
0024
Tcl_Obj *WtNewString(const char *val);
0025
Tcl_Obj *WtNewBool(int val);
0026
int WtUpdateTableFromAp(Tcl_Obj *tbl, table *apTable,
0027
  Tcl_Interp *interp);
0028
int WtUpdateTableFromApNoMulti(Tcl_Obj *tbl, table *apTable,
0029
  Tcl_Interp *interp);
0030
int WtUpdateTableObjFromAp(Tcl_Obj *tbl, table *apTable,
0031
  Tcl_Interp *interp, int doMulti);
0032
int WtUpdateApFromLVTable(table *apTable, Tcl_Obj *tbl,
0033
  Tcl_Interp *interp);
0034
int WtLog(const char *file, int line, int mask, WtContext *w,
0035
  const char *fmt, ...);
0036
int WtLogInternal(const char *file, int line, int mask, WtContext *w,
0037
  const char *str, int addNotice);
0038
int WtAddNotice(WtContext *w, char *notice, int mask, Tcl_Interp *interp);
0039
int WtCopyOnWrite(Tcl_Obj **objPtr);
0040
int WtEvalIncr(Tcl_Interp *interp, int objc, Tcl_Obj **objv, int flags);
0041
Tcl_Obj *WtIncr(Tcl_Obj *obj);
0042
Tcl_Obj *WtDecr(Tcl_Obj *obj);
0043
Tcl_Obj **WtIncrList(Tcl_Obj **objv, int n);
0044
Tcl_Obj **WtDecrList(Tcl_Obj **objv, int n);
0045
Tcl_Obj *WtSetObj(Tcl_Obj **objPtr, Tcl_Obj *val);
0046
int WtGetBoolResult(Tcl_Interp *interp, int *boolVal);
0047
int WtCommandExists(Tcl_Interp *interp, const char *name);
0048
char *WtSafeStr(const char *str);
0049
Tcl_Obj *WtCmdGetVal(Tcl_Obj *val, Tcl_ObjType *type,
0050
  Tcl_Interp *interp);
0051
int WtCmdGetVar(Tcl_Obj *var, Tcl_Obj **val, Tcl_ObjType *type,
0052
  Tcl_Interp *interp);
0053
int WtCmdOwnVar(Tcl_Obj *var, Tcl_Obj **val, Tcl_ObjType *type,
0054
  int *created, Tcl_Interp *interp);
0055
Tcl_Obj *WtCmdSetVar(Tcl_Obj *var, Tcl_Obj *val, Tcl_Interp *interp);
0056
void WtUpdateProtectedObjString(Tcl_Obj *obj);
0057
int WtSetProtectedObjFromAny(Tcl_Interp *interp, Tcl_Obj *obj,
0058
  Tcl_ObjType *type);
0059
int WtNamespaceExport(Tcl_Interp *interp, const char *ns, const char *ptn);
0060
unsigned int WtHashString(const char *str, int len);
0061
char *WtEncodeUrl(const char *str, int stringLen, int *resultLen);
0062
int WtHexToChar(char *p);
0063
int WtDecodeUrlInPlace(char *str, int len);
0064
0065
extern const char *wtBadUsagePrefix;
0066
extern const char *wtBadUsagePrefix2;
0067
0068
#define DEBUG1(str) (WtLog(##HERE, APLOG_DEBUG | APLOG_NOERRNO, \
0069
                             WtGetContext(), (str)))
0070
0071
#define HERE __FILE__, __LINE__
0072
0073
#ifdef WIN32
0074
#define random rand
0075
#define srandom srand
0076
#endif /* WIN32 */
0077
0078
#endif /* !_WT_UTIL_H */