/[winpt]/trunk/Src/wptW32API.cpp
ViewVC logotype

Diff of /trunk/Src/wptW32API.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 174 by twoaday, Thu Jan 26 10:17:17 2006 UTC revision 175 by twoaday, Tue Feb 7 08:58:04 2006 UTC
# Line 542  get_locale_date (long tm_t, char *buf, D Line 542  get_locale_date (long tm_t, char *buf, D
542  }  }
543    
544    
545    /* Generate a temporary file name by using the users
546       temp path and optionally a name @name provided by the caller.
547       Return value: 0 on success. */
548    int
549    get_temp_name (char *buf, DWORD buflen, const char *name)
550    {
551        char tmp[32];
552    
553        if (!name) {
554            sprintf (tmp, "%08lX", GetTickCount ());
555            name = tmp;
556        }
557        if (!GetTempPath (buflen - strlen (name) -2, buf)) {
558            log_debug ("GetTempPath() failed ec=%d\n", (int)GetLastError ());
559            return -1;
560        }
561        strcat (buf, name);
562        return 0;
563    }
564    
565    
566  struct reminder_hd_s {  struct reminder_hd_s {
567      int msecs;      int msecs;
568      HWND dlg;      HWND dlg;

Legend:
Removed from v.174  
changed lines
  Added in v.175

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26