aboutsummaryrefslogtreecommitdiff
path: root/shared/common
diff options
context:
space:
mode:
Diffstat (limited to 'shared/common')
-rw-r--r--shared/common/loud.c18
-rw-r--r--shared/common/os.c26
-rw-r--r--shared/common/port.c2
3 files changed, 23 insertions, 23 deletions
diff --git a/shared/common/loud.c b/shared/common/loud.c
index 7129962..d21334e 100644
--- a/shared/common/loud.c
+++ b/shared/common/loud.c
@@ -9,7 +9,7 @@
#include "m_pd.h"
#include "loud.h"
-#ifdef MSW
+#ifdef _WIN32
#define vsnprintf _vsnprintf
#endif
@@ -354,7 +354,7 @@ void loudbug_post(char *fmt, ...)
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
fprintf(stderr, "%s\n", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -367,7 +367,7 @@ void loudbug_startpost(char *fmt, ...)
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
fputs(buf, stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -375,7 +375,7 @@ void loudbug_startpost(char *fmt, ...)
void loudbug_stringpost(char *s)
{
fputs(s, stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -383,7 +383,7 @@ void loudbug_stringpost(char *s)
void loudbug_endpost(void)
{
fputs("\n", stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -395,7 +395,7 @@ void loudbug_postatom(int ac, t_atom *av)
char buf[MAXPDSTRING];
atom_string(av++, buf, MAXPDSTRING);
fprintf(stderr, " %s", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -417,7 +417,7 @@ void loudbug_postbinbuf(t_binbuf *bb)
fprintf(stderr, " %s", buf);
}
else fprintf(stderr, "%s", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
aprev = ap++;
@@ -425,7 +425,7 @@ void loudbug_postbinbuf(t_binbuf *bb)
if (aprev)
{
fputs("\n", stderr);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
}
@@ -439,7 +439,7 @@ void loudbug_bug(char *fmt, ...)
vsnprintf(buf, MAXPDSTRING-1, fmt, ap);
va_end(ap);
fprintf(stderr, "miXed consistency check failed: %s\n", buf);
-#ifdef MSW
+#ifdef _WIN32
fflush(stderr);
#endif
bug(buf);
diff --git a/shared/common/os.c b/shared/common/os.c
index 9737949..40358b3 100644
--- a/shared/common/os.c
+++ b/shared/common/os.c
@@ -2,7 +2,7 @@
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-#ifdef MSW
+#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
@@ -28,7 +28,7 @@ static int ospath_doabsolute(char *path, char *cwd, char *result)
path++;
if (*path == '/' || *path == 0)
{
-#ifdef UNIX
+#ifndef _WIN32
char *home = getenv("HOME");
if (home)
{
@@ -49,7 +49,7 @@ static int ospath_doabsolute(char *path, char *cwd, char *result)
}
else if (*path == '/')
{
-#ifdef MSW
+#ifdef _WIN32
/* path is absolute, drive is implicit, LATER UNC? */
if (*cwd && cwd[1] == ':')
{
@@ -72,7 +72,7 @@ static int ospath_doabsolute(char *path, char *cwd, char *result)
}
else
{
-#ifdef MSW
+#ifdef _WIN32
if (path[1] == ':')
{
if (path[2] == '/')
@@ -237,7 +237,7 @@ FILE *filewrite_open(char *filename, t_canvas *cv, int textmode)
struct _osdir
{
-#ifndef MSW
+#ifndef _WIN32
DIR *dir_handle;
struct dirent *dir_entry;
#endif
@@ -248,19 +248,19 @@ struct _osdir
loud_syserror(owner, "cannot open \"%s\"", dirname) */
t_osdir *osdir_open(char *dirname)
{
-#ifndef MSW
+#ifndef _WIN32
DIR *handle = opendir(dirname);
if (handle)
{
#endif
t_osdir *dp = getbytes(sizeof(*dp));
-#ifndef MSW
+#ifndef _WIN32
dp->dir_handle = handle;
dp->dir_entry = 0;
#endif
dp->dir_flags = 0;
return (dp);
-#ifndef MSW
+#ifndef _WIN32
}
else return (0);
#endif
@@ -276,7 +276,7 @@ void osdir_close(t_osdir *dp)
{
if (dp)
{
-#ifndef MSW
+#ifndef _WIN32
closedir(dp->dir_handle);
#endif
freebytes(dp, sizeof(*dp));
@@ -287,7 +287,7 @@ void osdir_rewind(t_osdir *dp)
{
if (dp)
{
-#ifndef MSW
+#ifndef _WIN32
rewinddir(dp->dir_handle);
dp->dir_entry = 0;
#endif
@@ -296,7 +296,7 @@ void osdir_rewind(t_osdir *dp)
char *osdir_next(t_osdir *dp)
{
-#ifndef MSW
+#ifndef _WIN32
if (dp)
{
while (dp->dir_entry = readdir(dp->dir_handle))
@@ -315,7 +315,7 @@ char *osdir_next(t_osdir *dp)
int osdir_isfile(t_osdir *dp)
{
-#ifndef MSW
+#ifndef _WIN32
return (dp && dp->dir_entry && dp->dir_entry->d_type == DT_REG);
#else
return (0);
@@ -324,7 +324,7 @@ int osdir_isfile(t_osdir *dp)
int osdir_isdir(t_osdir *dp)
{
-#ifndef MSW
+#ifndef _WIN32
return (dp && dp->dir_entry && dp->dir_entry->d_type == DT_DIR);
#else
return (0);
diff --git a/shared/common/port.c b/shared/common/port.c
index bcfddf3..ffce677 100644
--- a/shared/common/port.c
+++ b/shared/common/port.c
@@ -45,7 +45,7 @@ enum { PORT_OK, /* MESSTREE_CONTINUE */
#define A_INT A_DEFFLOAT
/* without access to sys_defaultfont, we just mimic defs from s_main.c */
-#ifdef MSW
+#ifdef _WIN32
#define PORT_DEFFONTSIZE 12.
#else
#define PORT_DEFFONTSIZE 10.