Re: [Flex-devel] unicode unsigned short
flex is a tool for generating scanners
Brought to you by:
wlestes
From: Peter M. <pet...@gm...> - 2012-07-06 15:36:14
|
Uint16t? On Jul 6, 2012 11:29 AM, "Paul" <pa...@pr...> wrote: > The unicode16 version of flex uses unsigned short. > Without opening a large can of worms re types, to pass the tests > utest-posix > and utest-posixly-correct (nothing to do with posix compatibility) with > the -U flag on, I have altered the line: > > char * tests[NUM_TESTS] = { "ababab"}; /* non unicode */ > to (simplified): > unsigned short testu[7]={'a','b','a','b','a','b',0}; /* altered for > unicode pn */ > > The test then passes with testu OK. > > This makes initializing a pain since: > a. wchar_t is 4 bytes wide in gcc > b. L"ababab" is also 4 bytes wide. > whereas unsigned short & unicode 16 is 2 bytes wide. > I will note that char16_t is not defined in C, only C++. > > Thoughts please. > > Paul > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Flex-devel mailing list > Fle...@li... > https://lists.sourceforge.net/lists/listinfo/flex-devel > |