EC_INTERACT_PRINT_COLS(3)

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

πŸ’– EC_INTERACT_PRINT_COLS(3) πŸ’–

okay bestie, welcome to the Libecoli Programmer's Manual ✨ this one lives in section 3 and it's literally called ec_interact_print_cols, and it's about making your completion matches look cute in columns. yes. that's the whole vibe. πŸŽ€


✨ NAME ✨

ec_interact_print_cols β€” print completion matches as columns πŸ¦‹

like, you got a big ol' pile of matches and you want them laid out all neat and pretty instead of one sad string per line. that's her. that's the function. πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/interact.h>

int ec_interact_print_cols(
    FILE                *out,      /* The pointer to the output stream. */
    unsigned int         width,    /* The number of columns on terminal. */
    char const *const   *matches,  /* The string array of matches to display. */
    size_t               n         /* The size of the array. */
);

so you pull in <ecoli/interact.h> and then you call her with four things, no more no less πŸ‘‘

  • out β€” the pointer to the output stream πŸ’– this is where the column-y goodness gets written.
  • width β€” the number of columns on terminal πŸ“ like, how wide is the party. unsigned int energy.
  • matches β€” the string array of matches to display 🌈 a char const *const *, so, a pointer to const pointers to const chars. she's const in both directions. untouchable. iconic.
  • n β€” the size of the array πŸ”’ a size_t, because obviously.

and the whole thing returns an int. we'll get to that. 🫢


⭐ RETURN VALUE ⭐

0 on success, or -1 on error.

that's it. that's the deal. zero means slay, negative one means something went wrong and we're crying 😭 no in-between, no gray area, periodt.


πŸ¦‹ SEE ALSO πŸ¦‹

okay so this function does NOT exist in a vacuum, she has a whole friend group, and you should lowkey meet all of them πŸ’œ:

twelve whole friends. main character energy across the board fr fr πŸ”₯


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

respect the authors bestie, they built this πŸ’–


libecoli Β· 2026-06-11 Β· EC_INTERACT_PRINT_COLS(3)

and that's the page!! go print some columns, you absolute legend 🌟 iykyk πŸ’…βœ¨πŸ¦‹πŸŒΈπŸŽ€πŸ«Ά

πŸ“¦ where this page comes from