Commit Graph

33 Commits

Author SHA1 Message Date
Renaud e6921a8ed1 Centralize customization in defines.h instead of Makefile + estruct.h. 2021-08-18 16:54:35 +08:00
Renaud d99b7fcbac Revise terminal interfaces. 2021-08-18 11:35:17 +08:00
Renaud 5f3b42f448 Use gcc predefined in conditional compilation (__CYGWIN__, __SIZEOF_WCHAR_T__). 2021-08-18 09:37:47 +08:00
Renaud 4847d8c589 Merge NetBSD adaptation. 2020-06-16 14:09:44 +08:00
Renaud a35185c4fa Remove VMS related code. 2019-07-04 08:06:13 +08:00
Renaud 1b2307e056 Partial fix of issues when using unicode sequence with describe-key, search-forward, query-replace-string. 2016-04-09 11:46:40 +08:00
Renaud 893658b3ef Fix issue #5 by rolling back commit 06b0d3f. This insure compatibility with both CYGWIN and XTERM terminals under Cygwin. 2016-02-12 13:11:50 +08:00
Renaud b6bd5c2927 Review header dependencies controlled by POSIX and MINGW32 flags. 2015-01-02 10:54:35 +08:00
Renaud 5e87236c02 Review header dependencies 2014-12-22 17:45:24 +08:00
Renaud 2669f218b7 Recompile on Linux 2014-12-22 17:45:12 +08:00
Renaud 2fe2d9c153 Finish move of globals into input and random.
Remove globals.
2014-12-22 17:43:53 +08:00
Renaud 80256bdd6d Remove edef.h, obsoleted by globals.h. 2014-12-22 17:41:40 +08:00
Renaud 422bfa0288 Recompile on Linux. 2014-12-22 17:37:28 +08:00
Renaud b321dce49e Remove efunc as dependencies. 2014-12-22 15:06:48 +08:00
Renaud 548973517b termio and posix implement same prototypes. 2014-12-22 14:46:28 +08:00
Renaud 9c311a1ba8 split efunc into corresponding headers. 2014-12-22 14:46:16 +08:00
Renaud 2e2d684697 enable ^S in posix 2014-12-22 14:13:11 +08:00
Renaud 45a6523572 use posix (termios) with Cygwin) 2014-12-22 14:12:41 +08:00
Linus Torvalds 6e4a45c005 character input: make sure we have enough bytes for a full utf8 character
.. 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>
2012-07-10 18:11:30 -07:00
Linus Torvalds ec6f4f36ec Use utf8 helper functions for keyboard input
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>
2012-07-10 17:36:30 -07:00
Linus Torvalds e62cdf04cf Split up the utf8 helper functions into a file of their own
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-10 16:21:35 -07:00
Linus Torvalds 12e4647deb Remove the old utf8_mode thing.
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>
2012-07-10 15:09:31 -07:00
Linus Torvalds e8f984a1b0 Make the 'struct video' contain an array of unicode characters rather than bytes
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>
2012-07-10 14:24:23 -07:00
Naohiro Aota 1d0cfd0276 Make uemacs build on FreeBSD.
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>
2012-05-26 11:50:23 -07:00
Thiago Farina a1891f8efc uemacs: Move some constants from estruct.h to posix.c
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>
2010-11-28 14:16:57 -08:00
Pekka Enberg 0f05e53f99 uemacs: Fix return statements
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>
2010-08-29 08:15:23 -07:00
Linus Torvalds c2a7e41fae Turn ESC+'[' into a CSI character
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>
2008-06-07 11:52:42 -07:00
Linus Torvalds f313bcf64a Add support for a "utf-8" mode
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>
2005-10-02 17:47:28 -07:00
Linus Torvalds 8eab871e55 More warning avoidance and code cleanup 2005-09-30 23:52:55 -07:00
Linus Torvalds d0ed902432 Fix up some trivial gcc -Wall warnings
Lots more to go.
2005-09-30 23:37:34 -07:00
Linus Torvalds 453f80d269 More ANSI-fication of the sources
Ugh.  Some of this is ugly.  We should really include <curses.h> etc,
but there are too many name clashes for that right now.
2005-09-30 17:08:36 -07:00
Linus Torvalds 435dd32ae2 Run "indent -kr -i8" on the sources
Let's see how nasty it is to clean things up. For real.
2005-09-30 15:26:09 -07:00
Linus Torvalds d7148b21fe Initial import of em-4.0.15-lt
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.
2005-05-31 08:50:56 -07:00