#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "term.h"

int main(void)
{
    WinInfo wi;

    if (term_get_winsize(&wi) != TERM_SUCCESS) {
        fprintf(stderr, "error: failed to get terminal size: %s.\n", strerror(errno));
        return EXIT_FAILURE;
    }

    printf("Height: %u, Width: %u.\n", wi.rows, wi.cols);
    return EXIT_SUCCESS;
}
