1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00
putty-source/windows/windefs.c
Simon Tatham 9c75fe9a3f Change the semantics of 'FontSpec' so that it's a dynamically
allocated type.

The main reason for this is to stop it from taking up a fixed large
amount of space in every 'struct value' subunion in conf.c, although
that makes little difference so far because Filename is still doing
the same thing (and is therefore next on my list). However, the
removal of its arbitrary length limit is not to be sneezed at.

[originally from svn r9314]
2011-10-01 17:38:59 +00:00

38 lines
704 B
C

/*
* windefs.c: default settings that are specific to Windows.
*/
#include "putty.h"
#include <commctrl.h>
FontSpec *platform_default_fontspec(const char *name)
{
if (!strcmp(name, "Font"))
return fontspec_new("Courier New", 0, 10, ANSI_CHARSET);
else
return fontspec_new("", 0, 0, 0);
}
Filename platform_default_filename(const char *name)
{
Filename ret;
if (!strcmp(name, "LogFileName"))
strcpy(ret.path, "putty.log");
else
*ret.path = '\0';
return ret;
}
char *platform_default_s(const char *name)
{
if (!strcmp(name, "SerialLine"))
return dupstr("COM1");
return NULL;
}
int platform_default_i(const char *name, int def)
{
return def;
}