Changeset 1890


Ignore:
Timestamp:
Sep 7, 2012, 6:36:27 PM (7 years ago)
Author:
sam
Message:

neercs: fix Windows build.

Location:
trunk/tools/neercs
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/neercs.vcxproj

    r1859 r1890  
    5050    <ClCompile Include="neercs.cpp" />
    5151    <ClCompile Include="old\actions.c" />
    52     <ClCompile Include="old\ansi.c" />
    5352    <ClCompile Include="old\attach.c" />
    5453    <ClCompile Include="old\client.c" />
     
    7170    <ClCompile Include="old\widgets.c" />
    7271    <ClCompile Include="old\wm.cpp" />
    73     <ClInclude Include="term\ansi.cpp" />
    74     <ClInclude Include="term\pty.cpp" />
    75     <ClInclude Include="term\term.cpp" />
     72    <ClCompile Include="term\pty.cpp" />
     73    <ClCompile Include="term\term.cpp" />
     74    <ClCompile Include="term\ansi.cpp" />
    7675    <ClCompile Include="video\render.cpp" />
    7776    <ClCompile Include="video\text-render.cpp" />
  • trunk/tools/neercs/neercs.vcxproj.filters

    r1859 r1890  
    1010    </ClCompile>
    1111    <ClCompile Include="old\actions.c">
    12       <Filter>old</Filter>
    13     </ClCompile>
    14     <ClCompile Include="old\ansi.c">
    1512      <Filter>old</Filter>
    1613    </ClCompile>
     
    108105      <Filter>old\python</Filter>
    109106    </ClInclude>
    110     <ClInclude Include="term\term.h">
     107    <ClInclude Include="term\pty.h">
    111108      <Filter>term</Filter>
    112109    </ClInclude>
    113     <ClInclude Include="term\pty.h">
     110    <ClInclude Include="term\term.h">
    114111      <Filter>term</Filter>
    115112    </ClInclude>
     
    124121    <Filter Include="old\python">
    125122      <UniqueIdentifier>{9140687d-c5b2-4302-8121-9b12ebf3908e}</UniqueIdentifier>
     123    </Filter>
     124    <Filter Include="term">
     125      <UniqueIdentifier>{17f5f0be-6afb-4e39-8cb1-07df59d7ba9b}</UniqueIdentifier>
    126126    </Filter>
    127127  </ItemGroup>
  • trunk/tools/neercs/old/wm.cpp

    r1657 r1890  
    6262    caca_gotoxy(newc, caca_get_cursor_x(oldc), caca_get_cursor_y(oldc));
    6363    caca_free_canvas(oldc);
    64     set_tty_size(s->fd, w, h);
     64    /* FIXME: disabled */
     65    //set_tty_size(s->fd, w, h);
    6566
    6667    s->orig_w = s->w;
  • trunk/tools/neercs/term/pty.cpp

    r1880 r1890  
    4040using namespace lol;
    4141
    42 #include "neercs.h"
     42#include "../neercs.h"
    4343
    4444Pty::Pty()
     
    5353Pty::~Pty()
    5454{
     55#if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
    5556    delete m_unread_data;
    5657
     
    5960        close((int)m_fd);
    6061    }
     62#endif
    6163}
    6264
     
    105107size_t Pty::ReadData(char *data, size_t maxlen)
    106108{
     109#if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
    107110    /* Do we have data from previous call? */
    108111    if (m_unread_len)
     
    152155        }
    153156    }
     157#endif
    154158
    155159    return 0;
     
    158162void Pty::UnreadData(char *data, size_t len)
    159163{
     164#if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H
    160165    char *new_data;
    161166
     
    173178    memcpy(new_data, data, len);
    174179    m_unread_data = new_data;
     180#endif
    175181}
    176182
     
    194200#endif
    195201}
    196 
    197 #if 0
    198 int update_terms(struct screen_list *screen_list)
    199 {
    200     int i, refresh = 0;
    201     for (i = 0; i < screen_list->count; i++)
    202     {
    203         if (screen_list->screen[i]->total && !screen_list->dont_update_coords)
    204         {
    205             unsigned long int bytes;
    206 
    207             bytes = import_term(screen_list,
    208                                 screen_list->screen[i],
    209                                 screen_list->screen[i]->buf,
    210                                 screen_list->screen[i]->total);
    211 
    212             if (bytes > 0)
    213             {
    214                 screen_list->screen[i]->total -= bytes;
    215                 memmove(screen_list->screen[i]->buf,
    216                         screen_list->screen[i]->buf + bytes,
    217                         screen_list->screen[i]->total);
    218                 if (screen_list->screen[i]->visible || screen_list->modals.mini)
    219                     refresh = 1;
    220             }
    221         }
    222     }
    223     return refresh;
    224 }
    225 #endif
    226 
  • trunk/tools/neercs/term/term.cpp

    r1880 r1890  
    55#if defined HAVE_CONFIG_H
    66#   include "config.h"
     7#endif
     8
     9#if defined _XBOX
     10#   define _USE_MATH_DEFINES /* for M_PI */
     11#   include <xtl.h>
     12#elif defined _WIN32
     13#   define _USE_MATH_DEFINES /* for M_PI */
     14#   define WIN32_LEAN_AND_MEAN
     15#   include <windows.h>
    716#endif
    817
Note: See TracChangeset for help on using the changeset viewer.