EC_YAML_IMPORT(3)

πŸ’– EC_YAML_IMPORT β€” bestie edition πŸ’–

okay so we're in the libecoli programmer's manual rn and today's main character is ec_yaml_import(3). yes it's a section 3 page, yes it's giving "C function", yes you're gonna slay it. 🧚✨


🌸 NAME 🌸

ec_yaml_import β€” parse a YAML file and build an ec_node tree from it. that's the whole vibe. read YAML, make tree. πŸ’…


✨ SYNOPSIS ✨

#include <ecoli/yaml.h>

struct ec_node * ec_yaml_import(
    const char   *filename   /* The path to the file to be parsed. */
);

like. one include. one function. one argument. it's giving minimalist queen. πŸŽ€


πŸ”₯ RETURN VALUE πŸ”₯

so what do you get back? depends on how it goes bestie:

  • success β†’ you get the ec_node tree. iconic. ate. no notes. πŸ‘‘
  • error β†’ you get NULL, and errno is set. yeah she's not happy. 😭
⚠️ okay this part is important and I need you to lock in: the node that gets returned is yours to free. the caller has to clean it up with ec_node_free(). no leaving it lying around, no ghosting your memory, that's not the vibe. 🫢

🌈 SEE ALSO 🌈

  • ec_yaml_export(3) β€” the other half of the situationship. it does the opposite direction, iykyk. πŸ’œ

Copyright (C) 2010-2026 Olivier Matz, Robin Jarry. periodt. πŸ’–


okay that's the whole page bestie, tysm for reading πŸ¦‹ this was libecoli, dated 2026-06-11, and honestly? she ate. go build your tree. mwah. πŸ’…πŸŒΈβœ¨

πŸ“¦ where this page comes from