mdatabase_load(3m17n)

πŸ“¦
version 1.8.4 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 mdatabase_load β€” the m17n library's lil data-fetcher ✨

okay bestie, so this one lives in the m17n manual, section 3, and it's literally just... the girl who goes and gets your data for you. no cap. let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

mdatabase_load β€” loads a data from the database (yes the NAME section in the original is just vibes and a dash, we're honoring that energy) 🫢


✨ SYNOPSIS ✨

void* mdatabase_load (MDatabase * mdb)

πŸ’– DESCRIPTION πŸ’–

So. The mdatabase_load() function loads a data specified in mdb and returns the contents. That's the whole job. Main character behavior honestly. πŸ‘‘

But here's the thing β€” the type of what you get back? It depends entirely on the type of the data. It's giving mystery box. So let's break it down:

πŸ¦‹ If the data is of the plist type

It returns a pointer to plist. Simple. Clean. Iconic.

🌈 If the database is of the chartable type

It returns a chartable. And the default value of that chartable gets set according to the second tag of the data, like this:

  • If the tag is Msymbol, the default value is Mnil.
  • If the tag is Minteger, the default value is -1.
  • Otherwise, the default value is NULL.

lowkey a whole flowchart but okay periodt πŸ’…

πŸ“ If the data is of the charset type

It returns a plist of length 2 (and the keys are both Mt). Here's the tea on what's inside:

  • The value of the first element is an array of integers that maps code points to the corresponding character codes.
  • The value of the second element is a chartable of integers that does the reverse mapping.
⚠️ heads up bestie: the charset must be defined in advance. No defining it on the fly, that's not the vibe. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

  • mdatabase_load()
  • mdatabase_define()

(iykyk β€” go read those too, they're the supporting cast ✨)


Copyright (C) 2001 Information-technology Promotion Agency (IPA)

Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.


and that's the whole page, bestie!! πŸ’– this was Version 1.8.4, dated Mon Sep 25 2023, straight from the m17n manual, mdatabase_load(3m17n) section 3 β€” go forth and load ur data fr fr πŸ§šπŸŒΈπŸ’œ

πŸ“¦ where this page comes from