summaryrefslogtreecommitdiff
path: root/src/basic/extract-word.c
Commit message (Collapse)AuthorAge
* tree-wide: make ++/-- usage consistent WRT spacingVito Caputo2017-06-16
| | | | | | Throughout the tree there's spurious use of spaces separating ++ and -- operators from their respective operands. Make ++ and -- operator consistent with the majority of existing uses; discard the spaces.
* Prep v229: Add missing fixes from upstream [1/6] src/basicSven Eden2017-05-17
|
* basic/escape: merge utf8 and non-utf8 paths in cunescape_oneZbigniew Jędrzejewski-Szmek2017-05-17
| | | | | | | | | | | | | | | | | | | Not every byte sequence is valid utf8. We allow escaping of non-utf8 sequences in strings by using octal and hexadecimal escape sequences (\123 and \0xAB) for bytes at or above 128. Users of cunescape_one could infer whether such use occured when they received an answer between 128 and 256 in *ret (a non-ascii one byte character). But this is subtle and misleading: the comments were wrong, because ascii is a subset of unicode, so c != 0 did not mean non-unicode, but rather ascii-subset-of-unicode-or-raw-byte. This was all rather confusing, so make the "single byte" condition explicit. I'm not convinced that allowing non-utf8 sequences to be produced is useful in all cases where we allow it (e.g. in config files), but that behaviour is unchanged, just made more explicit. This also fixes an (invalid) gcc warning about unitialized variable (*ret_unicode) in callers of cunescape_one.
* Prep v228: Condense elogind source masks (1/5)Sven Eden2017-04-26
| | | | | | | | | | | | Although having a two line mask like /// UNNEEDED by elogind #if 0 it is much more easier to read (and patch!) if those two lines were condense into a one-line mask start like #if 0 /// UNNEEDED by elogind
* Prep v228: Add remaining updates from upstream (1/3)Sven Eden2017-04-26
The util.[hc] files have been stripped of a lot of functions, that got sorted into various new files representing the type of utility. This commit adds the missing files.