EC_INTERACT_PRINT_COLS(3)
π 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 intenergy.matchesβ the string array of matches to display π achar 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 π’ asize_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 π:
ec_interact_get_completions(3)ec_interact_print_helps(3)ec_interact_print_error_helps(3)ec_interact_set_help(3)ec_interact_append_chars(3)ec_interact_set_desc(3)ec_interact_get_callback(3)ec_interact_set_callback(3)ec_interact_get_error_helps(3)ec_interact_free_completions(3)ec_interact_get_helps(3)ec_interact_free_helps(3)
twelve whole friends. main character energy across the board fr fr π₯
π COPYRIGHT π
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
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms