aboutsummaryrefslogtreecommitdiff
path: root/posix.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Turn NBSP into regular SP on inputLinus Torvalds2017-03-171-0/+3
| | | | | | | | | | | | | Particularly pasting from a web browser, I get a lot of 'space' + 'non-breaking space' noise, and keeping the &nbsp as an actual unicode character ends up being a major pain. Note: this is only done on input. If the file contains the unicode character U+00A0, we'll keep it that way. But you can't enter it from the keyboard (or cut-and-paste, which ends up looking like keyboard input). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* character input: make sure we have enough bytes for a full utf8 characterLinus Torvalds2012-07-101-2/+19
| | | | | | | .. but we do have that 0.1s delay, so if somebody feeds us non-utf8 sequences, we won't delay forever. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Use utf8 helper functions for keyboard inputLinus Torvalds2012-07-101-49/+17
| | | | | | | | | | | | ttgetc() used some homebrew utf8 to unicode translation, limited to just the normal latin1 characters. Use the utf8 helper functions to get it right for the more complex cases. NOTE! We don't actually handle characters > 0xff right anyway. And we still end up doing Latin1 in the buffers on input. One small step at a time. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Split up the utf8 helper functions into a file of their ownLinus Torvalds2012-07-101-18/+6
| | | | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Remove the old utf8_mode thing.Linus Torvalds2012-07-101-17/+0
| | | | | | | Let's just plan on being fully utf8 some day. We're not there yet, and maybe we'll never be, but having the halfway mode is not useful either. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make the 'struct video' contain an array of unicode characters rather than bytesLinus Torvalds2012-07-101-17/+18
| | | | | | | | | | | | | | | | | | This is disgusting. And quite frankly, it's debatable whether this will ever work. The "line" structure is still just an array of characters, so that has to work with utf-8. But the 'struct video' thing is what represents the actual screen rectangle, and is fixed-size by the size of the screen. So making it contain actual 32-bit unicode characters *may* make sense. Right now we translate things the same way we always used to, though, so utf-8 in 'struct line' will not be translated to the proper unicode array, but to the bytes of the utf-8 representation. So this really doesn't improve anything per se yet, just expands the memory use of the video array. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Make uemacs build on FreeBSD.Naohiro Aota2012-05-261-1/+1
| | | | | | | See <https://bugs.gentoo.org/show_bug.cgi?id=387135>. Signed-off-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Move some constants from estruct.h to posix.cThiago Farina2010-11-281-8/+15
| | | | | | | | These two constants are only needed/used by the posix.c file, so just define them there. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Fix return statementsPekka Enberg2010-08-291-1/+1
| | | | | | | | Return statement is not a function so remove superfluous use of parenthesis. Cc: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Turn ESC+'[' into a CSI characterLinus Torvalds2008-06-071-34/+55
| | | | | | | | This avoids the annoying behavior where we're on the command line, waiting for an ESC, and any control character sequence ends up finishing the command line and eating the first ESC. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Add support for a "utf-8" modeLinus Torvalds2005-10-021-1/+94
| | | | | | | | | | | | | | | | NOTE! MicroEmacs is very much a byte-based editor, and the new utf-8 support is purely an issue of terminal input and output. The file contents themselves are in the 8-bit space. In that space, Unicode is the same as Latin1. The new mode is called "utf-8", and is enabled automatically by the new emacs.rc when $LANG contains the substring "UTF-8". I'm sure people would like to some day also edit real UTF-8 contents, rather than just edit old 8-bit Latin1 contents in a UTF-8 terminal. However, that's an independent (and much bigger and thornier) issue. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* More warning avoidance and code cleanupLinus Torvalds2005-09-301-3/+3
|
* Fix up some trivial gcc -Wall warningsLinus Torvalds2005-09-301-7/+8
| | | | Lots more to go.
* More ANSI-fication of the sourcesLinus Torvalds2005-09-301-6/+6
| | | | | Ugh. Some of this is ugly. We should really include <curses.h> etc, but there are too many name clashes for that right now.
* Run "indent -kr -i8" on the sourcesLinus Torvalds2005-09-301-16/+17
| | | | Let's see how nasty it is to clean things up. For real.
* Initial import of em-4.0.15-ltLinus Torvalds2005-05-311-0/+159
This is a slightly updated version of uemacs-PK (PK is Pekka Kutvonen) which was used at Helsinki University a long time ago. My fingers cannot be retrained.