aboutsummaryrefslogtreecommitdiff
path: root/random.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix 'getccol()' and 'getgoal()' functions for multibyte UTF-8 charactersLinus Torvalds2012-07-151-4/+12
| | | | | | | | | | | | | 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>
* Start doing character removal properlyLinus Torvalds2012-07-111-3/+3
| | | | | | | | | | | 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>
* uemacs: Move structure line and its functions to its own header file.Thiago Farina2010-11-151-9/+11
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Fix return statementsPekka Enberg2010-08-291-77/+77
| | | | | | | | 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>
* uemacs: Compiles on Mac OS X.Yong Luk Stanley Elijah Goh2010-08-241-1/+1
| | | | | | | | | | | | Compiles on Mac OS X 10.6.4. setmode() is renamed to setemode() to avoid conflict with OS X's unistd.h's setmode(). Modify Makefile to enable the appropriate DEFINES to compile on Mac OS X. Signed-off-by: Yong Luk Stanley Elijah Goh <stan@t0xt.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: convert typdef struct LINE to struct line.Thiago Farina2010-04-281-11/+11
| | | | | | Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: remove use of 'register' keywordPekka Enberg2010-02-271-76/+76
| | | | | | | | | | | | | 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>
* Clean up various compile warningsLinus Torvalds2006-11-191-0/+3
| | | | | | | | | | 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>
* Avoid various name clashes with curses and termcap headersLinus Torvalds2005-10-011-3/+3
| | | | | This allows us to include the proper headers, instead of declaring things (badly) by hand.
* Fix up unused variable and ambiguous else in random.cLinus Torvalds2005-09-301-13/+2
|
* Lots of ANSI'fication and cleanupsLinus Torvalds2005-09-301-0/+1
| | | | | | Still tons of warnings with "-Wall", but now it's actually getting closer. It even compiles again.
* First cut at turning things into proper modern ANSI CLinus Torvalds2005-09-301-112/+124
| | | | Hey! Real declarations!
* Run "indent -kr -i8" on the sourcesLinus Torvalds2005-09-301-408/+435
| | | | Let's see how nasty it is to clean things up. For real.
* Initial import of em-4.0.15-ltLinus Torvalds2005-05-311-0/+1221
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.