aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/closedir.c
blob: dcf17049885c2774934e3820ebb3a4398929fee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * closedir.c
 */

#include <dirent.h>
#include <stdio.h>
#include <errno.h>

#include <com32.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>

int closedir(DIR * dir)
{
    int rv = -1;
	
    if (dir) {
	/*
	  com32sys_t regs;
	  memset(&regs, 0, sizeof regs);
	  regs.eax.w[0] = 0x0022;
	  regs.esi.l = OFFS_WRT(dir, 0);
	  __com32.cs_intcall(0x22, &regs, &regs);
	*/
	free(dir);
	rv = 0;
	}
	
	return rv;
}