summaryrefslogtreecommitdiff
path: root/src/libsystemd-terminal
AgeCommit message (Collapse)Author
2015-07-27terminal: drop unfinished codeDavid Herrmann
This drops the libsystemd-terminal and systemd-consoled code for various reasons: * It's been sitting there unfinished for over a year now and won't get finished any time soon. * Since its initial creation, several parts need significant rework: The input handling should be replaced with the now commonly used libinput, the drm accessors should coordinate the handling of mode-object hotplugging (including split connectors) with other DRM users, and the internal library users should be converted to sd-device and friends. * There is still significant kernel work required before sd-console is really useful. This includes, but is not limited to, simpledrm and drmlog. * The authority daemon is needed before all this code can be used for real. And this will definitely take a lot more time to get done as no-one else is currently working on this, but me. * kdbus maintenance has taken up way more time than I thought and it has much higher priority. I don't see me spending much time on the terminal code in the near future. If anyone intends to hack on this, please feel free to contact me. I'll gladly help you out with any issues. Once kdbus and authorityd are finished (whenever that will be..) I'll definitely pick this up again. But until then, lets reduce compile times and maintenance efforts on this code and drop it for now.
2015-07-06treewide: fix typos of let'sZbigniew Jędrzejewski-Szmek
2015-06-23build-sys: add all source files and no built files to the tar ballKay Sievers
This fully synchronizes the content of a "make dist" and a "git archive" tar ball. http://lists.freedesktop.org/archives/systemd-devel/2015-June/033214.html
2015-06-15everywhere: port everything to sigprocmask_many() and friendsLennart Poettering
This ports a lot of manual code over to sigprocmask_many() and friends. Also, we now consistly check for sigprocmask() failures with assert_se(), since the call cannot realistically fail unless there's a programming error. Also encloses a few sd_event_add_signal() calls with (void) when we ignore the return values for it knowingly.
2015-06-11build-sys: split internal basic/ library from shared/Kay Sievers
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/
2015-06-02fix double semicolon typoThomas Hindoe Paaboel Andersen
2015-05-30terminal: fix include orderingThomas Hindoe Paaboel Andersen
2015-05-29terminal: use signal-util.h and reorder includesThomas Hindoe Paaboel Andersen
2015-04-30terminal: update for simpler sd-bus api'sThomas Hindoe Paaboel Andersen
2015-04-28bus-util: drop redundant bus argument from bus_message_map_all_properties() ↵Lennart Poettering
and related calls
2015-04-11shared: add random-util.[ch]Ronny Chevalier
2015-04-09terminal/page: drop unneeded DISABLE_WARNING_*David Herrmann
The macros in shared/macro.h have been updated to no longer use fixed variable names. This will silence any shadowing-warnings, so drop the DISABLE_WARNING_* annotations.
2015-04-09terminal/idev: fix NULL terminator for bus-property mappingDavid Herrmann
We require a NULL entry as sentinal in bus_properties_map. Fix this!
2015-03-11terminal/sysview: introduce SETTLE eventsDavid Herrmann
This introduces a new SYSVIEW_EVENT_SETTLE notification that is sent after initial scanning via sysview is done. This is very handy to let the application raise warnings in case requested resources are not found during startup. The SETTLE event is sent after systemd-logind and udev enumerations are done. This event does in no way guarantee that a given resource is available. All it does is notify the application that scanning is done! You must not react to SETTLE if you don't have external synchronization with the resource you're waiting for. The main use-case for SETTLE is to run applications _inside_ of logind sessions and startup sysview. You really want to make sure that the own session you're running in was found during enumeration. If not, something is seriously wrong.
2015-03-07libsystemd-terminal: use at most LOG_ERR for XKB errorsZbigniew Jędrzejewski-Szmek
XKB errors aren't *that* important. Coverity complained that the same action is taken in multiple branches, which is semi-valid, so is fixed too (CID #1256582).
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2015-02-01Add a snprinf wrapper which checks that the buffer was big enoughZbigniew Jędrzejewski-Szmek
If we scale our buffer to be wide enough for the format string, we should expect that the calculation was correct. char_array_0() invocations are removed, since snprintf nul-terminates the output in any case. A similar wrapper is used for strftime calls, but only in timedatectl.c.
2015-01-26build-sys: unbundle unifontZbigniew Jędrzejewski-Szmek
We should prefer the unifont.hex file from the system, instead of our own. Upstream has made a few releases since our version was included, and we should follow upstream changes. But adding 2.6MB to our source repo every time upstream releases is not nice.
2014-12-31Revert commit f131770b "tree-wide: spelling fixes"David Herrmann
This partially reverts: commit f131770b1465fbf423881f16ba85523a05f846fe Author: Veres Lajos <vlajos@gmail.com> Date: Mon Dec 29 09:45:58 2014 +0000 tree-wide: spelling fixes The commit in question changed a binary file. I didn't look at the diff in particular, so I have no idea what exactly was changed. However, the file is generated and it looked highly suspiciuous. Therefore, I reverted that part. Note that this is generated by "make update-unifont" so really no reason to touch at all.
2014-12-30tree-wide: spelling fixesVeres Lajos
https://github.com/vlajos/misspell_fixer https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa Thanks to Torstein Husebo <torstein@huseboe.net>.
2014-12-22shared: utf8 - support ucs4 -> utf8Tom Gundersen
Originally we only supported ucs2, so move the ucs4 version from libsystemd-terminal to shared and use that everywhere.
2014-12-11tree-wide: use our memset() macros instead of memset() itselfLennart Poettering
2014-12-11treewide: correct spacing near eol in code commentsTorstein Husebø
2014-12-09treewide: sanitize loop_writeZbigniew Jędrzejewski-Szmek
loop_write() didn't follow the usual systemd rules and returned status partially in errno and required extensive checks from callers. Some of the callers dealt with this properly, but many did not, treating partial writes as successful. Simplify things by conforming to usual rules.
2014-11-30terminal/screen: fix GL/GR double-mappingDavid Herrmann
We must not call screen_map() multiple times for the same input char. Fix the double-mapping for GL/GR maps are correctly applied.
2014-11-28treewide: another round of simplificationsMichal Schmidt
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
2014-11-28treewide: more log_*_errno + return simplificationsMichal Schmidt
2014-11-28treewide: simplify log_*_errno(r,...) immediately followed by "return r"Michal Schmidt
2014-11-28treewide: more log_*_errno() conversions, multiline callsMichal Schmidt
Basically: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \ $f; done Plus manual indentation fixups.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-11-27fix build with --enable-terminalThomas Hindoe Paaboel Andersen
Broke with 086891e5c119abb9854237fc32e736fe2d67234c
2014-11-27log: rearrange log function namingLennart Poettering
- Rename log_meta() → log_internal(), to follow naming scheme of most other log functions that are usually invoked through macros, but never directly. - Rename log_info_object() to log_object_info(), simply because the object should be before any other parameters, to follow OO-style programming style.
2014-11-25terminal/idev: forward xkb-messagesDavid Herrmann
Properly forward all XKB messages. You can use XKB_LOG_VERBOSITY= to control the amount of messages sent by XKB. We explicitly set XKB_LOG_LEVEL to 7 you can use SYSTEMD_LOG_LEVEL to control the log-level generically.
2014-11-25terminal/idev: avoid magic numbersDavid Herrmann
Use XKB_CONTEXT_NO_FLAGS instead of magic 0.
2014-11-24terminal/idev: use compose tablesDavid Herrmann
Before forwarding keyboard events, feed them into possible compose tables. This enables Compose-key and Dead-key features. Few notes: * REPEAT events are never fed into compose tables. It just doesn't make sense and is usually not wanted. Compose-sequences are usually hard to remember and take time to type. Thus, the REPEAT event of the Compose-key itself would often cancel the compose sequence already. * Stop resolving symbols for UP events. Anything but keycodes is never associated to a physical key, but is a one-time action. There is nothing like UP events for key-symbols! * Cancel compose-sequences on Multi-Key UP. See the inline comment. We should make this configurable!
2014-11-24terminal/idev: add compose-file supportDavid Herrmann
Add support for compose files to idev-keyboard. This requires libxkbcommon-0.5.0, which is pretty new, but should be fine. We don't use the compose-files, yet. Further commits will put life into them.
2014-11-04util: introduce negative_errno()David Herrmann
Imagine a constructor like this: int object_new(void **out) { void *my_object; int r; ... r = ioctl(...); if (r < 0) return -errno; ... *out = my_object; return 0; } We have a lot of those in systemd. If you now call those, gcc might inline the call and optimize it. However, gcc cannot know that "errno" is negative if "r" is. Therefore, a caller like this will produce warnings: r = object_new(&obj); if (r < 0) return r; obj->xyz = "foobar"; In case the ioctl in the constructor fails, gcc might assume "errno" is 0 and thus the error-handling is not triggered. Therefore, "obj" is uninitialized, but accessed. Gcc will warn about that. The new negative_errno() helper can be used to mitigate those warnings. The helper is guaranteed to return a negative integer. Furthermore, it spills out runtime warnings if "errno" is non-negative. Instead of returning "-errno", you can use: return negative_errno(); gcc will no longer assume that this can return >=0, thus, it will not warn about it. Use this new helper in libsystemd-terminal to fix some grdev-drm warnings.
2014-10-30util: unify how we see srand()Lennart Poettering
2014-10-16terminal: log unsupported ANSI or DEC mode changesTom Gundersen
2014-10-16terminal: split ANSI from DEC mode changesTom Gundersen
2014-10-11terminal/grdrm: force deep modeset on enterDavid Herrmann
Usually, when our session is activated (or re-configurated) we should be able to try a page-flip to our buffer. The kernel driver should reject it if it is incompatible. As it turns out, drivers don't do this. Therefore, we now force a deep modeset if we're not sure what mode is set. This has the side-effect that we might get glitches on session-switches (depending on driver behavior). However, there's no way around this and it is what everyone does so far. Most drivers still detect if we keep the mode and so don't touch the clocks. Therefore, we just get a regular async flip.
2014-10-05terminal: remove an unused initializationThomas Hindoe Paaboel Andersen
2014-10-05terminal/idev: don't remove consumed-mods from kbd-matchesDavid Herrmann
XKB consumed mods include modifiers that *didn't* affect the translation, but might affect it if used. This is very misleading, given that we are usually not interested in that information. Therefore, keep them in real mods to behave like X11 does. Maybe at some point, XKB introduces proper shortcut matching... Also make evcat display consumed modifiers so we can better debug those situations.
2014-10-05terminal/screen: perform bold->light conversion only on foregroundDavid Herrmann
Bold glyphs always use light colors. However, this color conversion is limited to the foreground color, so skip it for backgrounds.
2014-10-05terminal/subterm: leave bold-light conversion to parentDavid Herrmann
We rely on the parent terminal to do color conversion, so also leave bold->light conversion to the parent. Otherwise, it will be performed twice and we might apply it on the wrong color.
2014-10-05terminal/screen: add support for alternate screen buffersTom Gundersen
Hook up SM/RM 47/1047-1049 and enable alternate screen buffers for term applications. (David: rebased on top of -git, renamed helpers and added docs)
2014-10-05terminal/screen: save state in separate objectDavid Herrmann
Terminal state can be saved/restored by applications. To simplify our internal handling, put all affected state into a separate object. Especially with alternate screen buffers, this will simplify our code significantly.