57#define bstrDeclare(b) \
62 if ((b) != NULL && (b)->slen >= 0 && (b)->mlen >= (b)->slen) { \
69#if !defined(BSTRLIB_REDUCE_NAMESPACE_POLLUTION)
70#define bAssign(a, b) \
73#define bSubs(b, pos, len, a, c) \
74 ((breplace)((b),(pos),(len),(a),(unsigned char)(c)))
76#define bStrchr(b, c) \
79#define bStrchrFast(b, c) \
82#define bCatCstr(b, s) \
83 ((bcatcstr)((b), (s)))
85#define bCatBlk(b, s, len) \
86 ((bcatblk)((b), (s), (len)))
88#define bCatStatic(b, s) \
94#define bReplaceAll(b, find, repl, pos) \
95 ((bfindreplace)((b),(find),(repl),(pos)))
97#define bUppercase(b) \
100#define bLowercase(b) \
103#define bCaselessCmp(a, b) \
104 ((bstricmp)((a), (b)))
106#define bCaselessNCmp(a, b, n) \
107 ((bstrnicmp)((a), (b), (n)))
109#define bBase64Decode(b) \
110 (bBase64DecodeEx((b), NULL))
112#define bUuDecode(b) \
113 (bUuDecodeEx((b), NULL))
193bStrfTime(
const char * fmt,
const struct tm * timeptr);
195#define bAscTime(t) (bStrfTime ("%c\n", (t)))
197#define bCTime(t) ((t) ? bAscTime (localtime (t)) : NULL)
337(*
bNwrite)(
const void *
buf,
size_t elsize,
size_t nelem,
void *
parm);
398#define bSecureDestroy(b) \
400 if ((b) && (b)->mlen > 0 && (b)->data) { \
401 (void)memset((b)->data, 0, (size_t)(b)->mlen); \
403 (void)bdestroy((b)); \
406#define bSecureWriteProtect(t) \
408 if ((t).mlen >= 0) { \
409 if ((t).mlen > (t).slen)) { \
410 (void)memset((t).data + (t).slen, 0, \
411 (size_t)(t).mlen - (t).slen); \
static char buf[MAXPATHLEN+1]
Definition afppasswd.c:113
BSTR_PUBLIC void * bwsClose(struct bwriteStream *stream)
Definition bstraux.c:1222
BSTR_PUBLIC int bwsWriteFlush(struct bwriteStream *stream)
Definition bstraux.c:1128
BSTR_PUBLIC int bReplicate(bstring b, int n)
Definition bstraux.c:84
BSTR_PUBLIC bstring bYEncode(const bstring src)
Definition bstraux.c:854
BSTR_PUBLIC bstring bBase64DecodeEx(const bstring b, int *boolTruncError)
Definition bstraux.c:439
BSTR_PUBLIC bstring bHead(bstring b, int n)
Definition bstraux.c:62
BSTR_PUBLIC int bReverse(bstring b)
Definition bstraux.c:90
BSTR_PUBLIC struct bwriteStream * bwsOpen(bNwrite writeFn, void *parm)
Definition bstraux.c:1097
BSTR_PUBLIC bstring bYDecode(const bstring src)
Definition bstraux.c:885
BSTR_PUBLIC int bSetChar(bstring b, int pos, char c)
Definition bstraux.c:1013
BSTR_PUBLIC int bSetCstrChar(bstring a, int pos, char c)
Definition bstraux.c:993
BSTR_PUBLIC char * bStr2NetStr(const bstring b)
Definition bstraux.c:285
BSTR_PUBLIC int bwsWriteBstr(struct bwriteStream *stream, const bstring b)
Definition bstraux.c:1143
BSTR_PUBLIC bstring bStrfTime(const char *fmt, const struct tm *timeptr)
Definition bstraux.c:954
BSTR_PUBLIC int bFill(bstring a, char c, int len)
Definition bstraux.c:74
BSTR_PUBLIC int bJustifyRight(bstring b, int width, int space)
Definition bstraux.c:161
BSTR_PUBLIC bstring bUuDecodeEx(const bstring src, int *badlines)
Definition bstraux.c:666
BSTR_PUBLIC int bJustifyCenter(bstring b, int width, int space)
Definition bstraux.c:177
BSTR_PUBLIC struct bStream * bsUuDecode(struct bStream *sInp, int *badlines)
Definition bstraux.c:779
BSTR_PUBLIC int bJustifyMargin(bstring b, int width, int space)
Definition bstraux.c:194
BSTR_PUBLIC int bwsWriteBlk(struct bwriteStream *stream, void *blk, int len)
Definition bstraux.c:1185
BSTR_PUBLIC int bwsBuffLength(struct bwriteStream *stream, int sz)
Definition bstraux.c:1208
int(* bNwrite)(const void *buf, size_t elsize, size_t nelem, void *parm)
Definition bstraux.h:337
BSTR_PUBLIC int bSGMLEncode(bstring b)
Definition bstraux.c:939
BSTR_PUBLIC struct bStream * bsFromBstr(const bstring b)
Definition bstraux.c:243
BSTR_PUBLIC bstring bBase64Encode(const bstring b)
Definition bstraux.c:352
BSTR_PUBLIC int bInsertChrs(bstring b, int pos, int len, unsigned char c, unsigned char fill)
Definition bstraux.c:111
BSTR_PUBLIC bstring bSecureInput(int maxlen, int termchar, bNgetc vgetchar, void *vgcCtx)
Definition bstraux.c:1031
BSTR_PUBLIC bstring bTail(bstring b, int n)
Definition bstraux.c:50
BSTR_PUBLIC int bwsIsEOF(const struct bwriteStream *stream)
Definition bstraux.c:1196
BSTR_PUBLIC bstring bNetStr2Bstr(const char *buf)
Definition bstraux.c:306
BSTR_PUBLIC int bJustifyLeft(bstring b, int space)
Definition bstraux.c:137
BSTR_PUBLIC bstring bUuEncode(const bstring src)
Definition bstraux.c:812
C implementaion of bstring functions.
#define BSTR_PUBLIC
Definition bstrlib.h:51
struct tagbstring * bstring
Definition bstrlib.h:86
int(* bNgetc)(void *parm)
Definition bstrlib.h:1174
size_t c
Definition dircache.c:257
Definition bstrlib.c:2018
void * parm
Definition bstrlib.c:2020
Definition bstraux.c:1088
void * parm
Definition bstraux.c:1090
bNwrite writeFn
Definition bstraux.c:1091