home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
c
/
cbase11.a03
/
CBASE11.ZIP
/
XTEND
/
XTEND.H
< prev
Wrap
C/C++ Source or Header
|
1993-01-01
|
2KB
|
84 lines
/*
* Copyright (c) 1989-1992 Citadel Software, Inc.
* All Rights Reserved
*/
/*man---------------------------------------------------------------------------
NAME
xstring.h -
SYNOPSIS
#include "xstring.h"
DESCRIPTION
SEE ALSO
------------------------------------------------------------------------------*/
#ifndef H_XTEND
#define H_XTEND
/* #ident "@(#)xtend.h 1.7 - 93/01/01" */
#include <port.h>
/* standard headers */
#include <ctype.h>
/* macros */
/* macro for number elements in a static array */
#define nelems(v) (sizeof(v) / sizeof(*(v)))
#define NUL ('\0') /* nul character */
/* macro for sizeof a structure member */
#define sizeofm(struct_t, member) ((size_t)(sizeof(((struct_t *)0)->member)))
/* cvtss m macros */
#define CVT_TP (0x0001) /* trim the parity bit */
#define CVT_XSP (0x0002) /* discard spaces and tabs */
#define CVT_XCTL (0x0004) /* discard control characters */
#define CVT_XLEADSP (0x0008) /* discard leading spaces and tabs */
#define CVT_1SP (0x0010) /* reduce spaces, tabs to one space */
#define CVT_UPPER (0x0020) /* convert lowercase to uppercase */
#define CVT_BTOP (0x0040) /* convert [ to ( and ] to ) */
#define CVT_XTRAILSP (0x0080) /* discard trailing spaces and tabs */
#define CVT_QUOTES (0x0100) /* do not alter chars inside single or
double quotes except for parity bit
trimming */
/* function declarations */
#ifdef AC_PROTO
int cvtss(char *t, const char *s, int m, int n);
void errlog(const char *file, int line, const char *msg, ...);
int fmltolfm(char *t, const char *s, size_t n);
int lfmtofml(char *t, const char *s, size_t n);
size_t strnlen(const char *s, size_t n);
void PTR_FAR * xcalloc(unsigned long n, unsigned long size);
void xfree(void PTR_FAR *p);
void PTR_FAR * xmalloc(unsigned long size);
void xperror(const char *s);
void PTR_FAR * xrealloc(void PTR_FAR *p, unsigned long size);
const char * xstrerror(int errno);
#else
int cvtss();
void errlog();
int fmltolfm();
int lfmtofml();
size_t strnlen();
void PTR_FAR * xcalloc();
void xfree();
void PTR_FAR * xmalloc();
void xperror();
void PTR_FAR * xrealloc();
const char * xstrerror();
#endif
/* global data declarations */
extern const int
xsys_nerr;
extern const char * const
xsys_errlist[];
#endif /* #ifndef H_XTEND */