implemented suggested changes based off of feedback

This commit is contained in:
Aaron 2015-08-14 12:26:15 -07:00
parent d627dac5e8
commit d2f7ba1cb4
3 changed files with 4 additions and 16 deletions

View file

@ -55,7 +55,7 @@ BOOL GetCPInfoW(UINT codepage, CPINFO* cpinfo)
return 0;
}
//if codepage is utf8
// if codepage is utf8
if(codepage == 65001)
{
cpinfo->DefaultChar[0] = '?';

View file

@ -598,26 +598,14 @@ typedef unsigned char PAL_Boolean;
# define PAL_COUNT(ARR) (sizeof(ARR) / sizeof(ARR[0]))
#endif
/*
**==============================================================================
**
** NameSpace
**
**==============================================================================
*/
//!* NameSpace
namespace const_cpinfo{
constexpr int MAX_DEFAULTCHAR = 2;
constexpr int MAX_LEADBYTES = 12;
}
/*
**==============================================================================
**
** Structs
**
**==============================================================================
*/
//!* Structs
typedef struct _cpinfo {
UINT MaxCharSize;

View file

@ -30,7 +30,7 @@ TEST(GetCPInfo, CodePageNotUTF8)
CPINFO* cpinfo;
BOOL result = GetCPInfoW(65000, cpinfo);
ASSERT_TRUE(result == FALSE);
ASSERT_EQ(result, FALSE);
EXPECT_EQ(errno, ERROR_INVALID_PARAMETER);
}