term: add function to query terminal dimensions
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
|
||||
typedef b_status (*print_function)(FILE *fp, const char *s);
|
||||
|
||||
b_status b_term_get_dimensions(FILE *fp, unsigned int *w, unsigned int *h)
|
||||
{
|
||||
return z__b_stream_dimensions(fp, w, h) == 0 ? B_SUCCESS
|
||||
: B_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
static int print(FILE *fp, const char *str)
|
||||
{
|
||||
return fputs(str, fp);
|
||||
|
||||
Reference in New Issue
Block a user