aboutsummaryrefslogtreecommitdiff
path: root/lutf8lib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DetailsRoberto Ierusalimschy2024-09-061-16/+16
| | | | Identation + comments
* '-Wconversion' extended to all options of Lua numbersRoberto Ierusalimschy2024-07-271-3/+3
|
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-2/+2
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* llimits.h being used by all Lua codeRoberto Ierusalimschy2024-06-201-16/+8
| | | | | | The definitions in llimits.h are useful not only for the core. That header only defines types and '#define's, so libs and core still do not share any real code/data.
* utf8.offset returns also final position of characterRoberto Ierusalimschy2024-05-271-6/+14
| | | | | 'utf8.offset' returns two values: the initial and the final position of the given character.
* Bug: 'utf8.codes' accepts spurious continuation bytesRoberto Ierusalimschy2022-09-231-11/+16
|
* Avoid overflows when incrementing parameters in CRoberto Ierusalimschy2021-09-221-7/+4
| | | | | | Any C function can receive maxinteger as an integer argument, and therefore cannot increment it without some care (e.g., doing unsigned arithmetic as the core does).
* Details (more uniformity in error messages)Roberto Ierusalimschy2020-05-271-5/+5
|
* Added 'simplesect' sections to the manualRoberto Ierusalimschy2020-04-131-1/+1
| | | | | | | 'simplesect' encloses the introductory text of sections with subsections, so that each section either is all text or is all subsections. (This commit also corrects a small brace error in the manual and extra spaces/tabs in some other files.)
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-161-2/+2
| | | | | | | | The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'.
* A few changes in tests about number of bits in integersRoberto Ierusalimschy2019-05-131-1/+1
| | | | | | - The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts.
* Some improvements in 'luaconf.h'Roberto Ierusalimschy2019-05-131-1/+1
| | | | | Added '#if !defined' in some definitions to allow external definitions; more comments; other small changes.
* Name 'nonstrict' in the UTF-8 library changed to 'lax'Roberto Ierusalimschy2019-03-191-9/+9
| | | | | It is not a good idea to use negative words to describe boolean values. (When we negate that boolean we create a double negative...)
* Changes in the validation of UTF-8Roberto Ierusalimschy2019-03-151-27/+49
| | | | | | | | | | | All UTF-8 encoding functionality (including the escape sequence '\u') accepts all values from the original UTF-8 specification (with sequences of up to six bytes). By default, the decoding functions in the UTF-8 library do not accept invalid Unicode code points, such as surrogates. A new parameter 'nonstrict' makes them accept all code points up to (2^31)-1, as in the original UTF-8 specification.
* Avoid using 'int' for UTF-8 valuesRoberto Ierusalimschy2018-07-121-11/+22
| | | | | | An 'int' may have only 16 bits, so it may not be big enough for UTF-8 values. The new type 'utfint' (in the utf8 library) ensures at least 21 bits for those values.
* added 'return' to calls to 'luaL_error' (to signal to the compilerRoberto Ierusalimschy2017-03-141-2/+2
| | | | that the function cannot continue past that call)
* detail (removing spaces at end of lines)Roberto Ierusalimschy2016-12-221-2/+2
|
* details (avoid some 'lint' warnings)Roberto Ierusalimschy2015-03-281-5/+6
|
* avoid using 'lua_pushliteral' in a non-zero-terminated stringRoberto Ierusalimschy2015-03-051-2/+2
|
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+6
| | | | any other header file
* 'charpatt' -> 'charpattern'Roberto Ierusalimschy2014-10-151-3/+3
|
* better to use 'long' to represent UTF-8 code pointsRoberto Ierusalimschy2014-10-011-4/+4
|
* detail (added placeholders for non-function fields to preallocateRoberto Ierusalimschy2014-07-161-1/+3
| | | | space for them)
* missing macro 'LUAMOD_API' in function to open libraryRoberto Ierusalimschy2014-05-141-2/+2
|
* details in commentsRoberto Ierusalimschy2014-04-111-5/+6
|
* several changes in 'utf8.offset'Roberto Ierusalimschy2014-04-031-22/+27
|
* new implementation for 'utf8.len'Roberto Ierusalimschy2014-04-021-13/+18
|
* some details to avoid warningsRoberto Ierusalimschy2014-04-011-2/+2
|
* detail (to avoid warnings with '-O3')Roberto Ierusalimschy2014-03-201-3/+3
|
* 'posrelat' -> 'u_posrelat' (to avoid name conflict in 'one.c')Roberto Ierusalimschy2014-03-201-6/+6
|
* added proper headers for a standard lib fileRoberto Ierusalimschy2014-02-061-4/+11
|
* new library: utf8Roberto Ierusalimschy2014-02-061-0/+233