summaryrefslogtreecommitdiffstats
path: root/src/findfile.c
AgeCommit message (Collapse)Author
2024-01-04patch 9.1.0006: is*() and to*() function may be unsafev9.1.0006Keith Thompson
Problem: is*() and to*() function may be unsafe Solution: Add SAFE_* macros and start using those instead (Keith Thompson) Use SAFE_() macros for is*() and to*() functions The standard is*() and to*() functions declared in <ctype.h> have undefined behavior for negative arguments other than EOF. If plain char is signed, passing an unchecked value from argv for from user input to one of these functions has undefined behavior. Solution: Add SAFE_*() macros that cast the argument to unsigned char. Most implementations behave sanely for negative arguments, and most character values in practice are non-negative, but it's still best to avoid undefined behavior. The change from #13347 has been omitted, as this has already been separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a (v9.0.2054) fixes: #13332 closes: #13347 Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-09patch 9.0.1886: Various Typosv9.0.1886Christian Brabandt
Problem: Various Typos Solution: Fix Typos This is a collection of typo related commits. closes: #12753 closes: #13016 Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: nuid64 <lvkuzvesov@proton.me> Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com> Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-03-11patch 9.0.1400: find_file_in_path() is not reentrantv9.0.1400Bram Moolenaar
Problem: find_file_in_path() is not reentrant. Solution: Instead of global variables pass pointers to the functions. (closes #12093)
2023-02-01patch 9.0.1271: using sizeof() and subtract array size is trickyv9.0.1271zeertzjq
Problem: Using sizeof() and subtract array size is tricky. Solution: Use offsetof() instead. (closes #11926)
2023-01-22patch 9.0.1231: completion of :runtime does not handle {where} argumentv9.0.1231zeertzjq
Problem: Completion of :runtime does not handle {where} argument. Solution: Parse the {where} argument. (closes #11863)
2023-01-09patch 9.0.1166: code is indented more than necessaryv9.0.1166Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11792)
2023-01-08patch 9.0.1158: code is indented more than necessaryv9.0.1158Yegappan Lakshmanan
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11787)
2022-10-01patch 9.0.0634: evaluating "expr" options has more overhead than neededv9.0.0634Bram Moolenaar
Problem: Evaluating "expr" options has more overhead than needed. Solution: Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr', "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr', 'formatexpr', 'indentexpr' and 'charconvert'.
2022-09-18patch 9.0.0498: various small issuesv9.0.0498Bram Moolenaar
Problem: Various small issues. Solution: Various small fixes.
2022-08-25patch 9.0.0270: some values of 'path' and 'tags' invalid in the tiny versionv9.0.0270Bram Moolenaar
Problem: Some values of 'path' and 'tags' do not work in the tiny version. Solution: Graduate the +path_extra feature.
2022-08-25patch 9.0.0265: no good reason why the "gf" command isn't in the tiny versionv9.0.0265Bram Moolenaar
Problem: No good reason why the "gf" command is not in the tiny version. Solution: Graduate the file_in_path feature.
2022-08-01patch 9.0.0126: expanding file names fails in dir with more than 255 entriesv9.0.0126John Drouhard
Problem: Expanding file names fails in directory with more than 255 entries. Solution: Use an int instead of char_u to count. (John Drouhard, closes #10818)
2022-01-31patch 8.2.4273: the EBCDIC support is outdatedv8.2.4273Bram Moolenaar
Problem: The EBCDIC support is outdated. Solution: Remove the EBCDIC support.
2022-01-22patch 8.2.4184: cannot use an import in 'includeexpr'v8.2.4184Bram Moolenaar
Problem: Cannot use an import in 'includeexpr'. Solution: Set the script context when evaluating 'includeexpr'
2022-01-22patch 8.2.4179: 'foldtext' is evaluated in the current script contextv8.2.4179Bram Moolenaar
Problem: 'foldtext' is evaluated in the current script context. Solution: Use the script context where the option was set.
2022-01-08patch 8.2.4043: using int for second argument of ga_init2()v8.2.4043Bram Moolenaar
Problem: Using int for second argument of ga_init2(). Solution: Remove unnessary type cast (int) when using sizeof().
2022-01-05patch 8.2.4010: error messages are spread outv8.2.4010Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2022-01-02patch 8.2.3985: error messages are spread outv8.2.3985Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2022-01-02patch 8.2.3983: error messages are spread outv8.2.3983Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
2021-12-27patch 8.2.3914: various spelling mistakes in commentsv8.2.3914Dominique Pelle
Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes #9416)
2021-12-16patch 8.2.3824: no ASAN support for MSVCv8.2.3824Yegappan Lakshmanan
Problem: No ASAN support for MSVC. Solution: Add ASAN support and fix a coupld of uncovered problems. (Yegappan Lakshmanan, closes #9357)
2021-11-17patch 8.2.3613: :find test failsv8.2.3613Bram Moolenaar
Problem: :find test fails. Solution: Put length check inside if block.
2021-11-17patch 8.2.3611: crash when using CTRL-W f without finding a file namev8.2.3611Bram Moolenaar
Problem: Crash when using CTRL-W f without finding a file name. Solution: Bail out when the file name length is zero.
2021-07-27patch 8.2.3229: Vim9: runtime and compile time type checks are not the samev8.2.3229Yegappan Lakshmanan
Problem: Vim9: runtime and compile time type checks are not the same. Solution: Add more runtime type checks for builtin functions. (Yegappan Lakshmanan, closes #8646)
2021-07-25patch 8.2.3219: :find searches non-existing directoriesv8.2.3219Christian Brabandt
Problem: :find searches non-existing directories. Solution: Check the path is not "..". Update help. (Christian Brabandt, closes #8612, closes #8533)
2021-06-06patch 8.2.2949: tests failing because no error for float to string conversionv8.2.2949Bram Moolenaar
Problem: Tests failing because there is no error for float to string conversion. Solution: Change the check for failure to check for correct result. Make some conversions strict in Vim9 script.
2020-09-14patch 8.2.1684: "gF" does not use line number after file in Visual modev8.2.1684Bram Moolenaar
Problem: "gF" does not use line number after file in Visual mode. Solution: Look for ":123" after the Visual area. (closes #6952)
2020-06-24patch 8.2.1049: Vim9: leaking memory when using continuation linev8.2.1049Bram Moolenaar
Problem: Vim9: leaking memory when using continuation line. Solution: Keep a pointer to the continuation line in evalarg_T. Centralize checking for a next command.
2020-06-15patch 8.2.0985: simplify() does not remove slashes from "///path"v8.2.0985Bram Moolenaar
Problem: Simplify() does not remove slashes from "///path". Solution: Reduce > 2 slashes to one. (closes #6263)
2020-06-12patch 8.2.0967: unnecessary type casts for vim_strnsave()v8.2.0967Bram Moolenaar
Problem: Unnecessary type casts for vim_strnsave(). Solution: Remove the type casts.
2020-04-12patch 8.2.0559: clearing a struct is verbosev8.2.0559Bram Moolenaar
Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
2019-12-22patch 8.2.0030: "gF" does not work on output of "verbose command"v8.2.0030Bram Moolenaar
Problem: "gF" does not work on output of "verbose command". Solution: Recognize " line " and translations. (closes #5391)
2019-12-01patch 8.1.2379: using old C style commentsv8.1.2379Bram Moolenaar
Problem: Using old C style comments. Solution: Use // comments where appropriate.
2019-10-06patch 8.1.2120: some MB_ macros are more complicated than necessaryv8.1.2120Bram Moolenaar
Problem: Some MB_ macros are more complicated than necessary. (Dominique Pelle) Solution: Simplify the macros. Expand inline.
2019-09-04patch 8.1.1979: code for handling file names is spread outv8.1.1979Bram Moolenaar
Problem: Code for handling file names is spread out. Solution: Move code to new filepath.c file. Graduate FEAT_MODIFY_FNAME.
2019-08-20patch 8.1.1891: functions used in one file are globalv8.1.1891Bram Moolenaar
Problem: Functions used in one file are global. Solution: Add "static". (Yegappan Lakshmanan, closes #4840)
2019-05-28patch 8.1.1414: alloc() returning "char_u *" causes a lot of type castsv8.1.1414Bram Moolenaar
Problem: Alloc() returning "char_u *" causes a lot of type casts. Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to check the simple allocations.
2019-05-25patch 8.1.1393: unnecessary type castsv8.1.1393Bram Moolenaar
Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
2019-05-24patch 8.1.1384: using "int" for alloc() often results in compiler warningsv8.1.1384Bram Moolenaar
Problem: Using "int" for alloc() often results in compiler warnings. Solution: Use "size_t" and remove type casts. Remove alloc_check(), Vim only works with 32 bit ints anyway.
2019-03-31patch 8.1.1099: the do_tag() function is too longv8.1.1099Bram Moolenaar
Problem: The do_tag() function is too long. Solution: Factor parts out to separate functions. Move simplify_filename() to a file where it fits better. (Andy Massimino, closes #4195)
2019-03-09patch 8.1.1002: "gf" does not always work when URL has a port numberv8.1.1002Bram Moolenaar
Problem: "gf" does not always work when URL has a port number. (Jakob Schöttl) Solution: When a URL is recognized also accept ":". (closes #4082)
2019-02-13patch 8.1.0914: code related to findfile() is spread outv8.1.0914Bram Moolenaar
Problem: Code related to findfile() is spread out. Solution: Put findfile() related code into a new source file. (Yegappan Lakshmanan, closes #3934)