Commit Graph

3 Commits

Author SHA1 Message Date
Richard Ipsum 2f0b15201d paste: Support -d '\0'
POSIX specifies that -d '\0' sets the delimiter to an empty string.
2020-04-15 16:11:12 -07:00
Michael Forney 28063c02f4 libutf: Change return type of utftorunestr to size_t
It returns the size of the rune array, so size_t is the right type
to use here.
2020-04-07 01:25:22 -07:00
FRIGN 73577f10a0 Scrap chartorunearr(), introducing utftorunestr()
Interface and function as proposed by cls.

The reasoning behind this function is that cls expressed his
interest to keep memory allocation out of libutf, which is a
very good motive.
This simplifies the function a lot and should also increase the
speed a bit, but the most important factor here is that there's
no malloc anywhere in libutf, making it a lot smaller and more
robust with a smaller attack-surface.

Look at the paste(1) and tr(1) changes for an idiomatic way to
allocate the right amount of space for the Rune-array.
2015-02-11 21:32:09 +01:00