Mercurial > vim
view runtime/compiler/splint.vim @ 34336:d2ad8733db75 v9.1.0101
patch 9.1.0101: upper-case of German sharp s should be U+1E9E
Commit: https://github.com/vim/vim/commit/bd1232a1faf56b614a1e74c4ce51bc6e0650ae00
Author: glepnir <glephunter@gmail.com>
Date: Mon Feb 12 22:14:53 2024 +0100
patch 9.1.0101: upper-case of German sharp s should be U+1E9E
Problem: upper-case of ? should be U+1E9E (CAPITAL LETTER SHARP S)
(fenuks)
Solution: Make gU, ~ and g~ convert the U+00DF LATIN SMALL LETTER SHARP S (?)
to U+1E9E LATIN CAPITAL LETTER SHARP S (?), update tests
(glepnir)
This is part of Unicode 5.1.0 from April 2008, so should be fairly safe
to use now and since 2017 is part of the German standard orthography,
according to Wikipedia:
https://en.wikipedia.org/wiki/Capital_%E1%BA%9E#cite_note-auto-12
There is however one exception: UnicodeData.txt for U+00DF
LATIN SMALL LETTER SHARP S does NOT define U+1E9E LATIN CAPITAL LETTER
SHARP S as its upper case version. Therefore, toupper() won't be able
to convert from lower sharp s to upper case sharp s (the other way
around however works, since U+00DF is considered the lower case
character of U+1E9E and therefore tolower() works correctly for the
upper case version).
fixes: #5573
closes: #14018
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 12 Feb 2024 22:45:02 +0100 |
parents | 2704c4e3e20a |
children | e1df51f68736 |
line wrap: on
line source
" Vim compiler file " Compiler: splint/lclint (C source code checker) " Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> " Splint Home: http://www.splint.org/ " Last Change: 2019 Jul 23 " $Revision: 1.3 $ if exists("current_compiler") finish endif let current_compiler = "splint" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo-=C " adapt this if you want to check more than one file at a time. " put command line options in .splintrc or ~/.splintrc CompilerSet makeprg=splint\ %:S " Note: when using the new array bounds checking flags: Each warning " usually has several lines and several references to source code mostly " within one or two lines (see sample warning below). The easiest way " not to mess up file name detection and not to jump to all positions is " to add something like " -linelen 500 +boundscompacterrormessages " to your .splintrc and 'set cmdheight=4' or more. " TODO: reliable way to distinguish file names and constraints. " " sample warning (generic): " "foo.c:1006:12: Clauses exit with var referencing local storage in one " case, fresh storage in other case " foo.c:1003:2: Fresh storage var allocated " " sample warning (bounds checking): " "bounds.c: (in function updateEnv) "bounds.c:10:5: Possible out-of-bounds store: " strcpy(str, tmp) " Unable to resolve constraint: " requires maxSet(str @ bounds.c:10:13) >= maxRead(getenv("MYENV") @ " bounds.c:6:9) " needed to satisfy precondition: " requires maxSet(str @ bounds.c:10:13) >= maxRead(tmp @ bounds.c:10:18) " derived from strcpy precondition: requires maxSet(<parameter 1>) >= " maxRead(<parameter 2>) " A memory write may write to an address beyond the allocated buffer. (Use " -boundswrite to inhibit warning) CompilerSet errorformat=%OLCLint*m, \%OSplint*m, \%f(%l\\,%c):\ %m, \%*[\ ]%f:%l:%c:\ %m, \%*[\ ]%f:%l:\ %m, \%*[^\"]\"%f\"%*\\D%l:\ %m, \\"%f\"%*\\D%l:\ %m, \%A%f:%l:%c:\ %m, \%A%f:%l:%m, \\"%f\"\\, \\ line\ %l%*\\D%c%*[^\ ]\ %m, \%D%*\\a[%*\\d]:\ Entering\ directory\ `%f', \%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f', \%DMaking\ %*\\a\ in\ %f, \%C\ %#%m let &cpo = s:cpo_save unlet s:cpo_save