EC_INTERACT_PRINT_ERROR_HELPS(3)
π EC_INTERACT_PRINT_ERROR_HELPS(3) β bestie edition π
okay so this is a page from the Libecoli Programmer's Manual, and it's about ec_interact_print_error_helps. yes that name is a whole mouthful, i know, but stay with me π«Ά
β¨ NAME β¨
ec_interact_print_error_helps β prints out the suggestions that ec_interact_get_error_helps() made for you. like, it does the saying part, the other one does the thinking part. iconic duo behaviour, honestly π
πΈ SYNOPSIS πΈ
#include <ecoli/interact.h>
int ec_interact_print_error_helps(
FILE *out, /* The pointer to the output stream. */
unsigned int width, /* The number of columns on terminal. */
const char *line, /* The line used to generate the error helps. */
/*
* The helps array returned by ec_interact_get_helps().
*/
const struct ec_interact_help *helps,
/*
* The array size returned by ec_interact_get_helps().
*/
size_t n,
size_t char_idx /* The index of the error in the line string. */
);
so you hand it:
outβ the pointer to the output stream, aka where the goss gets printed π¬widthβ the number of columns on the terminal, so it knows how much room it has to work with πlineβ the line that was used to generate the error helps πhelpsβ the helps array, the one thatec_interact_get_helps()gave you πnβ the size of that array, also courtesy ofec_interact_get_helps()π’char_idxβ the index of the error inside thelinestring, so it knows exactly where the oopsie is π
π¦ STRUCTURES π¦
here's the lil struct that describes a contextual help:
struct ec_interact_help {
};
that's it. that's the whole thing. it's giving minimalist π
β RETURN VALUE β
0 on success, or -1 on error. no in-between, she's not ambiguous π
ngl bestie, if you get -1 back, something went wrong and you should probably look at it. not me being emotionally supportive about an error code π
π₯ SEE ALSO π₯
the whole friend group, in order:
ec_interact_get_completions(3)ec_interact_print_helps(3)ec_interact_print_cols(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)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
like, respect the authors, they've been carrying this since 2010 β¨
and that's the page, bestie!! this whole thing lives under libecoli, dated 2026-06-11, and the manual section is EC_INTERA...RROR_HELPS(3) β yes the title got squished in the original too, it's not just you, 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