Move struct lshcontext into ssh2.h and remove more lsh includes

This commit is contained in:
Brendan Shanks 2018-07-31 23:01:43 -07:00
parent e133135151
commit b2aed0bdf4
2 changed files with 62 additions and 3 deletions

View File

@ -62,7 +62,6 @@
#include <Fonts.h> #include <Fonts.h>
#include <LowMem.h> #include <LowMem.h>
#include <Gestalt.h> #include <Gestalt.h>
#include <Resource.h>
extern Boolean gInitialized; extern Boolean gInitialized;

View File

@ -17,8 +17,68 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "lshprefix.h" /****** moved from lshprefix.h */
#include "lsh_context.h"
#define exit macosexit
#define abort macosabort
extern char *strsignal(int signo);
/*******/
/****** moved from lsh_context.h */
#include <pthread.h>
#include <setjmp.h>
#define CONSOLEBUFSIZE 16384
typedef struct lshcontext {
int _port; // for BetterTelnet's networking
void *_userdata; // available for callers
pthread_t _thread;
int _forward;
int _localport;
int _listener; // for cvs
int _socket; // for cvs
int _rcmdline; // for cvs
jmp_buf *_pexitbuf;
Boolean _gConsoleInEOF;
Boolean _convertLFs;
Boolean _stripCRs;
char _lastCR;
void *_insock;
long _gConsoleInBufLen;
long _gConsoleInBufMax;
char _gConsoleInBuf[CONSOLEBUFSIZE];
long _gConsoleOutBufLen;
long _gConsoleOutBufMax;
char _gConsoleOutBuf[CONSOLEBUFSIZE];
int _quiet_flag;
int _verbose_flag;
int _trace_flag;
int _debug_flag;
int _tracing;
int _verbosing;
int _debugging;
char *_envv[4]; // "HOME", "LOGNAME", "TERM", "DISPLAY"
char _term[64]; // home and logname never change
char _display[64]; // home and logname never change
char _kpassword[64];
int _kindex;
int _pindex;
char _keychainprompt[256];
struct lshcontext *_self;
} lshcontext;
/*******/
#include "wind.h" #include "wind.h"
#include <PLStringFuncs.h> #include <PLStringFuncs.h>