Changeset 1896


Ignore:
Timestamp:
Sep 9, 2012, 11:47:42 PM (7 years ago)
Author:
sam
Message:

neercs: add some helper function for future keyboard input.

Location:
trunk/tools/neercs/term
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/term/pty.cpp

    r1894 r1896  
    181181}
    182182
     183size_t Pty::WriteData(char const *data, size_t len)
     184{
     185#if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     186    /* FIXME: can we be more naive than that? */
     187    return write((int)m_fd, data, len);
     188#endif
     189
     190    return 0;
     191}
     192
    183193void Pty::SetWindowSize(ivec2 size, int64_t fd /* = -1 */)
    184194{
  • trunk/tools/neercs/term/pty.h

    r1880 r1896  
    1313
    1414    void Run(char const *command, ivec2 size);
     15
    1516    size_t ReadData(char *data, size_t maxlen);
    1617    void UnreadData(char *data, size_t len);
     18    size_t WriteData(char const *data, size_t len);
     19
    1720    void SetWindowSize(ivec2 size, int64_t fd = -1);
    1821
Note: See TracChangeset for help on using the changeset viewer.