EC_EDITLINE_TERM_SIZE(3)

NAME
ec_editline_term_size - Get terminal width and height.

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
);

RETURN VALUE

0 on success, or -1 on error (in this case the value pointed by width and height are not modified).

SEE ALSO

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.