/[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 167 by twoaday, Thu Jan 26 10:17:17 2006 UTC revision 190 by twoaday, Mon Mar 27 10:05:14 2006 UTC
# Line 246  set_clip_text (HWND hwnd, const char *te Line 246  set_clip_text (HWND hwnd, const char *te
246            
247      GlobalUnlock (clipmem);      GlobalUnlock (clipmem);
248      SetClipboardData (CF_TEXT, clipmem);      SetClipboardData (CF_TEXT, clipmem);
249        GlobalFree (clipmem);
250            
251  leave:  leave:
252      CloseClipboard ();      CloseClipboard ();
253      return rc;      return rc;
254  } /* set_clip_text */  }
255    
256    
257  /* Append or prepend some text to the clipboard contents.  /* Append or prepend some text to the clipboard contents.
# Line 542  get_locale_date (long tm_t, char *buf, D Line 543  get_locale_date (long tm_t, char *buf, D
543  }  }
544    
545    
546    /* Generate a temporary file name by using the users
547       temp path and optionally a name @name provided by the caller.
548       Return value: 0 on success. */
549    int
550    get_temp_name (char *buf, DWORD buflen, const char *name)
551    {
552        char tmp[32];
553    
554        if (!name) {
555            sprintf (tmp, "%08lX", GetTickCount ());
556            name = tmp;
557        }
558    
559        /* in the mobile mode we use a local temp folder
560           with the fixed name 'temp'. */
561        if (mobile_mode_active) {
562            _snprintf (buf, buflen-1, "temp\\%s", name);
563            return 0;
564        }
565    
566        if (!GetTempPath (buflen - strlen (name) -2, buf)) {
567            log_debug ("GetTempPath() failed ec=%d\n", (int)GetLastError ());
568            return -1;
569        }
570        strcat (buf, name);
571        return 0;
572    }
573    
574    
575  struct reminder_hd_s {  struct reminder_hd_s {
576      int msecs;      int msecs;
577      HWND dlg;      HWND dlg;

Legend:
Removed from v.167  
changed lines
  Added in v.190

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26