mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 17:05:44 +00:00
[CRT]
* Update alloc_buffer(). CORE-8080 svn path=/trunk/; revision=63291
This commit is contained in:
parent
41b9a3a556
commit
e5361e27bd
1 changed files with 18 additions and 13 deletions
|
@ -533,8 +533,12 @@ int CDECL _isatty(int fd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INTERNAL: Allocate stdio file buffer */
|
/* INTERNAL: Allocate stdio file buffer */
|
||||||
/*static*/ void alloc_buffer(FILE* file)
|
/*static*/ BOOL alloc_buffer(FILE* file)
|
||||||
{
|
{
|
||||||
|
if((file->_file==STDOUT_FILENO || file->_file==STDERR_FILENO)
|
||||||
|
&& _isatty(file->_file))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
file->_base = calloc(BUFSIZ,1);
|
file->_base = calloc(BUFSIZ,1);
|
||||||
if(file->_base) {
|
if(file->_base) {
|
||||||
file->_bufsiz = BUFSIZ;
|
file->_bufsiz = BUFSIZ;
|
||||||
|
@ -546,6 +550,7 @@ int CDECL _isatty(int fd)
|
||||||
}
|
}
|
||||||
file->_ptr = file->_base;
|
file->_ptr = file->_base;
|
||||||
file->_cnt = 0;
|
file->_cnt = 0;
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* INTERNAL: Convert integer to base32 string (0-9a-v), 0 becomes "" */
|
/* INTERNAL: Convert integer to base32 string (0-9a-v), 0 becomes "" */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue