mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-15 18:17:32 -05:00
Created new data types Filename' and
FontSpec', intended to be
opaque to all platform-independent modules and only handled within per-platform code. `Filename' is there because the Mac has a magic way to store filenames (though currently this checkin doesn't support it!); `FontSpec' is there so that all the auxiliary stuff such as font height and charset and so on which is needed under Windows but not Unix can be kept where it belongs, and so that I can have a hope in hell of dealing with a font chooser in the forthcoming cross-platform config box code, and best of all it gets the horrid font height wart out of settings.c and into the Windows code where it should be. The Mac part of this checkin is a bunch of random guesses which will probably not quite compile, but which look roughly right to me. Sorry if I screwed it up, Ben :-) [originally from svn r2765]
This commit is contained in:
14
winstuff.h
14
winstuff.h
@ -5,6 +5,20 @@
|
||||
#ifndef PUTTY_WINSTUFF_H
|
||||
#define PUTTY_WINSTUFF_H
|
||||
|
||||
#include <stdio.h> /* for FILENAME_MAX */
|
||||
|
||||
struct Filename {
|
||||
char path[FILENAME_MAX];
|
||||
};
|
||||
#define f_open(filename, mode) ( fopen((filename).path, (mode)) )
|
||||
|
||||
struct FontSpec {
|
||||
char name[64];
|
||||
int isbold;
|
||||
int height;
|
||||
int charset;
|
||||
};
|
||||
|
||||
/*
|
||||
* Global variables. Most modules declare these `extern', but
|
||||
* window.c will do `#define PUTTY_DO_GLOBALS' before including this
|
||||
|
Reference in New Issue
Block a user