EC_COMP_MERGE(3)

πŸ“¦
version 0.11.7 Β· 5 versions
, in fedora 44

πŸ’– EC_COMP_MERGE(3) πŸ’–

okay so bestie, welcome to Libecoli Programmer's Manual, section 3, and today's main character is ec_comp_merge 🫢


✨ NAME ✨

ec_comp_merge β€” merge the items chillin' inside from into to. that's it. that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/complete.h>

int ec_comp_merge(
    struct ec_comp   *to,    /* The destination completion list. */
    struct ec_comp   *from   /* The source completion list. */
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, picture two completion lists. one is the destination (to), one is the source (from). this function scoops everything out of from and pours it into to, no cap πŸŽ€

and then β€” and this is the part you gotta remember β€” the from comp struct gets freed. gone. released. it does NOT survive the merge. so do not go touching it afterwards, bestie, that's a one-way ticket to undefined behaviour town πŸ˜­πŸ™ˆ


⭐ RETURN VALUE ⭐

  • 0 β€” slay, it worked, success πŸ’–
  • -1 β€” oof, error, and errno is set for you so you can go find out what went wrong πŸ”

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


k bye bestie, go merge some lists responsibly πŸ’œβœ¨ this has been libecoli, dated 2026-06-11, page EC_COMP_MERGE(3) β€” mwah πŸŽ€

πŸ“¦ where this page comes from