1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-11-02 19:37:19 -04:00
Commit Graph

76 Commits

Author SHA1 Message Date
c961759288 rework version and help printing
em --help now returns EXIT_SUCCESS
2014-12-22 14:05:53 +08:00
Linus Torvalds
8899ed4e1f Fix the unicode character limit (0 .. 0x10ffff)
For some reason I had limited things to 0xffff, it really should be 0x10ffff.

We don't actually support a full 32-bit unicode model anyway, since we
use the high bits for the control/meta/^X/special bits, but there was no
reason to limit things to 16 bits when we had 28 bits available.  And
the real limit for real Unicode characters is 0x10ffff.

Add a silly example character past the 16-bit range to the UTF8 demo
file:
  'SMILING FACE WITH HALO' (U+1F607)
from the 'emoticons' block.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-09-24 19:44:21 -07: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
2d0b568559 uemacs: Add -g options to the output usage.
While I'm here, improve the word of the above two options.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-22 09:37:08 -07:00
Christian Faulhammer
da3d470b8d Fix a tiny typo
Signed-off-by: Christian Faulhammer <christian@faulhammer.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-13 07:34:23 -07:00
Thiago Farina
5664b10291 uemacs/version.c: Add version function to output the version string information.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-07 13:55:02 -07:00
Thiago Farina
74336ca924 uemacs: Get rid of the CALLED macro.
uemacs is not a subprogram and doesn't seem it will be, so there is no reason
to leave this macro. And this macro is defined to 0, so we never reach the path
where we test for this macro.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-07 13:47:00 -07: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
78f045749f uemacs: Add more two options to the usage output.
Added + and +<n> to the usage output.

Also fixed the following warning:

  main.c: In function ‘main’:
  main.c:121: warning: ‘gline’ may be used uninitialized in this function

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-29 08:15:23 -07:00
Thiago Farina
8facd84c6f uemacs: Add --help option.
Add a basic usage() function to support the --help option.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-18 12:14:19 -07:00
Thiago Farina
dfc102ce3a uemacs: Add --version option.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-13 12:04:12 -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
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
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
Linus Torvalds
686a9e74ed Clean up various compile warnings
Most of them were harmless: gcc not being smart enough to realize that
an uninitialized variable was never used if it wasn't initialized etc.

Some of them were name clashes ("crypt()" is a standard library
function, so rename it to "myencrypt()") etc.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-19 11:52:18 -08:00
Linus Torvalds
ef92bc8cd9 Make sources mostly sparse-clean
Mainly an issue of taking care of a few remaining K&R function
declarations.
2005-10-01 01:09:22 -07:00
Linus Torvalds
12cb79ceb4 Avoid various name clashes with curses and termcap headers
This allows us to include the proper headers, instead of declaring
things (badly) by hand.
2005-10-01 00:22:55 -07:00
Linus Torvalds
d66d329986 Replace "WINDOW" type with "window_t"
Starting to try to avoid name clashes with curses and friends.
2005-10-01 00:02:32 -07:00
Linus Torvalds
8eab871e55 More warning avoidance and code cleanup 2005-09-30 23:52:55 -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
118ee5f944 Fix up headers and bogus re-definitions to use <stdlib.h> and <string.h>
Hey, it's already compiling cleaner. Getting proper function declarations
will be a bitch, though.
2005-09-30 15:33:51 -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
77784cd46c Minimal patches to make uemacs compile in a modern environment.
make sure to include <errno.h>, and allow for the fact that newer
gcc's don't allow function declarations in function scope (don't
ask me why, but there you have it..)
2005-05-31 08:58:59 -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