summaryrefslogtreecommitdiff
path: root/src/scanner-utils.h
Commit message (Collapse)AuthorAgeFilesLines
* scanner-utils: avoid possible implicit truncating of line/columnRan Benita2019-12-271-3/+3
| | | | | | | | | | | This increases the size of the struct a bit but it's not very important. Fixes these MSVC warnings: src\scanner-utils.h(112): warning C4267: '+=': conversion from 'size_t' to 'unsigned int', possible loss of data src\scanner-utils.h(147): warning C4267: '+=': conversion from 'size_t' to 'unsigned int', possible loss of data Signed-off-by: Ran Benita <ran@unusedvar.com>
* Replace some strncmp's with memcmpRan Benita2014-10-181-2/+2
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* compose/parser: fix segfault when includingRan Benita2014-10-131-1/+3
| | | | | | | | The keysym cache for the new scanner was not initialized. To avoid such errors also in the future, require passing the priv argument in scanner_init(), instead of initializing it separately. Signed-off-by: Ran Benita <ran234@gmail.com>
* scanner-utils: optimize one-line commentsRan Benita2014-10-081-0/+9
| | | | | | Compose files have a lot of those. Signed-off-by: Ran Benita <ran234@gmail.com>
* scanner-utils: add priv memberRan Benita2014-10-031-0/+1
| | | | | | For when a user of the scanner wants to pass something along with it. Signed-off-by: Ran Benita <ran234@gmail.com>
* scanner-utils: add helper for appending an entire stringRan Benita2014-10-021-0/+11
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* scanner-utils: add helper for hex string escapeRan Benita2014-10-021-0/+13
| | | | | | Like the already existing oct. Signed-off-by: Ran Benita <ran234@gmail.com>
* scanner-utils: optimize str()/lit()Ran Benita2014-10-011-1/+1
| | | | | | | | | | | | Replace the dog-slow unneeded strncasecmp() with an inlineable memcmp(). Before: compiled 2500 keymaps in 8.348715629s After: compiled 2500 keymaps in 7.872640338s Signed-off-by: Ran Benita <ran234@gmail.com>
* Move src/xkbcomp/scanner-utils.h to src/Ran Benita2014-02-101-0/+159
As we'll use it for things unrelated to xkbcomp. Signed-off-by: Ran Benita <ran234@gmail.com>