X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=mac%2Fmacmisc.c;h=2d976e7dda9a15e831a93c19139399bf487f0a0c;hb=49d2cf19accb059b3b68d1fc2b78e606a578c3e8;hp=b247978127be0d68469066d04a010ca61ce2e78d;hpb=f53c998569d4d64209e40bfe4968d4508fb65f34;p=PuTTY.git diff --git a/mac/macmisc.c b/mac/macmisc.c index b2479781..2d976e7d 100644 --- a/mac/macmisc.c +++ b/mac/macmisc.c @@ -1,4 +1,4 @@ -/* $Id: macmisc.c,v 1.2 2003/02/20 22:31:52 ben Exp $ */ +/* $Id$ */ /* * Copyright (c) 1999, 2003 Ben Harris * All rights reserved. @@ -38,6 +38,7 @@ #include "putty.h" #include "mac.h" +#include "ssh.h" #if TARGET_API_MAC_CARBON /* @@ -119,7 +120,7 @@ const char *filename_to_str(const Filename *fn) char *newpath; if (path != NULL) sfree(path); - path = smalloc(fn->fss.name[0]); + path = snewn(fn->fss.name[0], char); p2cstrcpy(path, fn->fss.name); pb.dirInfo.ioNamePtr = dirname; pb.dirInfo.ioVRefNum = fn->fss.vRefNum; @@ -130,7 +131,7 @@ const char *filename_to_str(const Filename *fn) err = PBGetCatInfoSync(&pb); /* XXX Assume not A/UX */ - newpath = smalloc(strlen(path) + dirname[0] + 2); + newpath = snewn(strlen(path) + dirname[0] + 2, char); p2cstrcpy(newpath, dirname); strcat(newpath, ":"); strcat(newpath, path); @@ -172,6 +173,33 @@ FILE *f_open(Filename fn, char const *mode) return ret; } +struct tm ltime(void) +{ + struct tm tm; + DateTimeRec d; + GetTime(&d); + + tm.tm_sec=d.second; + tm.tm_min=d.minute; + tm.tm_hour=d.hour; + tm.tm_mday=d.day; + tm.tm_mon=d.month-1; + tm.tm_year=d.year-1900; + tm.tm_wday=d.dayOfWeek; + tm.tm_yday=1; /* GetTime doesn't tell us */ + tm.tm_isdst=0; /* Have to do DST ourselves */ + + /* XXX find out DST adjustment and add it */ + + return tm; +} + +const char platform_x11_best_transport[] = "localhost"; + +char *platform_get_x_display(void) { + return NULL; +} + /* * Local Variables: * c-file-style: "simon"