Table of Contents

NAME

QccStringMakeNull, QccStringNull, QccConvertToQccString - string operations

SYNOPSIS

#include "libQccPack.h"

void QccStringMakeNull(QccString qccstring);
int QccStringNull(const QccString qccstring);
void QccConvertToQccString(QccString qccstring, const char *str);
void QccStringCopy(QccString qccstring1, const QccString qccstring2);
void QccStringSprintf(QccString qccstring, const char *format, ...);

DESCRIPTION

QccPack library routines use strings of type QccString which is defined in as
typedef char QccString[QCCSTRINGLEN + 1];

QccStringMakeNull() sets qccstring to zero length.

QccStringNull() returns 1 if qccstring is a NULL pointer or has zero length and 0 otherwise.

QccConvertToQccString() converts a character array into type QccString which entails copying characters from str to qccstring up to QCCSTRINGLEN characters and ensuring that qccstring is NULL-terminated.

QccStringCopy() copies qccstring2 to qccstring1.

QccStringSprintf() is a wrapper around sprintf(3) . If snprintf(3) exists, it is called to ensure that the string written to qccstring does not exceed the length of qccstring. Otherwise, sprintf(3) is called to write the string to qccstring and a buffer overflow may occur if the string is too long.

SEE ALSO

QccPack(3) , sprintf(3)

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads