Category : Files from Magazines
Archive   : CUJ0894.ZIP
Filename : PSTRING.H

Output of file : PSTRING.H contained in archive : CUJ0894.ZIP
@CSOURCE6 = /*
*Header: pstring.h (string handling support)
* by [email protected]
#ifndef PSTRING_H
#define PSTRING_H
* Interface macros to "pstr_x" for fixed number of
* arguments. (Using this macros instead of direct
* calls to the function helps to make the source
* more readable.)
char *pstr_x(const char *str, ...);
#define pstr_1(s1)\
(pstr_x(s1, (const char *)0))
#define pstr_2(s1, s2)\
(pstr_x(s1, s2, (const char *)0))
#define pstr_3(s1, s2, s3)\
(pstr_x(s1, s2, s3, (const char *)0))
#define pstr_4(s1, s2, s3, s4)\
(pstr_x(s1, s2, s3, s4, (const char *)0))
/* .... may be extended .... */

* Strings that are used only once may be build with
* help of the "tmpstr"-function or (preferably) with
* one of the "TMPSTR"-macros. The space occupied by
* a string build in this way is freed with the next
* call to one of this macros, so its contents should
* be accessed IMMEDIATELY. To reduce the risk of
* inappropriate use, the result of calls to "tmpstr"
* should NEVER be stored into a pointer, and when
* calling a function that needs several string
* arguments, AT MOST ONE may be initialized with the
* result of a call to "tmpstr". In both cases this
* includes indirect calls to "tmpstr" through one of
* the "TMPSTR"-macros.
char *tmpstr(char *str);
#define TMPSTR1(s1)\
#define TMPSTR2(s1, s2)\
(tmpstr(pstr_2(s1, s2)))
#define TMPSTR3(s1, s2, s3)\
(tmpstr(pstr_3(s1, s2, s3)))
#define TMPSTR4(s1, s2, s3, s4)\
(tmpstr(pstr_4(s1, s2, s3, s4)))
/* .... may be extended .... */


  3 Responses to “Category : Files from Magazines
Archive   : CUJ0894.ZIP
Filename : PSTRING.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: