summaryrefslogtreecommitdiff
path: root/src/Misc.cpp
diff options
context:
space:
mode:
authorntoskrnl <ntoskrnl11@yahoo.com>2012-07-29 16:14:14 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-02 14:21:16 (GMT)
commitf94fabd999c304de958cc051e9625f169cec138f (patch)
tree9ee58bc33bd745afa32b0d57b413cc7a555cd545 /src/Misc.cpp
parent87dfc47c9785f834e61eef4545c503071d1665fc (diff)
downloadpowder-f94fabd999c304de958cc051e9625f169cec138f.zip
powder-f94fabd999c304de958cc051e9625f169cec138f.tar.gz
Rename WIN32 preprocessor definition to WIN
Diffstat (limited to 'src/Misc.cpp')
-rw-r--r--src/Misc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Misc.cpp b/src/Misc.cpp
index 2c4f2e5..c7481ab 100644
--- a/src/Misc.cpp
+++ b/src/Misc.cpp
@@ -8,7 +8,7 @@
#include "Config.h"
#include "Misc.h"
#include "icondoc.h"
-#if defined WIN32
+#if defined(WIN)
#include <shlobj.h>
#include <shlwapi.h>
#include <windows.h>
@@ -59,7 +59,7 @@ char *clipboard_text = NULL;
char *exe_name(void)
{
-#if defined WIN32
+#if defined(WIN)
char *name= (char *)malloc(64);
DWORD max=64, res;
while ((res = GetModuleFileName(NULL, name, max)) >= max)
@@ -378,7 +378,7 @@ void clipboard_push_text(char * text)
CFDataRef data = CFDataCreate(kCFAllocatorDefault, (const UInt8*)text, strlen(text));
PasteboardPutItemFlavor(newclipboard, (PasteboardItemID)1, CFSTR("com.apple.traditional-mac-plain-text"), data, 0);
-#elif defined WIN32
+#elif defined(WIN)
if (OpenClipboard(NULL))
{
HGLOBAL cbuffer;
@@ -414,7 +414,7 @@ char * clipboard_pull_text()
{
#ifdef MACOSX
printf("Not implemented: get text from clipboard\n");
-#elif defined WIN32
+#elif defined(WIN)
if (OpenClipboard(NULL))
{
HANDLE cbuffer;
@@ -440,7 +440,7 @@ char * clipboard_pull_text()
int register_extension()
{
-#if defined WIN32
+#if defined(WIN)
int returnval;
LONG rresult;
HKEY newkey;
@@ -661,7 +661,7 @@ void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b)//convert 0-255(0-360 for
}
void OpenURI(std::string uri) {
-#ifdef WIN32
+#if defined(WIN)
ShellExecute(0, "OPEN", uri.c_str(), NULL, NULL, 0);
#elif defined(MACOSX)
char *cmd = (char*)malloc(7+uri.length());