void *open_settings_w(char const *sessionname) {
void *open_settings_w(char const *sessionname, char **errmsg) {
void *open_settings_w(char const *sessionname) {    short sessVRefNum;    long sessDirID;    OSErr error;    Str255 psessionname;    FSSpec dstfile;        error = get_session_dir(kCreateFolder, &sessVRefNum, &sessDirID);    if (error != noErr) return NULL;    if (!sessionname || !*sessionname)	sessionname = "Default Settings";    c2pstrcpy(psessionname, sessionname);    error = FSMakeFSSpec(sessVRefNum, sessDirID, psessionname, &dstfile);    if (error == fnfErr) {	FSpCreateResFile(&dstfile, PUTTY_CREATOR, SESS_TYPE, smSystemScript);	if ((error = ResError()) != noErr) return NULL;    } else if (error != noErr) return NULL;    return open_settings_w_fsp(&dstfile);}