Curses

 view release on metacpan or  search on metacpan

CursesFunWide.c  view on Meta::CPAN


XS(XS_CURSES_instring) {
    int x, y;
    dXSARGS;
    c_countargs("instring", items, 0);

    WINDOW *win = c_win ? c_sv2window(ST(0), 0) : stdscr;
    if (c_x)
        if (c_domove(win, ST(c_x-1), ST(c_x)) == ERR)
            XSRETURN_UNDEF;
    getmaxyx(win, y, x); /* Macro: not &y, &x! */
#ifdef C_INNWSTR
    int ret;
    wchar_t *buf = malloc((x + 1) * sizeof *buf);
    if (buf == NULL) croak("insstring: malloc");
    ret = winnwstr(win, buf, x);
    if (ret == ERR) {
        free(buf);
        XSRETURN_UNDEF;
    }
    ST(0) = sv_newmortal();



( run in 0.559 second using v1.01-cache-2.11-cpan-49f99fa48dc )