#include "puttyps.h"
#include "network.h"
-/*
- * Global variables. Most modules declare these `extern', but
- * window.c will do `#define PUTTY_DO_GLOBALS' before including this
- * module, and so will get them properly defined.
- */
-#ifdef PUTTY_DO_GLOBALS
-#define GLOBAL
-#else
-#define GLOBAL extern
-#endif
-
/* Three attribute types:
* The ATTRs (normal attributes) are stored with the characters in the main
* display arrays
GLOBAL int session_closed;
-GLOBAL char *help_path;
-GLOBAL int help_has_contents;
-
GLOBAL int nsessions;
GLOBAL char **sessions;
int default_port;
};
-GLOBAL Backend *back;
-GLOBAL void *backhandle;
-
extern struct backend_list {
int protocol;
char *name;
GLOBAL int default_protocol;
GLOBAL int default_port;
-GLOBAL Terminal *term; /* temporary while changes are made */
-
struct RSAKey; /* be a little careful of scope */
/*
/*
* Exports from ldisc.c.
*/
-
void *ldisc_create(Terminal *, Backend *, void *, void *);
void ldisc_send(void *handle, char *buf, int len, int interactive);
/*
+ * Exports from ldiscucs.c.
+ */
+void lpage_send(void *, int codepage, char *buf, int len, int interactive);
+void luni_send(void *, wchar_t * widebuf, int len, int interactive);
+
+/*
* Exports from sshrand.c.
*/
#ifndef CP_UTF8
#define CP_UTF8 65001
#endif
-void init_ucs_tables(void);
-void lpage_send(void *, int codepage, char *buf, int len, int interactive);
-void luni_send(void *, wchar_t * widebuf, int len, int interactive);
+void init_ucs(void);
+int is_dbcs_leadbyte(int codepage, char byte);
+int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
+ wchar_t *wcstr, int wclen);
+int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
+ char *mbstr, int mblen, char *defchr, int *defused);
wchar_t xlat_uskbd2cyrllic(int ch);
int check_compose(int first, int second);
int decode_codepage(char *cp_name);