File: tclExtdInt.h

package info (click to toggle)
staden 2.0.0%2Bb11-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 21,568 kB
  • sloc: ansic: 240,605; tcl: 65,360; cpp: 12,854; makefile: 11,201; sh: 2,952; fortran: 2,033; perl: 63; awk: 46
file content (27 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (5)
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
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <tcl.h>
#include <stdarg.h>
#include <assert.h>

#define FALSE 0
#define TRUE 1

/*
 * Macro that behaves like strdup, only uses ckalloc.  Also macro that does the
 * same with a string that might contain zero bytes,
 */
#define ckstrdup(sourceStr) \
  (strcpy (ckalloc (strlen (sourceStr) + 1), sourceStr))

#define ckbinstrdup(sourceStr, length) \
  ((char *) memcpy (ckalloc (length + 1), sourceStr, length + 1))


/*
 * Prototypes for TCL extension utilities
 */
int  TclX_IsNullObj( Tcl_Obj *objPtr );
void TclX_AppendObjResult( Tcl_Interp *interp, char *arg1, ... );
int  TclX_WrongArgs( Tcl_Interp *interp, Tcl_Obj *commandNameObj, char *string );