Ignore:
Timestamp:
Nov 19, 2012, 1:45:41 AM (8 years ago)
Author:
sam
Message:

neercs: added a better check for forkpty(), and moved the GL_POINTS
size and texture logic to the vertex shader.

File:
1 edited

Legend:

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

    r2005 r2090  
    1515#endif
    1616
    17 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     17#if defined HAVE_FORKPTY
    1818#   define _XOPEN_SOURCE
    1919#   include <stdlib.h>
     
    5454Pty::~Pty()
    5555{
    56 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     56#if defined HAVE_FORKPTY
    5757    delete[] m_unread_data;
    5858
     
    6666void Pty::Run(char const *command, ivec2 size)
    6767{
    68 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     68#if defined HAVE_FORKPTY
    6969    int fd;
    7070    pid_t pid;
     
    113113size_t Pty::ReadData(char *data, size_t maxlen)
    114114{
    115 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     115#if defined HAVE_FORKPTY
    116116    /* Do we have data from previous call? */
    117117    if (m_unread_len)
     
    173173void Pty::UnreadData(char *data, size_t len)
    174174{
    175 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     175#if defined HAVE_FORKPTY
    176176    char *new_data;
    177177
     
    194194size_t Pty::WriteData(char const *data, size_t len)
    195195{
    196 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     196#if defined HAVE_FORKPTY
    197197    /* FIXME: can we be more naive than that? */
    198198    return write((int)m_fd, data, len);
     
    204204void Pty::SetWindowSize(ivec2 size, int64_t fd /* = -1 */)
    205205{
    206 #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
     206#if defined HAVE_FORKPTY
    207207    if (m_size == size)
    208208        return;
Note: See TracChangeset for help on using the changeset viewer.