1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Rather more natural (if much more complex) Mac Filename implementation.

Filenames are represented as a FSSpec, which is converted to and from an
alias record ('alis' resource) when saving and loading sessions.
.
It might be an idea to allow in-core Filenames to contain alias records too,
so that they can refer to directories that don't exist on the current system,
but that requires Filenames to be dynamically allocated, which is likely to be
a pain.

[originally from svn r2771]
This commit is contained in:
Ben Harris
2003-02-01 21:44:05 +00:00
parent 4f76d033d5
commit 61711b9594
3 changed files with 155 additions and 15 deletions

View File

@ -5,17 +5,21 @@
typedef void *Context; /* FIXME */
#include <MacTypes.h>
#include <stdio.h> /* for FILENAME_MAX */
#include <Files.h>
#include <stdio.h>
struct Filename {
char path[FILENAME_MAX];
FSSpec fss;
};
#define f_open(filename, mode) ( fopen((filename).path, (mode)) )
extern FILE * f_open(struct Filename, char const *);
/* Suspiciously similar to an ICFontRecord */
struct FontSpec {
short size;
Style face;
char pad;
Str255 name;
};