Commit graph

49 commits

Author SHA1 Message Date
ridiculousfish
14834ff076 Rename events and simplify signal event handling
- Rename 'events' to 's_event_handlers'
- Stop inspecting the s_event_handlers list upon receiving
a signal. Instead, maintain the set of signals that are observed
in a separate static array. This lets us avoid mucking with
STL data structures in a signal handler, and so avoid blocking signals
in event.cpp
2014-12-29 00:38:11 -08:00
Daniel J. Hofmann
7dc0b6f40b Fixed various Undefined Behavior occurrences.
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.
2014-03-07 18:28:16 +01:00
ridiculousfish
be33d3f2a4 Revert "Merge pull request #1317 from pullreq/cpp"
This reverts commit 74135c0600, reversing
changes made to 6d749789ce.

See discussion in #1317
2014-02-28 02:16:48 -08:00
Geoff Nixon
18dd6f58e3 Fixes .c -> .cpp in comments. For doxygen. 2014-02-27 06:23:40 -08:00
ridiculousfish
53814983ff Update style and formatting to conform to fish style guide. 2014-01-15 01:40:40 -08:00
ridiculousfish
40e223c12d Additional miscellaneous fixes based on cppcheck static analysis 2014-01-12 13:53:59 -08:00
ridiculousfish
e38217683c Refactor block_t storage in parser_t from a linked list to a vector 2013-12-20 17:41:21 -08:00
ridiculousfish
c37c7cee05 Reduce compiled code size a bit 2013-04-13 02:00:31 -07:00
ridiculousfish
d9445f04b1 Use the new input_common_add_callback mechanism to not execute callbacks while signals are blocked. Should fix https://github.com/fish-shell/fish-shell/issues/608 2013-04-03 17:26:02 -07:00
Jan Kanis
fde9842a8e fix signal race 2012-12-24 23:06:09 -08:00
ridiculousfish
37bdb20092 Make event_block_t.event not a reference
Stylistic tweaks
2012-12-22 12:40:34 -08:00
ridiculousfish
e31431140a Formatting 2012-12-22 12:21:31 -08:00
Jan Kanis
8a446f43ff include fixes and suggestions from code review 2012-12-22 18:38:28 +01:00
Jan Kanis
30392bf66a reference'ize event.cpp/h 2012-12-20 16:13:14 +01:00
Jan Kanis
71233ee894 Make event_t.arguments into a vector instead of an auto_ptr<vector>.
Yay for less indirection and less code! The resulting event_t structure is two pointers larger, but cuts out an indirection and allocation.
2012-12-20 16:13:14 +01:00
Jan Kanis
af3059ab2a Allow 'emit' to accept event arguments 2012-12-20 16:13:00 +01:00
Jan Kanis
1f0ae8b06d fixed #449, added test 2012-12-20 16:11:46 +01:00
Jan Kanis
aa477195d4 testing for bug #449 2012-12-19 16:57:11 +01:00
ridiculousfish
26678682ca Fix indentation of switch statements 2012-11-19 00:31:03 -08:00
ridiculousfish
9992b8eb0e Apply new indentation, brace, and whitespace style 2012-11-18 16:30:30 -08:00
Łukasz Niemier
47df1ae40a Remove trailing whitespaces and change tabs to spaces 2012-11-18 11:23:22 +01:00
ridiculousfish
96046ffd30 First stab at getting rid of the ugly state1, state2 properties of block_t 2012-08-26 22:42:29 -07:00
ridiculousfish
61686aff34 Adopt posix_spawn (!)
Rewrite IO chains to be a vector of pointers, instead of a linked list
Removed io_transmogrify
2012-08-15 00:57:56 -07:00
ridiculousfish
c67702a498 Cleaned up lots of typecasts, simplified some string handling 2012-08-04 15:11:43 -07:00
ridiculousfish
11e56456a0 Fix for wrong sense for determining when an autoloaded function has changed
Addresses some of the complaints in https://github.com/fish-shell/fish-shell/pull/201
2012-07-06 15:30:41 -07:00
ridiculousfish
69446be1ee Signal handling cleanup and improved safety
Fixes issue where you couldn't control-C out of a loop (https://github.com/ridiculousfish/fishfish/issues/13)
Also stops doing memory allocation in the signal handler (oops) https://github.com/ridiculousfish/fishfish/issues/27
2012-06-04 14:20:01 -07:00
ridiculousfish
0bc644abf0 Fix lots of bugs related to the static analyzer
Improved how screen.cpp interacts with output_set_writer()
2012-03-26 01:21:10 -07:00
ridiculousfish
d173bb6e0a A bunch of changes working towards eliminating all memory allocation after fork() 2012-03-08 23:21:07 -08:00
ridiculousfish
f35d2629d4 Notice when fish_term256 changes and react to it 2012-03-05 14:18:16 -08:00
ridiculousfish
3ead99b088 Put fish on a diet. Tracked down the biggest memory hogs and fixed them. Total allocations down by a factor of 3 or so, live allocations a few KB. 2012-03-03 15:22:03 -08:00
ridiculousfish
fd4df6f9bb Changed iterators from iter++ to ++iter
Large set of changes to history to ensure that histories from other sessions don't "bleed" into the current session
2012-03-01 14:56:34 -08:00
ridiculousfish
ac0b97a571 Squash some warnings 2012-02-18 18:49:55 -08:00
ridiculousfish
fdef238a83 Fix to stop spamming console with event messages (oops) 2012-02-17 11:40:26 -08:00
ridiculousfish
9787901ddb Fix for removing too many event handlers (that's why "Goodbye" never got printed") 2012-02-17 11:37:25 -08:00
ridiculousfish
b6bc4381fb Get event_t off of halloc (!) 2012-02-08 19:02:25 -08:00
ridiculousfish
b3d0561c09 Cleanup event_get_desc 2012-02-08 16:20:48 -08:00
ridiculousfish
399c78fbf7 Fix event_block_t list from ad-hoc linked list to std::dequeue 2012-02-07 21:04:51 -08:00
ridiculousfish
a0a43046b3 Removed discriminated union from block_t type, allowing us to store wcstrings in it 2012-02-07 17:36:54 -08:00
ridiculousfish
3b8a4e56b0 A bunch of work to move towards a sane memory model in job_t 2012-01-29 22:06:58 -08:00
ridiculousfish
b43c8da66b More work towards instanced parser. First successful compilation 2012-01-22 21:40:08 -08:00
ridiculousfish
da85bdc401 More work on the instanced parser 2012-01-22 20:47:13 -08:00
ridiculousfish
fa796d668f Get some basic function signatures right for new instanced parser 2012-01-16 12:10:08 -08:00
ridiculousfish
451399b344 Migrate to std::vector in event class 2011-12-27 00:06:07 -08:00
ridiculousfish
b67eaa3abd More migration to the STL 2011-12-26 22:51:34 -08:00
ridiculousfish
046c9b56f5 Migrate blocked to std::vector 2011-12-26 22:27:58 -08:00
ridiculousfish
6ad80247ce Migrate killme to std::vector 2011-12-26 22:22:55 -08:00
ridiculousfish
0b744edfa4 Migrate events to std::vector 2011-12-26 22:18:16 -08:00
ridiculousfish
8d2f107d61 Some changes to migrate towards C++ and a multithreaded model 2011-12-26 19:18:46 -08:00
ridiculousfish
3f16ace678 Initial C++ conversion 2011-12-26 19:11:54 -08:00
Renamed from event.c (Browse further)