mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:55:41 +00:00
Sync with trunk head
svn path=/branches/header-work/; revision=46021
This commit is contained in:
commit
a00acb2a1b
1006 changed files with 161728 additions and 16722 deletions
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
|
||||
<module name="libcntpr" type="staticlibrary">
|
||||
<include base="crt">.</include>
|
||||
<include base="crt">include</include>
|
||||
<include base="libcntpr">.</include>
|
||||
<include base="libcntpr">include</include>
|
||||
<define name="NO_RTL_INLINES" />
|
||||
<define name="_NTSYSTEM_" />
|
||||
<define name="_NTDLLBUILD_" />
|
||||
|
|
|
@ -44,6 +44,7 @@ static struct cp_extra_info_t g_cpextrainfo[] =
|
|||
{936, {0x40, 0xfe, 0, 0}},
|
||||
{949, {0x41, 0xfe, 0, 0}},
|
||||
{950, {0x40, 0x7e, 0xa1, 0xfe, 0, 0}},
|
||||
{1361, {0x31, 0x7e, 0x81, 0xfe, 0, 0}},
|
||||
{20932, {1, 255, 0, 0}}, /* seems to give different results on different systems */
|
||||
{0, {1, 255, 0, 0}} /* match all with FIXME */
|
||||
};
|
||||
|
|
|
@ -76,6 +76,7 @@ int *__p___mb_cur_max(void);
|
|||
#define WX_OPEN 0x01
|
||||
#define WX_ATEOF 0x02
|
||||
#define WX_READEOF 0x04 /* like ATEOF, but for underlying file rather than buffer */
|
||||
#define WX_READCR 0x08 /* underlying file is at \r */
|
||||
#define WX_DONTINHERIT 0x10
|
||||
#define WX_APPEND 0x20
|
||||
#define WX_TEXT 0x80
|
||||
|
@ -913,6 +914,9 @@ int CDECL fseek(FILE* file, long offset, int whence)
|
|||
if (file->_ptr[i] == '\n')
|
||||
offset--;
|
||||
}
|
||||
/* Black magic when reading CR at buffer boundary*/
|
||||
if(fdesc[file->_file].wxflag & WX_READCR)
|
||||
offset--;
|
||||
}
|
||||
}
|
||||
/* Discard buffered input */
|
||||
|
@ -1573,6 +1577,9 @@ static int read_i(int fd, void *buf, unsigned int count)
|
|||
char *bufstart = buf;
|
||||
HANDLE hand = fdtoh(fd);
|
||||
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
||||
if (fdesc[fd].wxflag & WX_READEOF) {
|
||||
fdesc[fd].wxflag |= WX_ATEOF;
|
||||
TRACE("already at EOF, returning 0\n");
|
||||
|
@ -1589,9 +1596,29 @@ static int read_i(int fd, void *buf, unsigned int count)
|
|||
*/
|
||||
if (ReadFile(hand, bufstart, count, &num_read, NULL))
|
||||
{
|
||||
if (fdesc[fd].wxflag & WX_TEXT)
|
||||
if (count != 0 && num_read == 0)
|
||||
{
|
||||
fdesc[fd].wxflag |= (WX_ATEOF|WX_READEOF);
|
||||
TRACE(":EOF %s\n",debugstr_an(buf,num_read));
|
||||
}
|
||||
else if (fdesc[fd].wxflag & WX_TEXT)
|
||||
{
|
||||
DWORD i, j;
|
||||
if (bufstart[num_read-1] == '\r')
|
||||
{
|
||||
if(count == 1)
|
||||
{
|
||||
fdesc[fd].wxflag &= ~WX_READCR;
|
||||
ReadFile(hand, bufstart, 1, &num_read, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
fdesc[fd].wxflag |= WX_READCR;
|
||||
num_read--;
|
||||
}
|
||||
}
|
||||
else
|
||||
fdesc[fd].wxflag &= ~WX_READCR;
|
||||
for (i=0, j=0; i<num_read; i++)
|
||||
{
|
||||
/* in text mode, a ctrl-z signals EOF */
|
||||
|
@ -1605,17 +1632,12 @@ static int read_i(int fd, void *buf, unsigned int count)
|
|||
* BUG: should save state across calls somehow, so CR LF that
|
||||
* straddles buffer boundary gets recognized properly?
|
||||
*/
|
||||
if ((bufstart[i] != '\r')
|
||||
|| ((i+1) < num_read && bufstart[i+1] != '\n'))
|
||||
bufstart[j++] = bufstart[i];
|
||||
if ((bufstart[i] != '\r')
|
||||
|| ((i+1) < num_read && bufstart[i+1] != '\n'))
|
||||
bufstart[j++] = bufstart[i];
|
||||
}
|
||||
num_read = j;
|
||||
}
|
||||
if (count != 0 && num_read == 0)
|
||||
{
|
||||
fdesc[fd].wxflag |= (WX_ATEOF|WX_READEOF);
|
||||
TRACE(":EOF %s\n",debugstr_an(buf,num_read));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -155,6 +155,7 @@ DEFINE_GUID(CLSID_InProcFreeMarshaler, 0x0000033a,0x0000,0x0000,0xc0,0x00,0x0
|
|||
DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529a9e6b,0x6587,0x4f23,0xab,0x9e,0x9c,0x7d,0x68,0x3e,0x3c,0x50);
|
||||
DEFINE_GUID(CLSID_TF_InputProcessorProfiles, 0x33c53a50,0xf456,0x4884,0xb0,0x49,0x85,0xfd,0x64,0x3e,0xcf,0xed);
|
||||
DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7);
|
||||
DEFINE_GUID(CLSID_TF_LangBarMgr, 0xebb08c45,0x6c4a,0x4fdc,0xae,0x53,0x4e,0xb8,0xc4,0xc7,0xdb,0x8e);
|
||||
DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90);
|
||||
DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31);
|
||||
DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue