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>
I want to see the difference between space and nbsp, and I consider nbsp
to be a control character, so show it as such. Even if it is
technically "printable".
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch kills #ifdef'd code from display.c and file.c.
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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>
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>
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>
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>
Waste a few minutes occasionally on cleanup, and maybe we can make this
thing look ok in a decade or two..
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This code still assumes a latin1 kind of "one byte, one character" setup.
UTF-8 input/output (even if the data is encoded in latin-1) is a separate
issue.
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..)
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.