aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.cpp
Commit message (Collapse)AuthorAge
* Correctly handle mixing named arguments with function nameGravatar ridiculousfish2015-05-17
| | | | | | Before this fix, `function -a arg1 name1` would produce a function named 'arg1'. After this fix, it will produce a function named 'name'. See #2068 for more.
* Fix and add tests for format_long_safe with negative numbersGravatar ridiculousfish2015-01-18
|
* Solaris build fixes: use memset instead of bzeroGravatar David Adam2014-12-21
|
* use configure to define NOMACROSGravatar David Adam2014-12-21
| | | | (added in 9ec808a4c)
* Solaris build fixes: pick the right curses more of the timeGravatar David Adam2014-12-21
|
* Make C_ (gettext used in completions) return wcstringGravatar ridiculousfish2014-10-30
|
* Eliminate wcsv2strvGravatar ridiculousfish2014-10-30
|
* Make escape() return a wcstringGravatar Kevin Ballard2014-09-25
| | | | This avoids the potential for leaking the resulting string.
* Remove my_wcswidth() in favor of fish_wcswidth()Gravatar Kevin Ballard2014-09-25
| | | | | | my_wcswidth() was just a wrapper around fish_wcswidth() already. Instead, add two convenience overrides of fish_wcswidth() to common.h that make it a drop-in replacement for my_wcswidth().
* Rework how screen size is trackedGravatar Kevin Ballard2014-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | The screen size is fetched after a SIGWINCH is delivered. The current implementation has two issues: * It calls ioctl() from the SIGWINCH signal handler, despite ioctl() not being a function that is known to be safe to call. * It's not thread-safe. Signals can be delivered on arbitrary threads, so we don't know if it's actually safe to be modifying the cached winsize in response to a signal. It's also plausible that the winsize may be requested from a background thread. To solve the first issue, we twiddle a volatile boolean flag in the signal handler and defer the ioctl() call until we actually request the screen size. To solve the second issue, we introduce a pthread rwlock around the cached winsize. A rwlock is used because it can be expected that there are likely to be far more window size reads than window size writes. If we were using C++11 we could probably get away with atomics, but since we don't have that (or boost), a rwlock should suffice. Fixes #1613.
* Make escape_string transform wildcard charactersGravatar ridiculousfish2014-08-16
| | | | | | The characters ANY_CHAR, ANY_STRING, and ANY_STRING_RECURSIVE are currently transformed by unescape, but not by escape. Let's try escaping them. Fixes #1614.
* Rename lock_t to mutex_lock_t to fix Solaris compilationGravatar ridiculousfish2014-07-07
| | | | Fixes #1510
* Remove connection_t usage from write_to_fdGravatar ridiculousfish2014-06-09
|
* Remove large parts of fishd interaction, includingGravatar ridiculousfish2014-06-06
| | | | env_universal_server
* Merge branch 'master' into death_of_fishdGravatar ridiculousfish2014-05-14
|\
| * Hopefully better fix for prompt under Windows. Things that may storeGravatar ridiculousfish2014-05-14
| | | | | | | | NOT_A_WCHAR must be wint_t, not wchar_t
| * Fix prompt under Windows.Gravatar Konrad Borowski2014-05-10
| | | | | | | | | | The fix is obviously a hack caused by that NOT_A_WCHAR doesn't fit in wchar_t. Better fix would be nice.
* | Initial work on strategy_named_pipe universal notifier.Gravatar ridiculousfish2014-05-04
|/
* Save a memory allocation in append_formatvGravatar ridiculousfish2014-04-30
|
* Squelch some more warnings on LinuxGravatar ridiculousfish2014-04-27
|
* Remove useless return.Gravatar Konrad Borowski2014-04-22
|
* Fix line number reporting in new parserGravatar ridiculousfish2014-03-20
|
* Make `contains` take the string by const reference again, for performance ↵Gravatar ridiculousfish2014-03-11
| | | | reasons
* Fixed various Undefined Behavior occurrences.Gravatar Daniel J. Hofmann2014-03-07
| | | | | | | | | | | | | | | | | Conditionally uninitialized: - builtin_commandline.cpp:577 - expand.cpp:869 - parse_util.cpp:1036 Initialization of POD structs: - event.cpp:61 - autoload.cpp:22 References used with va_start: - common.cpp:608:18 Found with clang-3.4's awesome -Wconditional-uninitialized, -Wmissing-field-initializers and -Wvarargs.
* Revert "Merge pull request #1317 from pullreq/cpp"Gravatar ridiculousfish2014-02-28
| | | | | | | This reverts commit 74135c0600d5dcc40d396d0e7293c17b8d4bdaa7, reversing changes made to 6d749789ce240a3e6f1447777db63fd8e7525560. See discussion in #1317
* Fixes .c -> .cpp in comments. For doxygen.Gravatar Geoff Nixon2014-02-27
|
* Dead storesGravatar Geoff Nixon2014-02-27
|
* Optimize the tokenize_variable_array hot spot to do less string copyingGravatar ridiculousfish2014-02-24
|
* Partially rework profiling. Fix profiling crash with new parser. FixesGravatar ridiculousfish2014-02-09
| | | | 1295
* Update style and formatting to conform to fish style guide.Gravatar ridiculousfish2014-01-15
|
* Additional miscellaneous fixes based on cppcheck static analysisGravatar ridiculousfish2014-01-12
|
* Miscellaneous minor fixes based on cppcheck static analyzerGravatar ridiculousfish2014-01-12
|
* Merge branch 'master' into astGravatar ridiculousfish2014-01-08
|\
| * Clean up and reduce memory allocations in string escapingGravatar ridiculousfish2014-01-08
| |
* | Merge branch 'master' into astGravatar ridiculousfish2013-12-07
|\| | | | | | | | | | | | | Conflicts: complete.cpp fish_tests.cpp highlight.cpp
| * Fix for compile error identified inGravatar ridiculousfish2013-11-26
| | | | | | | | https://github.com/fish-shell/fish-shell/issues/1142
| * Fix for annoying error message when converting out of range escapeGravatar ridiculousfish2013-11-26
| | | | | | | | https://github.com/fish-shell/fish-shell/issues/1107
| * Fix support for backslash-newline in double quotes in unescape functions. ↵Gravatar ridiculousfish2013-11-26
| | | | | | | | | | | | Makes tests pass again.
* | Merge branch 'master' into astGravatar ridiculousfish2013-11-24
|\|
| * Remove old unescape() functionGravatar ridiculousfish2013-11-24
| |
* | Merge branch 'master' into astGravatar ridiculousfish2013-11-24
|\| | | | | | | | | | | Conflicts: complete.cpp fish_tests.cpp
| * Large cleanup and refactoring of unescape() function.Gravatar ridiculousfish2013-11-24
| |
* | More work on new parserGravatar ridiculousfish2013-08-08
|/
* Fix for crash when setting tmux pane titleGravatar ridiculousfish2013-06-02
| | | | https://github.com/fish-shell/fish-shell/issues/846
* FormattingGravatar ridiculousfish2013-06-02
|
* Support for fuzzy completionsGravatar ridiculousfish2013-05-25
| | | | | https://github.com/fish-shell/fish-shell/issues/568 https://github.com/fish-shell/fish-shell/issues/528
* Formatting and style updatesGravatar ridiculousfish2013-05-05
|
* Teach case-insensitive completions about tildes. Fixes ↵Gravatar ridiculousfish2013-04-07
| | | | https://github.com/fish-shell/fish-shell/issues/647
* Implement actual error handling for builtin_printf. Fix the tests.Gravatar ridiculousfish2013-03-24
|
* Kill termio.h and sys/termios.hGravatar David Adam (zanchey)2013-03-05
| | | | | | | | | | | On FreeBSD, compilation complains that "this file includes <sys/termios.h> which is deprecated, use <termios.h> instead". On Linux and FreeBSD, <sys/termios.h> literally just pulls in <termios.h>. On OS X and Solaris, <termios.h> pulls in <sys/termios.h>. <termio.h> doesn't exist on FreeBSD or Mac OS X, and on Linux is marked as deprecated and just includes <termios.h>. It does exist on Solaris, but no `struct termio` is ever actually used in the codebase.