projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change error handling to store the error number rather than the string,
[u/mdw/putty]
/
mac
/
macterm.c
diff --git
a/mac/macterm.c
b/mac/macterm.c
index
c91a734
..
b07756c
100644
(file)
--- a/
mac/macterm.c
+++ b/
mac/macterm.c
@@
-1,4
+1,4
@@
-/* $Id: macterm.c,v 1.3
7 2003/01/09 22:45:48
ben Exp $ */
+/* $Id: macterm.c,v 1.3
9 2003/01/09 23:29:22
ben Exp $ */
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
/*
* Copyright (c) 1999 Simon Tatham
* Copyright (c) 1999, 2002 Ben Harris
@@
-238,7
+238,7
@@
static void mac_initfont(Session *s) {
OptionBits fbflags;
SetPort(s->window);
OptionBits fbflags;
SetPort(s->window);
-
macfont[0] = sprintf((char *)&macfont[1], "%s"
, s->cfg.font);
+
c2pstrcpy(macfont
, s->cfg.font);
GetFNum(macfont, &s->fontnum);
TextFont(s->fontnum);
TextFace(s->cfg.fontisbold ? bold : 0);
GetFNum(macfont, &s->fontnum);
TextFont(s->fontnum);
TextFace(s->cfg.fontisbold ? bold : 0);
@@
-1269,7
+1269,7
@@
void set_title(void *frontend, char *title) {
Session *s = frontend;
Str255 mactitle;
Session *s = frontend;
Str255 mactitle;
-
mactitle[0] = sprintf((char *)&mactitle[1], "%s"
, title);
+
c2pstrcpy(mactitle
, title);
SetWTitle(s->window, mactitle);
}
SetWTitle(s->window, mactitle);
}
@@
-1402,9
+1402,12
@@
void get_window_pixels(void *frontend, int *x, int *y)
char *get_window_title(void *frontend, int icon)
{
Session *s = frontend;
char *get_window_title(void *frontend, int icon)
{
Session *s = frontend;
+ Str255 ptitle;
+ static char title[256];
- /* Erm, we don't save this at the moment */
- return "";
+ GetWTitle(s->window, ptitle);
+ p2cstrcpy(title, ptitle);
+ return title;
}
/*
}
/*