mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 18:07:59 +00:00
34f747421d
in place of making a network connection. This has involved a couple of minor infrastructure changes: - New dlg_label_change() function in the dialog.h interface, which alters the label on a control. Only used, at present, to switch the Host Name and Port boxes into Serial Line and Speed, which means that any platform not implementing serial connections (i.e. currently all but Windows) does not need to actually do anything in this function. Yet. - New small piece of infrastructure: cfg_launchable() determines whether a Config structure describes a session ready to be launched. This was previously determined by seeing if it had a non-empty host name, but it has to check the serial line as well so there's a centralised function for it. I haven't gone through all front ends and arranged for this function to be used everywhere it needs to be; so far I've only checked Windows. - Similarly, cfg_dest() returns the destination of a connection (host name or serial line) in a text format suitable for putting into messages such as `Unable to connect to %s'. [originally from svn r6815]
44 lines
761 B
C
44 lines
761 B
C
/*
|
|
* windefs.c: default settings that are specific to Windows.
|
|
*/
|
|
|
|
#include "putty.h"
|
|
|
|
#include <commctrl.h>
|
|
|
|
FontSpec platform_default_fontspec(const char *name)
|
|
{
|
|
FontSpec ret;
|
|
if (!strcmp(name, "Font")) {
|
|
strcpy(ret.name, "Courier New");
|
|
ret.isbold = 0;
|
|
ret.charset = ANSI_CHARSET;
|
|
ret.height = 10;
|
|
} else {
|
|
ret.name[0] = '\0';
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
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;
|
|
}
|