projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First attempt at a Unix port of Plink. Seems to basically work;
[u/mdw/putty]
/
unix
/
pterm.c
diff --git
a/unix/pterm.c
b/unix/pterm.c
index
e53499d
..
cc45962
100644
(file)
--- a/
unix/pterm.c
+++ b/
unix/pterm.c
@@
-16,10
+16,11
@@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
#define PUTTY_DO_GLOBALS /* actually _define_ globals */
#include "putty.h"
#define PUTTY_DO_GLOBALS /* actually _define_ globals */
#include "putty.h"
@@
-68,6
+69,13
@@
struct draw_ctx {
static int send_raw_mouse;
static int send_raw_mouse;
+static char *app_name = "pterm";
+
+char *x_get_default(char *key)
+{
+ return XGetDefault(GDK_DISPLAY(), app_name, key);
+}
+
void ldisc_update(void *frontend, int echo, int edit)
{
/*
void ldisc_update(void *frontend, int echo, int edit)
{
/*
@@
-1726,8
+1734,6
@@
char *get_x_display(void *frontend)
return gdk_get_display();
}
return gdk_get_display();
}
-char *app_name = "pterm";
-
static void help(FILE *fp) {
if(fprintf(fp,
"pterm option summary:\n"
static void help(FILE *fp) {
if(fprintf(fp,
"pterm option summary:\n"