diff win/dirent.c @ 527:e0ea29c3d1eb

Fixed dw_window_pointer() so it works on Windows. Tried to fix the timer problems on Windows, but only managed to reduce the problem and eliminate obsolete timer code. Fixed a calling convention problem caused by incorrect placement of the definition of API in the compat.h header. Make dw_beep() not block on OS/2 and Windows.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 23 Mar 2004 11:00:04 +0000
parents e320dc29bfcd
children 1e3ab8adba90
line wrap: on
line diff
--- a/win/dirent.c	Tue Mar 23 10:10:27 2004 +0000
+++ b/win/dirent.c	Tue Mar 23 11:00:04 2004 +0000
@@ -5,7 +5,7 @@
 
 #include <windows.h>
 
-#include "dirent.h"
+#include "compat.h"
 #include <errno.h>
 
 #define error(rc) errno = 255
@@ -25,8 +25,7 @@
 /*
  * Return first char of filesystem type, or 0 if unknown.
  */
-static char
-getFSType(const char *path)
+static char API getFSType(const char *path)
 {
 	static char cache[1+26];
 	char drive[3];
@@ -56,7 +55,7 @@
 	return cache [unit] = r;
 }
 
-char *abs_path(const char *name, char *buffer, int len)
+char * API abs_path(const char *name, char *buffer, int len)
 {
 	char *buf;
 	LPTSTR file;
@@ -81,7 +80,7 @@
 	return NULL;
 }
 
-DIR *openxdir(const char *path, unsigned att_mask)
+DIR * API openxdir(const char *path, unsigned att_mask)
 {
 	DIR *dir;
 	char name[MAXPATHLEN+3];
@@ -127,14 +126,12 @@
 	return (DIR *)dir;
 }
 
-DIR *
-opendir(const char *pathname)
+DIR * API opendir(const char *pathname)
 {
 	return openxdir(pathname, 0);
 }
 
-struct dirent *
-readdir(DIR *dir)
+struct dirent * API readdir(DIR *dir)
 {
 	static int dummy_ino = 2;
 
@@ -167,14 +164,12 @@
 	return &dir->entry;
 }
 
-long
-telldir(DIR *dir)
+long API telldir(DIR *dir)
 {
 	return dir->number;
 }
 
-void
-seekdir(DIR *dir, long off)
+void API seekdir(DIR *dir, long off)
 {
 	if (dir->number > off) {
 		char name[MAXPATHLEN+2];
@@ -199,8 +194,7 @@
 		;
 }
 
-void
-closedir(DIR *dir)
+void API closedir(DIR *dir)
 {
 	FindClose(dir->handle);
 	free(dir);