aboutsummaryrefslogtreecommitdiff
path: root/eval.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Do some valgrind cleanupLinus Torvalds2018-07-191-5/+12
| | | | | | | | | | | | | | | | | | | | Joerg Scheurich reported that there's a buffer overflow in readin() for long path component names. He's not wrong. When fixing that, and then checking there's nothing else obviously wrong with valgrind, I also noticed it complains about overlapping strcpy(). So add a hacky version of strscpy(), which (a) handles overlapping, and (b) has the proper strscpy() semantics. Just say no to strncpy and strlcpy, both of which are terminally broken interfaces. And stop stripping the binary. The time when the size of the uemacs binary was a big deal is long past, and it made valgrind harder. Reported-by: Joerg Scheurich <mufti11@web.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Start doing character removal properlyLinus Torvalds2012-07-111-1/+1
| | | | | | | | | | | 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 uv variable into the eval.c source file.Thiago Farina2010-11-241-0/+5
| | | | | | | It's used only there. Signed-off-by: Thiago Farina <tfransosi@gmail.com> 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-0/+2
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: convert typedef struct VDESC to struct variable_description.Thiago Farina2010-11-061-10/+10
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Remove two completly unused functions (fnclabel and spal).Thiago Farina2010-09-071-4/+0
| | | | | | | | The implementation of these functions are doing anything at all at this moment. So cleanup a bit the code by removing fnclabel and spal functions completly. Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Fix return statementsPekka Enberg2010-08-291-136/+136
| | | | | | | | 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: Add --help option.Thiago Farina2010-08-181-6/+7
| | | | | | | 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>
* uemacs: Use ARRAY_SIZE in more places.Thiago Farina2010-06-111-2/+2
| | | | | Signed-off-by: Thiago Farina <thiago.farina@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Add ARRAY_SIZE macro so we can get rid of some hard coded calculations.Thiago Farina2010-06-081-9/+10
| | | | | Signed-off-by: Thiago Farina <thiago.farina@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: enable -Wstrict-prototypesPekka Enberg2010-02-271-1/+1
| | | | | | | | | This patch enables the GCC '-Wstrict-prototypes' switch and fixes up broken prototypes. Cc: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: remove use of 'register' keywordPekka Enberg2010-02-271-28/+28
| | | | | | | | | | | | | 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>
* uemacs: remove typdef struct BUFFER -> struct buffer.Thiago Farina2010-02-151-1/+1
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Clean up various compile warningsLinus Torvalds2006-11-191-2/+4
| | | | | | | | | | 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>
* Make sources mostly sparse-cleanLinus Torvalds2005-10-011-2/+0
| | | | | Mainly an issue of taking care of a few remaining K&R function declarations.
* Fix more compiler warningsLinus Torvalds2005-10-011-0/+1
| | | | Better initializers, and more proper function types.
* Fix ugly "definitions in header file" crudLinus Torvalds2005-10-011-4/+0
| | | | | | | Move various initializations into new "globals.c" file. Also mark some variables static, and fix up some trivial compiler and sparse warnings.
* Lots of ANSI'fication and cleanupsLinus Torvalds2005-09-301-80/+115
| | | | | | 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-1/+1
| | | | Hey! Real declarations!
* Fix up headers and bogus re-definitions to use <stdlib.h> and <string.h>Linus Torvalds2005-09-301-37/+0
| | | | | Hey, it's already compiling cleaner. Getting proper function declarations will be a bitch, though.
* Run "indent -kr -i8" on the sourcesLinus Torvalds2005-09-301-429/+555
| | | | 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/+879
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.