summaryrefslogtreecommitdiff
path: root/payloads/libpayload/curses/pdcurses-backend/pdcgetsc.c
blob: 835b840fbaaad42b2bcec46eac8ec9cf344afde1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* Public Domain Curses */
/* This file is BSD licensed, Copyright 2011 secunet AG */

#include "lppdc.h"

#include <stdlib.h>

/* return width of screen/viewport */

int PDC_get_columns(void)
{
    int cols;

    PDC_LOG(("PDC_get_columns() - called\n"));

    /* hardcode to 80 */
    cols = 80;

    PDC_LOG(("PDC_get_columns() - returned: cols %d\n", cols));

    return cols;
}

/* get the cursor size/shape */

int PDC_get_cursor_mode(void)
{
    PDC_LOG(("PDC_get_cursor_mode() - called\n"));

    /* only have one cursor type */
    return SP->visibility;
}

/* return number of screen rows */

int PDC_get_rows(void)
{
    int rows;

    PDC_LOG(("PDC_get_rows() - called\n"));

    /* hardcode to 25 */
    rows = 25;

    PDC_LOG(("PDC_get_rows() - returned: rows %d\n", rows));

    return rows;
}