Mercurial > hg > octave-avbm
changeset 13647:ac3d9480292d
Renamed file.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Tue, 23 Aug 2011 18:22:27 +0200 |
parents | 2e1f54803758 |
children | da69cec2459f |
files | gui/octave-gui.pro gui/src/terminal/KPty.cpp gui/src/terminal/KPty.h gui/src/terminal/KPtyDevice.cpp gui/src/terminal/KPtyDevice.h gui/src/terminal/LinuxTerminalEmulation.h gui/src/terminal/kpty.cpp gui/src/terminal/kpty.h gui/src/terminal/kpty_p.h gui/src/terminal/kptydevice.cpp gui/src/terminal/kptydevice.h |
diffstat | 7 files changed, 30 insertions(+), 78 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/octave-gui.pro +++ b/gui/octave-gui.pro @@ -58,8 +58,6 @@ # Files associated with the project: SOURCES +=\ src/lexer/lexeroctavegui.cpp \ - src/terminal/kpty.cpp \ - src/terminal/kptydevice.cpp \ src/MainWindow.cpp \ src/OctaveTerminal.cpp \ src/VariablesDockWidget.cpp \ @@ -79,13 +77,12 @@ src/qirc/IRCClientImpl.cpp \ src/terminal/TerminalEmulation.cpp \ src/terminal/LinuxTerminalEmulation.cpp \ - src/backend/ReadlineAdapter.cpp + src/backend/ReadlineAdapter.cpp \ + src/terminal/KPty.cpp \ + src/terminal/KPtyDevice.cpp HEADERS += \ src/lexer/lexeroctavegui.h \ - src/terminal/kpty.h \ - src/terminal/kpty_p.h \ - src/terminal/kptydevice.h \ src/MainWindow.h \ src/OctaveTerminal.h \ src/VariablesDockWidget.h \ @@ -105,7 +102,9 @@ src/qirc/IRCClientImpl.h \ src/terminal/TerminalEmulation.h \ src/terminal/LinuxTerminalEmulation.h \ - src/backend/ReadlineAdapter.h + src/backend/ReadlineAdapter.h \ + src/terminal/KPtyDevice.h \ + src/terminal/KPty.h FORMS += \ src/SettingsDialog.ui
rename from gui/src/terminal/kpty.cpp rename to gui/src/terminal/KPty.cpp --- a/gui/src/terminal/kpty.cpp +++ b/gui/src/terminal/KPty.cpp @@ -22,12 +22,14 @@ Boston, MA 02110-1301, USA. */ -#include "kpty_p.h" +#include "KPty.h" #include <fcntl.h> #include <stdio.h> + #include <pty.h> #include <utmp.h> + /* for HP-UX (some versions) the extern C is needed, and for other platforms it doesn't hurt */ extern "C"
rename from gui/src/terminal/kpty.h rename to gui/src/terminal/KPty.h --- a/gui/src/terminal/kpty.h +++ b/gui/src/terminal/KPty.h @@ -20,9 +20,26 @@ #ifndef kpty_h #define kpty_h + #include <QtCore/qglobal.h> +#include <QByteArray> -struct KPtyPrivate; +class KPty; +struct KPtyPrivate +{ + Q_DECLARE_PUBLIC (KPty) KPtyPrivate (KPty * parent); + virtual ~ KPtyPrivate (); + bool chownpty (bool grant); + + int masterFd; + int slaveFd; + bool ownMaster:1; + + QByteArray ttyName; + + KPty *q_ptr; +}; + struct termios; /**
rename from gui/src/terminal/kptydevice.cpp rename to gui/src/terminal/KPtyDevice.cpp --- a/gui/src/terminal/kptydevice.cpp +++ b/gui/src/terminal/KPtyDevice.cpp @@ -21,9 +21,7 @@ Boston, MA 02110-1301, USA. */ -#include "kptydevice.h" -#include "kpty_p.h" -#define i18n +#include "KPtyDevice.h" #include <QtCore/QSocketNotifier> @@ -75,7 +73,6 @@ if (readBytes < 0) { readBuffer.unreserve (available); - q->setErrorString (i18n ("Error reading from PTY")); return false; } readBuffer.unreserve (available - readBytes); // *should* be a no-op @@ -114,7 +111,6 @@ writeBuffer.readPointer (), writeBuffer.readSize ())); if (wroteBytes < 0) { - q->setErrorString (i18n ("Error writing to PTY")); return false; } writeBuffer.free (wroteBytes); @@ -188,7 +184,6 @@ break; return false; case 0: - q->setErrorString (i18n ("PTY operation timed out")); return false; default: if (FD_ISSET (q->masterFd (), &rfds)) @@ -248,7 +243,6 @@ if (!KPty::open ()) { - setErrorString (i18n ("Error opening PTY")); return false; } @@ -264,7 +258,6 @@ if (!KPty::open (fd)) { - setErrorString (i18n ("Error opening PTY")); return false; }
rename from gui/src/terminal/kptydevice.h rename to gui/src/terminal/KPtyDevice.h --- a/gui/src/terminal/kptydevice.h +++ b/gui/src/terminal/KPtyDevice.h @@ -21,11 +21,9 @@ #ifndef kptydev_h #define kptydev_h -struct KPtyPrivate; struct KPtyDevicePrivate; -#include "kpty.h" -#include "kpty_p.h" +#include "KPty.h" #include <QtCore/QIODevice> #include <QSocketNotifier>
--- a/gui/src/terminal/LinuxTerminalEmulation.h +++ b/gui/src/terminal/LinuxTerminalEmulation.h @@ -6,7 +6,7 @@ #include "unistd.h" #include <assert.h> #include <cstdio> -#include "kptydevice.h" +#include "KPtyDevice.h" class LinuxTerminalEmulation : public TerminalEmulation {
deleted file mode 100644 --- a/gui/src/terminal/kpty_p.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of the KDE libraries - - Copyright (C) 2003,2007 Oswald Buddenhagen <ossi@kde.org> - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef kpty_p_h -#define kpty_p_h - -#include "kpty.h" - -#if defined(Q_OS_MAC) -#define HAVE_UTIL_H -#define HAVE_UTMPX -#define _UTMPX_COMPAT -#define HAVE_PTSNAME -#define HAVE_SYS_TIME_H -#else -#define HAVE_PTY_H -#endif - -#define HAVE_OPENPTY - -#include <QtCore/QByteArray> - -struct KPtyPrivate -{ - Q_DECLARE_PUBLIC (KPty) KPtyPrivate (KPty * parent); - virtual ~ KPtyPrivate (); -#ifndef HAVE_OPENPTY - bool chownpty (bool grant); -#endif - - int masterFd; - int slaveFd; - bool ownMaster:1; - - QByteArray ttyName; - - KPty *q_ptr; -}; - -#endif