PX_READ_BLOBDATA(3)

πŸ’– PX_READ_BLOBDATA πŸ’–

okay so bestie, we're in the Library Functions Manual section of the paradox library docs, and today's main character is PX_read_blobdata β€” the function that goes and reads a blob from a file. she's deprecated though. we'll get to that. 🫢


✨ NAME ✨

PX_read_blobdata β€” read a blob from a file (deprecated, girl. deprecated.) 😭


🌸 SYNOPSIS 🌸

#include <paradox.h>

char* PX_read_blobdata(pxblob_t *pxblob, const char *data, int len, int
*mod_nr, int *blobsize)

like, that's the whole signature. copy it exactly, don't be cute with it πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea. this function reads blob data from the blob document you hand it β€” that's the .MB file β€” and you pass that in as the first parameter (pxblob). ✨

  • data is the data stored in the blob field of the db file.
  • len is the length of that field.

and the way this function slays is that it hides literally everything you'd need to actually evaluate that field data. it's giving "i got you bestie, don't worry about it." πŸ™ˆ it can handle both single blob blocks and suballocated blocks β€” no cap. πŸ‘‘

⚠️ BUT. this function is deprecated. like, do not use it. use PX_set_blob_file(3) and PX_get_data_blob(3) or PX_get_data_graphic(3) instead. periodt. πŸ’€

πŸŽ€ RETURNS πŸŽ€

so what do you get back?

  • returns NULL if something went wrong 😭 (that's the error case, love that for us)
  • or a pointer to the blob data 🌈

and then the out-params do their lil thing:

  • mod_nr contains the modification number of the blob
  • blobsize contains the length of the blob data

and here's the cute part β€” that modification number can be used as a unique id for the blob. iconic. 🏷️✨


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service bestie πŸ«‘πŸ’œ


aaaand that's the whole page, babes. we were reading the PX_READ_BLOBDATA(3) page out of the Library Functions Manual β€” go use the non-deprecated functions, i'm begging. mwah πŸ’‹πŸ’–πŸŽ€