RULEXDB_CLASSIFY(3)

πŸ’– RULEXDB_CLASSIFY(3) πŸ’–

okay so bestie, welcome to the rulexdb_classify page from the Library Functions Manual πŸŽ€ this is a C library situation, and we're gonna vibe through it together, i promise it's not scary πŸ’…


✨ NAME ✨

rulexdb_classify β€” test specified word whether it represents a lexical base


🌸 SYNOPSIS 🌸

#include <rulexdb.h>

int rulexdb_classify(RULEXDB *rulexdb, const char *s);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea πŸ“ β€” rulexdb_classify() takes the word that s points at and tests it, trying to figure out whether it can be treated as a lexical base according to the rulexdb database that the rulexdb argument references.

that's it. that's the whole function. it's giving "is this word a lexical base or not" energy, no cap ✨


πŸ’œ RETURN VALUE πŸ’œ

this part is lowkey iconic because the logic is a lil backwards but we love her:

  • RULEXDB_SUCCESS β€” which is zero β€” comes back when the word represents no lexical base πŸ™ˆ yes bestie, zero means nope, we don't make the rules (well, this library does, and this is what it chose)
  • a positive value β€” RULEXDB_SPECIAL β€” comes back when the word can be treated as a lexical base πŸ‘‘ slay
  • a negative error code β€” when something is wrong 😭

πŸ’€ ERRORS πŸ’€

the negative codes you might catch, and what they mean:

  • RULEXDB_FAILURE β€” the referenced database has not been opened, the internal data structures are corrupted, or some other general failure has occurred. it's giving "everything is on fire" πŸ”₯
  • RULEXDB_EMALLOC β€” internal memory allocation error. the malloc said no πŸ’€
  • RULEXDB_EPARM β€” invalid parameters are specified. bestie check your args 🫢

🌈 SEE ALSO 🌈

the whole friend group, go say hi:


πŸ‘‘ AUTHOR πŸ‘‘

Igor B. Poretsky <poretsky@mlbox.ru> β€” the main character who wrote all of this 🫢


and that's the whole page bestie, you ate it πŸ’… this manual page was served up on February 21, 2012 and lives under the RULEXDB_CLASSIFY(3) name, so go classify some words, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from