EC_EDITLINE_TERM_SIZE(3)
β¨ EC_EDITLINE_TERM_SIZE(3) β¨
okay bestie, so this is a page from the Libecoli Programmer's Manual β yes, that one, the EC_EDITLINE_TERM_SIZE(3) one, and honestly? it's giving "short but essential." π
π NAME π
ec_editline_term_size β get terminal width and height.
like. the terminal's actual size. how many columns, how many rows. that's it, that's the whole job, and it does it flawlessly. π
π¦ SYNOPSIS π¦
#include <ecoli/editline.h>
int ec_editline_term_size(
const struct ec_editline *editline, /* The pointer to the ec_editline structure. */
/*
* The pointer where the number of columns is stored on success.
*/
unsigned int *width,
/*
* The pointer where the number of rows is stored on success.
*/
unsigned int *height
);
so you're passing in your editline pointer, plus two unsigned int pointers β one where the column count lands, one where the row count lands. both of them only get filled in on success, so like, don't go reading them if it flopped. π
πΈ RETURN VALUE πΈ
0β slay, it worked. β¨-1β error, bestie. π and in this case, the value pointed bywidthandheightare not modified. so they stay exactly how you left them. no sneaky half-written numbers, no chaos. periodt.
π SEE ALSO π
the whole friend group, fr fr β go read these too:
ec_editline_get_el(3)ec_editline_set_prompt(3)ec_editline_complete(3)ec_editline_set_prompt_esc(3)ec_editline_parse(3)ec_editline_free(3)ec_editline_gets(3)ec_editline_interact(3)ec_editline_set_node(3)ec_editline_set_history(3)ec_editline(3)ec_editline_get_node(3)ec_editline_curline(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
no cap: every flag, every pointer, every return value up there is exactly as written. don't come for me, I keep the facts immaculate. π
and that's the tea, bestie π«Ά β this one's from libecoli, dated 2026-06-11, and it lives at EC_EDITLINE_TERM_SIZE(3). go resize a terminal and feel powerful. π¦βπ
π¦ 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