git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
update for HEAD-2003091401
[reactos.git]
/
lib
/
msvcrt
/
io
/
chsize.c
1
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
2
#include <msvcrt/io.h>
3
4
#define NDEBUG
5
#include <msvcrt/msvcrtdbg.h>
6
7
/*
8
* @implemented
9
*/
10
int _chsize(int _fd, long size)
11
{
12
DPRINT("_chsize(fd %d, size %d)\n", _fd, size);
13
if (lseek(_fd, size, 0) == -1)
14
return -1;
15
if (_write(_fd, 0, 0) < 0)
16
return -1;
17
return 0;
18
}