aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringop.c
Commit message (Collapse)AuthorAge
* stringop.c: refactor a few functionsLibravatar Ian Fan2019-03-11
|
* stringop.c: clean up headersLibravatar Ian Fan2019-03-11
|
* stringop.c: remove unused functionsLibravatar Ian Fan2019-03-11
| | | | The only use of `join_list` in swaybar/tray/icon.c has been rewritten.
* output_cmd_background: fix no file + valid modeLibravatar Brian Ashworth2019-02-05
| | | | | | | | | | | | | If output_cmd_background is given a valid mode as the first argument, then there is no file given and an error should be returned. join_args should not be called with an argc of zero since it sets the last character to the null terminator. With an argc of zero, the length is zero causing a heap buffer overflow when setting the byte before the start of argv to '\0'. This probably will not ever generate a segfault, but may cause data corruption to whatever is directly before it in memory. To make other such cases easier to detect, this also adds a sway_assert in join_args when argc is zero.
* fixup! stringop.c: rewrite strip_whitespaceLibravatar Ian Fan2019-01-02
|
* stringop.c: rewrite strip_whitespaceLibravatar Ian Fan2019-01-01
|
* list.c: Remove list_foreachLibravatar Ian Fan2018-12-09
| | | | | Most occurrences have been replaced by `free_flat_list` which has been moved from stringop.c to list.c. The rest have been replaced by for loops.
* Replace _XOPEN_SOURCE with _POSIX_C_SOURCELibravatar emersion2018-11-25
| | | | And make sure we don't define both in the same source file.
* Allow reload command to exist anywhere in the command stringLibravatar Ryan Dwyer2018-09-01
| | | | | This fixes a crash if you have commands where reload appears in the middle or at the end, such as `bindsym r mode default, reload`.
* Clean up container title functionsLibravatar Ryan Dwyer2018-05-25
| | | | | | | | | | | | | * Add and use lenient_strcat and lenient_strncat functions * Rename `concatenate_child_titles` function as that's no longer what it does * Rename `container_notify_child_title_changed` because we only need to notify that the tree structure has changed, not titles * Don't notify parents when a child changes its title * Update ancestor titles when changing a container's layout * Eg. create nested tabs and change the inner container to stacking * No need to store tree presentation in both container->name and formatted_title
* FreeBSD fixesLibravatar johalun2017-06-06
| | | | | | | Increase _POSIX_SOURCE value where needed. Increase _XOPEN_SOURCE value where needed. Conditionally link to libcap (only on Linux). Possibly some trailing whitespace fixes (automatic).
* UnGNUify the codebaseLibravatar Drew DeVault2017-03-10
|
* common/stringop.c: a premature decrement meant an element of argv was never ↵Libravatar Daniel Lockyer2016-04-29
| | | | released
* Fix spelling mistakesLibravatar Eric Engestrom2016-04-02
|
* Add quotes to multiword arguments.Libravatar Mikkel Oscar Lyderik2016-01-25
| | | | | | | | | | | | | | | | | | | | | This adds quotes around multiword arguments before they are passed to `/bin/sh -c` in an exec command. Example: I connect to irc like this: exec termite -e "mosh server tmux a" Without this patch the arguments are passed to sh as: termite -e mosh server tmux a When it should be: termite -e "mosh server tmux a" For the command to work.
* Only strip comments at the start of a lineLibravatar Drew DeVault2015-11-29
| | | | | This is necessary because i3 config files use CSS notation for colors (i.e. #rrggbb).
* Parse command line args for swaymsgLibravatar Drew DeVault2015-11-26