| @@ -49,7 +49,6 @@ | |||||
| <ItemGroup> | <ItemGroup> | ||||
| <ClCompile Include="neercs.cpp" /> | <ClCompile Include="neercs.cpp" /> | ||||
| <ClCompile Include="old\actions.c" /> | <ClCompile Include="old\actions.c" /> | ||||
| <ClCompile Include="old\ansi.c" /> | |||||
| <ClCompile Include="old\attach.c" /> | <ClCompile Include="old\attach.c" /> | ||||
| <ClCompile Include="old\client.c" /> | <ClCompile Include="old\client.c" /> | ||||
| <ClCompile Include="old\configuration.c" /> | <ClCompile Include="old\configuration.c" /> | ||||
| @@ -70,9 +69,9 @@ | |||||
| <ClCompile Include="old\server.c" /> | <ClCompile Include="old\server.c" /> | ||||
| <ClCompile Include="old\widgets.c" /> | <ClCompile Include="old\widgets.c" /> | ||||
| <ClCompile Include="old\wm.cpp" /> | <ClCompile Include="old\wm.cpp" /> | ||||
| <ClInclude Include="term\ansi.cpp" /> | |||||
| <ClInclude Include="term\pty.cpp" /> | |||||
| <ClInclude Include="term\term.cpp" /> | |||||
| <ClCompile Include="term\pty.cpp" /> | |||||
| <ClCompile Include="term\term.cpp" /> | |||||
| <ClCompile Include="term\ansi.cpp" /> | |||||
| <ClCompile Include="video\render.cpp" /> | <ClCompile Include="video\render.cpp" /> | ||||
| <ClCompile Include="video\text-render.cpp" /> | <ClCompile Include="video\text-render.cpp" /> | ||||
| </ItemGroup> | </ItemGroup> | ||||
| @@ -121,4 +120,4 @@ | |||||
| <ImportGroup Label="ExtensionTargets"> | <ImportGroup Label="ExtensionTargets"> | ||||
| <Import Project="$(SolutionDir)\Lol.Fx.targets" /> | <Import Project="$(SolutionDir)\Lol.Fx.targets" /> | ||||
| </ImportGroup> | </ImportGroup> | ||||
| </Project> | |||||
| </Project> | |||||
| @@ -11,9 +11,6 @@ | |||||
| <ClCompile Include="old\actions.c"> | <ClCompile Include="old\actions.c"> | ||||
| <Filter>old</Filter> | <Filter>old</Filter> | ||||
| </ClCompile> | </ClCompile> | ||||
| <ClCompile Include="old\ansi.c"> | |||||
| <Filter>old</Filter> | |||||
| </ClCompile> | |||||
| <ClCompile Include="old\attach.c"> | <ClCompile Include="old\attach.c"> | ||||
| <Filter>old</Filter> | <Filter>old</Filter> | ||||
| </ClCompile> | </ClCompile> | ||||
| @@ -107,10 +104,10 @@ | |||||
| <ClInclude Include="old\python\py_module.h"> | <ClInclude Include="old\python\py_module.h"> | ||||
| <Filter>old\python</Filter> | <Filter>old\python</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="term\term.h"> | |||||
| <ClInclude Include="term\pty.h"> | |||||
| <Filter>term</Filter> | <Filter>term</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| <ClInclude Include="term\pty.h"> | |||||
| <ClInclude Include="term\term.h"> | |||||
| <Filter>term</Filter> | <Filter>term</Filter> | ||||
| </ClInclude> | </ClInclude> | ||||
| </ItemGroup> | </ItemGroup> | ||||
| @@ -124,6 +121,9 @@ | |||||
| <Filter Include="old\python"> | <Filter Include="old\python"> | ||||
| <UniqueIdentifier>{9140687d-c5b2-4302-8121-9b12ebf3908e}</UniqueIdentifier> | <UniqueIdentifier>{9140687d-c5b2-4302-8121-9b12ebf3908e}</UniqueIdentifier> | ||||
| </Filter> | </Filter> | ||||
| <Filter Include="term"> | |||||
| <UniqueIdentifier>{17f5f0be-6afb-4e39-8cb1-07df59d7ba9b}</UniqueIdentifier> | |||||
| </Filter> | |||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | <ItemGroup> | ||||
| <LolFxCompile Include="video\simple.lolfx"> | <LolFxCompile Include="video\simple.lolfx"> | ||||
| @@ -157,4 +157,4 @@ | |||||
| <Filter>video</Filter> | <Filter>video</Filter> | ||||
| </LolFxCompile> | </LolFxCompile> | ||||
| </ItemGroup> | </ItemGroup> | ||||
| </Project> | |||||
| </Project> | |||||
| @@ -61,7 +61,8 @@ void resize_screen(struct screen *s, int w, int h) | |||||
| s->cv = newc; | s->cv = newc; | ||||
| caca_gotoxy(newc, caca_get_cursor_x(oldc), caca_get_cursor_y(oldc)); | caca_gotoxy(newc, caca_get_cursor_x(oldc), caca_get_cursor_y(oldc)); | ||||
| caca_free_canvas(oldc); | caca_free_canvas(oldc); | ||||
| set_tty_size(s->fd, w, h); | |||||
| /* FIXME: disabled */ | |||||
| //set_tty_size(s->fd, w, h); | |||||
| s->orig_w = s->w; | s->orig_w = s->w; | ||||
| s->orig_h = s->h; | s->orig_h = s->h; | ||||
| @@ -39,7 +39,7 @@ | |||||
| using namespace std; | using namespace std; | ||||
| using namespace lol; | using namespace lol; | ||||
| #include "neercs.h" | |||||
| #include "../neercs.h" | |||||
| Pty::Pty() | Pty::Pty() | ||||
| : m_fd(-1), | : m_fd(-1), | ||||
| @@ -52,12 +52,14 @@ Pty::Pty() | |||||
| Pty::~Pty() | Pty::~Pty() | ||||
| { | { | ||||
| #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H | |||||
| delete m_unread_data; | delete m_unread_data; | ||||
| if (m_fd >= 0) | if (m_fd >= 0) | ||||
| { | { | ||||
| close((int)m_fd); | close((int)m_fd); | ||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| void Pty::Run(char const *command, ivec2 size) | void Pty::Run(char const *command, ivec2 size) | ||||
| @@ -104,6 +106,7 @@ void Pty::Run(char const *command, ivec2 size) | |||||
| size_t Pty::ReadData(char *data, size_t maxlen) | size_t Pty::ReadData(char *data, size_t maxlen) | ||||
| { | { | ||||
| #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H | |||||
| /* Do we have data from previous call? */ | /* Do we have data from previous call? */ | ||||
| if (m_unread_len) | if (m_unread_len) | ||||
| { | { | ||||
| @@ -151,12 +154,14 @@ size_t Pty::ReadData(char *data, size_t maxlen) | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #endif | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| void Pty::UnreadData(char *data, size_t len) | void Pty::UnreadData(char *data, size_t len) | ||||
| { | { | ||||
| #if defined HAVE_PTY_H || defined HAVE_UTIL_H || defined HAVE_LIBUTIL_H | |||||
| char *new_data; | char *new_data; | ||||
| if (m_unread_data) | if (m_unread_data) | ||||
| @@ -172,6 +177,7 @@ void Pty::UnreadData(char *data, size_t len) | |||||
| memcpy(new_data, data, len); | memcpy(new_data, data, len); | ||||
| m_unread_data = new_data; | m_unread_data = new_data; | ||||
| #endif | |||||
| } | } | ||||
| void Pty::SetWindowSize(ivec2 size, int64_t fd /* = -1 */) | void Pty::SetWindowSize(ivec2 size, int64_t fd /* = -1 */) | ||||
| @@ -193,34 +199,3 @@ void Pty::SetWindowSize(ivec2 size, int64_t fd /* = -1 */) | |||||
| ioctl((int)fd, TIOCSWINSZ, (char *)&ws); | ioctl((int)fd, TIOCSWINSZ, (char *)&ws); | ||||
| #endif | #endif | ||||
| } | } | ||||
| #if 0 | |||||
| int update_terms(struct screen_list *screen_list) | |||||
| { | |||||
| int i, refresh = 0; | |||||
| for (i = 0; i < screen_list->count; i++) | |||||
| { | |||||
| if (screen_list->screen[i]->total && !screen_list->dont_update_coords) | |||||
| { | |||||
| unsigned long int bytes; | |||||
| bytes = import_term(screen_list, | |||||
| screen_list->screen[i], | |||||
| screen_list->screen[i]->buf, | |||||
| screen_list->screen[i]->total); | |||||
| if (bytes > 0) | |||||
| { | |||||
| screen_list->screen[i]->total -= bytes; | |||||
| memmove(screen_list->screen[i]->buf, | |||||
| screen_list->screen[i]->buf + bytes, | |||||
| screen_list->screen[i]->total); | |||||
| if (screen_list->screen[i]->visible || screen_list->modals.mini) | |||||
| refresh = 1; | |||||
| } | |||||
| } | |||||
| } | |||||
| return refresh; | |||||
| } | |||||
| #endif | |||||
| @@ -6,6 +6,15 @@ | |||||
| # include "config.h" | # include "config.h" | ||||
| #endif | #endif | ||||
| #if defined _XBOX | |||||
| # define _USE_MATH_DEFINES /* for M_PI */ | |||||
| # include <xtl.h> | |||||
| #elif defined _WIN32 | |||||
| # define _USE_MATH_DEFINES /* for M_PI */ | |||||
| # define WIN32_LEAN_AND_MEAN | |||||
| # include <windows.h> | |||||
| #endif | |||||
| #include "core.h" | #include "core.h" | ||||
| using namespace std; | using namespace std; | ||||