Commit Graph

57 Commits

Author SHA1 Message Date
Renaud 14e6240b9c Transpose-characters valid with mixed UTF-8 and extended ASCII. 2016-05-21 07:52:19 +08:00
Renaud 92078e5595 Check consistency of forwchar/backchar calls.
Review entab dot movement.
2016-05-20 19:46:54 +08:00
Renaud 2b21a98e9c Review forwchar and backchar. 2016-05-19 21:27:26 +08:00
Renaud d4b2a4c1aa Review ldelchar and ldelete. 2016-05-19 14:02:43 +08:00
Renaud ac3c2aa6dd Review file read and write into buffers. 2016-03-30 17:44:46 +08:00
Renaud 06eba37779 Include stddef on Linux for offsetof macro definition. 2016-03-25 19:27:09 +08:00
Renaud 135866231d Rework line allocation. 2016-03-25 14:56:34 +08:00
Renaud a42c60045d Improve consistency of tab insertion behaviour while indenting and brace matching. 2016-02-25 17:08:27 +08:00
Renaud c390cf2a3e Remove tab width constraints, was [2, 4, 8], now [1... 2016-02-24 13:22:54 +08:00
Renaud e0550db4d1 $line returns a full copy of the current line instead of truncated at NSTRING. 2015-09-18 17:53:58 +08:00
Renaud 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
Renaud 6021a22b60 Move rdonly() in scope of line which is the first user module in the dependency list. 2015-02-13 11:54:17 +08:00
Renaud 135238106c backward char movement consistent with mixed byte/UTF-8 content. 2015-02-08 19:11:26 +08:00
Renaud 4cbf1e9ae1 Review cursor movement in presence of mixed latin1/unicode encoding. 2015-02-04 12:37:57 +08:00
Renaud de04424e51 Align scope and parameter type for linsert and is_beginning_utf8. 2015-02-02 19:44:35 +08:00
Renaud 91455a2e5a Insure &asc &chr 128 equals 128.
Insert-string can't handle character code > 0xFF.
2015-02-02 12:50:52 +08:00
Renaud 15ae2d4135 Transition from logger/logwrite/mlwrite to writestr/writefmt. 2015-01-21 21:30:01 +08:00
Renaud fbfaa29497 Add %B in string format of mlwrite to ring a bell. 2015-01-21 14:12:24 +08:00
Renaud cc06049046 $kill returns full copy of kill buffer. 2014-12-22 20:57:54 +08:00
Renaud a560025c0c Fix $kill to cover at most first 127 characters of kill buffer. Was only first N % 250 (ex 25 out of 275). 2014-12-22 20:57:40 +08:00
Renaud 2fe2d9c153 Finish move of globals into input and random.
Remove globals.
2014-12-22 17:43:53 +08:00
Renaud bd14ff374f Move globals rval and tabmask to eval and line. 2014-12-22 17:43:01 +08:00
Renaud 80256bdd6d Remove edef.h, obsoleted by globals.h. 2014-12-22 17:41:40 +08:00
Renaud dc3e8984ab Move standard includes of stdlib and string from edef.h. 2014-12-22 17:41:07 +08:00
Renaud 9ec9176c81 Centralize kill buffer code in line.c 2014-12-22 17:35:58 +08:00
Renaud 87cd40ce6a Extract struct buffer and struct window from estruct.h. 2014-12-22 16:11:13 +08:00
Renaud ab432a6781 Clean up dependecies on estruct by introducing defines.h. 2014-12-22 16:10:51 +08:00
Renaud 245c4a0477 Remove dependencies from line to display: Move rdonly from display to loc and create instantiable function logger( retcode, beep, string). 2014-12-22 16:09:15 +08:00
Renaud 451b12319a Add assert to guard logic of static function activation. 2014-12-22 16:09:06 +08:00
Renaud 03bd7dd902 Make line independant of display by introducing instanciable logwrite. 2014-12-22 16:08:21 +08:00
Renaud 4f9598b5da review line dependencies. 2014-12-22 16:08:12 +08:00
Renaud 70dab2c8d8 review visibility of functions defined by line. 2014-12-22 15:48:09 +08:00
Renaud a96f1b5f85 Move rdonly and reterr from main to display to avoid dependencies to main. 2014-12-22 15:43:35 +08:00
Renaud b321dce49e Remove efunc as dependencies. 2014-12-22 15:06:48 +08:00
Renaud 4e24edf715 Remove basic from efunc. 2014-12-22 15:06:17 +08:00
Renaud 9c2c4b7635 Remove display from efunc. 2014-12-22 15:06:08 +08:00
Renaud 0b093b8228 Remove main from efunc. 2014-12-22 15:04:37 +08:00
Renaud f1a0771bfc Remove random from efunc. 2014-12-22 15:04:10 +08:00
Linus Torvalds 0a8b429059 Start doing character removal properly
This makes actual basic editing work.  Including things like
justify-paragraph etc, so lines get justified by number of UTF8
characters rather than bytes.

There are probably tons of broken stuff left, but this actually seems to
get the basics working right.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 10:43:16 -07:00
Linus Torvalds 0e9fc2be15 Start actually inserting full utf8 sequences
This makes it possible to cut-and-paste the UTF8 testfile into a new
buffer, and the end result looks correct.

NOTE! We still do various things wrong while editing.  For example,
while the cursor movements were fixed, simple things like deleting a
character still work on single bytes, rather than utf8 characters.

So while this is getting much closer to actually editing UTF-8 data,
it's not there yet.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-11 02:21:36 -07:00
Thiago Farina 10ae171147 uemacs: Move NBLOCK constant into line.c
This constant is only used in line.c. So just keep it there.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-11-15 14:07:43 -08: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 1f271323f8 uemacs: convert typedef struct KILL to struct kill.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-10 15:24:33 -07:00
Thiago Farina 81a3a0be6e uemacs: convert typedef struct window_t to struct window.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-01 15:10:23 -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
Thiago Farina 6139ec4e73 uemacs/line.c: remove two unused variables.
line.c:21: warning: ‘ykbuf’ defined but not used
line.c:22: warning: ‘ykboff’ defined but not used

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-15 18:33:31 -08:00
Thiago Farina 5ffdebdbf3 uemacs: remove typdef struct BUFFER -> struct buffer.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-15 18:33:31 -08:00
Thiago Farina 8fc7449839 uemacs: fix sparse warnings, making file-local symbols static.
ansi.c:255:6: warning: symbol 'ansihello' was not declared. Should it be static?
epath.h:11:6: warning: symbol 'pathname' was not declared. Should it be static?
display.c:36:7: warning: symbol 'vscreen' was not declared. Should it be static?
display.c:38:7: warning: symbol 'pscreen' was not declared. Should it be static?
display.c:927:5: warning: symbol 'updateline' was not declared. Should it be static?
evar.h:20:6: warning: symbol 'uv' was not declared. Should it be static?
evar.h:24:6: warning: symbol 'envars' was not declared. Should it be static?
evar.h:128:7: warning: symbol 'funcs' was not declared. Should it be static?
fileio.c:14:6: warning: symbol 'ffp' was not declared. Should it be static?
fileio.c:15:5: warning: symbol 'eofflag' was not declared. Should it be static?
ibmpc.c:505:6: warning: symbol 'ibmhello' was not declared. Should it be static?
isearch.c:36:5: warning: symbol 'saved_get_char' was not declared. Should it be static?
isearch.c:37:5: warning: symbol 'eaten_char' was not declared. Should it be static?
isearch.c:41:5: warning: symbol 'cmd_buff' was not declared. Should it be static?
isearch.c:42:5: warning: symbol 'cmd_offset' was not declared. Should it be static?
isearch.c:43:5: warning: symbol 'cmd_reexecute' was not declared. Should it be static?
line.c:21:6: warning: symbol 'ykbuf' was not declared. Should it be static?
line.c:22:5: warning: symbol 'ykboff' was not declared. Should it be static?
lock.c:17:6: warning: symbol 'lname' was not declared. Should it be static?
lock.c:18:5: warning: symbol 'numlocks' was not declared. Should it be static?
vmsvt.c:521:6: warning: symbol 'hellovms' was not declared. Should it be static?
vt52.c:181:6: warning: symbol 'vt52hello' was not declared. Should it be static?

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-29 16:30:44 -08:00