1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-11-16 09:36:29 -05:00
Commit Graph

38 Commits

Author SHA1 Message Date
eaf516110f basic: code review and minor refactoring. 2021-08-09 12:06:07 +08:00
7e71cf52a3 Review cursor move commands in basic. 2016-05-22 22:22:39 +08:00
c390cf2a3e Remove tab width constraints, was [2, 4, 8], now [1... 2016-02-24 13:22:54 +08:00
7f5f0dd7b3 Introduce newmlarg as alternative to mlreply.
Rewrite gotoline accordingly.
2015-09-29 10:43:19 +08:00
87350f4c16 Review getgoal code. 2015-03-16 10:46:51 +08:00
5e5558e00b Align naming convention for output of text on the message line: mlout*. (Was a mix of log & write). 2015-02-13 12:31:59 +08:00
15ae2d4135 Transition from logger/logwrite/mlwrite to writestr/writefmt. 2015-01-21 21:30:01 +08:00
fbfaa29497 Add %B in string format of mlwrite to ring a bell. 2015-01-21 14:12:24 +08:00
4ca3f53385 Make use of logger to replace sequences of TTbeep-mlwrite-return. 2015-01-20 22:34:28 +08:00
da813d2efc Partial move configuration options out of estruct.h. 2014-12-22 17:44:52 +08:00
2fe2d9c153 Finish move of globals into input and random.
Remove globals.
2014-12-22 17:43:53 +08:00
ceac004e30 Move global curgoal to basic. 2014-12-22 17:43:11 +08:00
0f6ff70764 Move variables from globals to corresponding modules. 2014-12-22 17:41:59 +08:00
80256bdd6d Remove edef.h, obsoleted by globals.h. 2014-12-22 17:41:40 +08:00
dc3e8984ab Move standard includes of stdlib and string from edef.h. 2014-12-22 17:41:07 +08:00
9780b4ce16 Extract Struct terminal from estruct to terminal.h implemented by tcap. 2014-12-22 17:36:24 +08:00
1f7826d3a8 Move paragraph related function from basic.c to word.c. 2014-12-22 17:36:06 +08:00
87cd40ce6a Extract struct buffer and struct window from estruct.h. 2014-12-22 16:11:13 +08:00
4f9598b5da review line dependencies. 2014-12-22 16:08:12 +08:00
b321dce49e Remove efunc as dependencies. 2014-12-22 15:06:48 +08:00
9c2c4b7635 Remove display from efunc. 2014-12-22 15:06:08 +08:00
539f327271 Remove input from efunc. 2014-12-22 15:05:57 +08:00
4f07526222 Remove word from efunc. 2014-12-22 15:04:19 +08:00
f1a0771bfc Remove random from efunc. 2014-12-22 15:04:10 +08:00
4bba6e7417 refactor main and basic out of efunc. 2014-12-22 14:45:46 +08:00
Linus Torvalds
ddd45dbff1 Fix 'getccol()' and 'getgoal()' functions for multibyte UTF-8 characters
These functions convert the byte offset into the column number
(getccol()) and vice versa (getgoal()).

Getting this right means that moving up and down the text gets us the
right columns, rather than moving randomly left and right when you move
up and down.  We also won't end up in the middle of a utf-8 character,
because we're not just moving into some random byte offset, we're moving
into a proper column.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-15 14:36:38 -07:00
Linus Torvalds
6b793211c2 Make cursor movement (largely) understand UTF-8 character boundaries
Ok, so it may do odd things if it's not truly utf-8, and when moving up
and down lines that have utf-8 the cursor moves oddly (because the byte
offset within the line stays constant, rather than the character
offset), but with this you can actually open the UTF8 example file and
move around it, and at least some of the movement makes sense.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-10 16:40:36 -07:00
Thiago Farina
af19da1a99 uemacs: Move structure line and its functions to its own header file.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-15 08:46:20 -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
Thiago Farina
7622263b45 uemacs: Make getgoal function private to basic.c.
This functions is only used internally by basic.c, so marking it static,
to make it private.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-28 13:59:13 -07:00
Thiago Farina
834bfd37aa uemacs: basic.c: Add support to go to the end of the buffer.
There is a case when the user can type something like this:

    em filename +

or even

    em +

Instead of saying "Bogus argument" when the uemacs start, just go to the end of
the buffer like we can do in vim for example.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-21 12:31:25 -07:00
Thiago Farina
c7e30a9636 uemacs: convert typdef struct LINE to struct line.
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-04-28 07:46:47 -07:00
Pekka Enberg
74ffb9e254 uemacs: remove use of 'register' keyword
Lets welcome uEmacs/PK to the year 2010! As expected, the patch has no effect
on the generated code:

   text	   data	    bss	    dec	    hex	filename
 106002	   8864	  18616	 133482	  2096a	em
 106002	   8864	  18616	 133482	  2096a	em.new

Cc: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-27 16:17:44 -08: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
d5dc3160cf Lots of ANSI'fication and cleanups
Still tons of warnings with "-Wall", but now it's actually getting closer.

It even compiles again.
2005-09-30 22:52:45 -07:00
Linus Torvalds
9605cf8826 First cut at turning things into proper modern ANSI C
Hey! Real declarations!
2005-09-30 16:34:11 -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