mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
I'm sick of all those #ifdefs in settings.c, and in any case plink
and pterm need at least one default setting to be _different_ (pterm needs the default term type to be `xterm', while plink needs it to be taken from $TERM). So here's a completely new alternative mechanism for platform- and app-specific default settings. Ben will probably want to check the integrity of the Mac port, since I've fiddled with it without testing that it still compiles. [originally from svn r2513]
This commit is contained in:
23
mac/mac.c
23
mac/mac.c
@ -1,4 +1,4 @@
|
||||
/* $Id: mac.c,v 1.20 2003/01/08 22:46:12 ben Exp $ */
|
||||
/* $Id: mac.c,v 1.21 2003/01/09 18:06:29 simon Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 Ben Harris
|
||||
* All rights reserved.
|
||||
@ -694,6 +694,27 @@ void old_keyfile_warning(void)
|
||||
|
||||
}
|
||||
|
||||
char *platform_default_s(char *name)
|
||||
{
|
||||
if (!strcmp(name, "Font"))
|
||||
return "Monaco";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int platform_default_i(char *name, int def)
|
||||
{
|
||||
if (!strcmp(name, "FontHeight"))
|
||||
return 9;
|
||||
/* Non-raw cut and paste of line-drawing chars works badly on the
|
||||
* current Unix stub implementation of the Unicode functions.
|
||||
* So I'm going to temporarily set the default to raw mode so
|
||||
* that the failure mode isn't quite so drastically horrid.
|
||||
* When Unicode comes in, this can all be put right. */
|
||||
if (!strcmp(name, "RawCNP"))
|
||||
return 1;
|
||||
return def;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* c-file-style: "simon"
|
||||
|
Reference in New Issue
Block a user