forked from KolibriOS/kolibrios
Temporarily removing menuetlibc
git-svn-id: svn://kolibrios.org@4799 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
THIS_SRCS = _chmod.c _close.c _creat.c crlf2nl.c dosio.c doslock.c \
|
||||
dosunloc.c fmode.c lock.c _open.c putpath.c _read.c setmode.c \
|
||||
tell.c unlock.c _write.c
|
||||
|
||||
include $(MENUET_LIBC_TOPDIR)/Make.rules
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <io.h>
|
||||
#include <errno.h>
|
||||
#include <libc/dosio.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int _chmod(const char *filename, int func, ...)
|
||||
{
|
||||
int i;
|
||||
i=open(filename,O_RDONLY);
|
||||
if(i<0) return -1;
|
||||
close(i);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <sys/fsext.h>
|
||||
|
||||
#include <libc/dosio.h>
|
||||
|
||||
#include <menuet/os.h>
|
||||
|
||||
int _close(int handle)
|
||||
{
|
||||
__FSEXT_Function *func = __FSEXT_get_function(handle);
|
||||
if (func)
|
||||
{
|
||||
int rv;
|
||||
if (func(__FSEXT_close, &rv, &handle))
|
||||
{
|
||||
__FSEXT_set_function(handle, 0);
|
||||
return rv;
|
||||
}
|
||||
__FSEXT_set_function(handle, 0);
|
||||
}
|
||||
return dosemu_close(handle);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <libc/dosio.h>
|
||||
#include <sys/fsext.h>
|
||||
|
||||
int _creat(const char* filename, int attrib)
|
||||
{
|
||||
return _open(filename,attrib|O_CREAT);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <libc/dosio.h>
|
||||
#include <sys/fsext.h>
|
||||
#define FSLAYER
|
||||
#include <menuet/os.h>
|
||||
|
||||
int _open(const char* filename, int oflag)
|
||||
{
|
||||
int rv;
|
||||
if (__FSEXT_call_open_handlers(__FSEXT_open, &rv, &filename))
|
||||
return rv;
|
||||
return dosemu_open(filename,oflag);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <sys/fsext.h>
|
||||
|
||||
#include <libc/dosio.h>
|
||||
#define FSLAYER
|
||||
#include <menuet/os.h>
|
||||
|
||||
int _read(int handle, void* buffer, size_t count)
|
||||
{
|
||||
__FSEXT_Function *func = __FSEXT_get_function(handle);
|
||||
if (func)
|
||||
{
|
||||
int rv;
|
||||
if (func(__FSEXT_read, &rv, &handle)) return rv;
|
||||
}
|
||||
return dosemu_read(handle,buffer,count);
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <sys/fsext.h>
|
||||
|
||||
#include <libc/dosio.h>
|
||||
#define FSLAYER
|
||||
#include <menuet/os.h>
|
||||
|
||||
int _write(int handle, const void* buffer, size_t count)
|
||||
{
|
||||
__FSEXT_Function *func = __FSEXT_get_function(handle);
|
||||
if (func)
|
||||
{
|
||||
int rv;
|
||||
if (func(__FSEXT_write, &rv, &handle)) return rv;
|
||||
}
|
||||
return dosemu_write(handle,buffer,count);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <io.h>
|
||||
|
||||
ssize_t
|
||||
crlf2nl(char *buf, ssize_t len)
|
||||
{
|
||||
char *bp = buf;
|
||||
int i=0;
|
||||
while (len--)
|
||||
{
|
||||
if (*bp != 13)
|
||||
{
|
||||
*buf++ = *bp;
|
||||
i++;
|
||||
}
|
||||
bp++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <libc/dosio.h>
|
||||
#include <libc/bss.h>
|
||||
|
||||
static char init_file_handle_modes[20] = {
|
||||
O_TEXT,
|
||||
O_TEXT,
|
||||
O_TEXT,
|
||||
O_BINARY,
|
||||
O_BINARY
|
||||
};
|
||||
|
||||
static int dosio_bss_count = -1;
|
||||
static size_t count=20; /* DOS default limit */
|
||||
|
||||
char *__file_handle_modes = init_file_handle_modes;
|
||||
|
||||
void
|
||||
__file_handle_set(int fd, int mode)
|
||||
{
|
||||
/* Fill in the value */
|
||||
__file_handle_modes[fd] = mode;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <io.h>
|
||||
#include <assert.h>
|
||||
|
||||
int _dos_lock(int _fd, long _offset, long _length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <io.h>
|
||||
#include <assert.h>
|
||||
|
||||
int _dos_unlock(int _fd, long _offset, long _length)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
|
||||
int _fmode = O_TEXT;
|
||||
@@ -1,11 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <io.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
int
|
||||
lock(int fd, long offset, long length)
|
||||
{
|
||||
unimpl();
|
||||
return 0;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/dosio.h>
|
||||
#include <libc/farptrgs.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
void
|
||||
_put_path(const char *path)
|
||||
{
|
||||
_put_path2(path, 0);
|
||||
}
|
||||
|
||||
void
|
||||
_put_path2(const char *path, int offset)
|
||||
{
|
||||
unimpl();
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <sys/exceptn.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
|
||||
#include <libc/dosio.h>
|
||||
#include <assert.h>
|
||||
|
||||
void (*__setmode_stdio_hook)(int fd, int mode); /* BSS to zero */
|
||||
|
||||
int setmode(int handle, int mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <libc/stubs.h>
|
||||
#include <errno.h>
|
||||
#include <io.h>
|
||||
#include <unistd.h>
|
||||
|
||||
off_t tell(int _file)
|
||||
{
|
||||
return dosemu_tell(_file);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <io.h>
|
||||
#include <errno.h>
|
||||
#include <assert.h>
|
||||
|
||||
int
|
||||
unlock(int fd, long offset, long length)
|
||||
{
|
||||
unimpl();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user