PX_NEW2(3)

πŸ’– PX_NEW2 πŸ’–

okay so bestie, this is from the Library Functions Manual, and it's all about PX_new2 β€” the girl whose whole job is making a brand new instance of a Paradox file. slay. ✨


🌸 NAME 🌸

PX_new2 β€” create new instance of Paradox file πŸ¦‹


✨ SYNOPSIS ✨

#include <paradox.h>

pxdoc_t* PX_new2(void  (*errorhandler)(pxdoc_t *p, int type, const char
*msg, void *data), void* (*allocproc)(pxdoc_t *p, size_t size, const
char *caller), void* (*reallocproc)(pxdoc_t *p, void *mem, size_t size,
const char *caller), void  (*freeproc)(pxdoc_t *p, void *mem))

like yes she takes four whole function pointers as arguments, she's high maintenance and we love that for her πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

She creates a new instance of a Paradox file. periodt.

This function, PX_new(3) or PX_new3(3) must be called before any other functions. no cap, like literally do this first or nothing else works, it's giving prerequisite energy πŸ‘‘

And if the caller has its own error and memory management functions? bestie you can pass those in too, she's flexible like that 🫢

Calling PX_new2(3) is identical to calling PX_new3(3) with the last parameter set to NULL. same girl, different outfit. iykyk 😌


πŸŽ€ RETURN VALUE πŸŽ€

Returns a pointer to an internal representation of a Paradox file, or NULL on failure. πŸ’€

so like… check for NULL bestie. don't be out here dereferencing a failure and acting surprised. πŸ™ˆ

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Uwe Steinmann uwe@steinmann.cx. iconic of him fr fr πŸ’–


and that's the whole page bestie!! πŸŽ€ this was PX_NEW2(3) from the Library Functions Manual, dropping as PX_NEW2(3) β€” no version or date info on this one so that's the whole footer vibe. go forth and call your constructor first. mwah πŸ’‹πŸŒΈβœ¨