aboutsummaryrefslogtreecommitdiff
path: root/file.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove the broken cryptographyRunxi Yu2024-08-121-48/+0
|
* Do some valgrind cleanupLinus Torvalds2018-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | 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>
* uemacs: Remove unused 'lflag' variables from file.cPekka Enberg2012-08-161-4/+0
| | | | | | | | | | | | | GCC spotted the following unused variable: CC file.o file.c: In function ‘readin’: file.c:225:6: warning: variable ‘lflag’ set but not used [-Wunused-but-set-variable] file.c: In function ‘ifile’: file.c:553:6: warning: variable ‘lflag’ set but not used [-Wunused-but-set-variable] Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* file.c: remove crazy keyboard open/close callsLinus Torvalds2011-08-251-8/+0
| | | | | | | | | | | | | It seems to have something to do with some old DOS mode, and not having keyboard translation on ("Insert floppy A:" questions while opening files? Whatever). But this is while doing normal file opens, and it is just insane to open/close a tty across a file open. The possible tty init/exit sequence would mess up some of the file read/write messages. Reported-by: Bijan Soleymani <bijan@psq.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Move MAXNLINE constant from estruct.h to file.cThiago Farina2010-11-281-0/+5
| | | | | | | | This constant is used only there, so there is no reason for it to be in estruct.h 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-6/+8
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: Kill dead codePekka Enberg2010-11-141-4/+0
| | | | | | | 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>
* uemacs: Fix return statementsPekka Enberg2010-08-291-44/+44
| | | | | | | | 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: convert typedef struct window_t to struct window.Thiago Farina2010-08-011-5/+5
| | | | | Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* uemacs: convert typdef struct LINE to struct line.Thiago Farina2010-04-281-8/+8
| | | | | | 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-38/+38
| | | | | | | | | | | | | 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-4/+4
| | | | | 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-6/+6
| | | | | | | | | | 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>
* Replace "WINDOW" type with "window_t"Linus Torvalds2005-10-011-5/+5
| | | | Starting to try to avoid name clashes with curses and friends.
* Lots of ANSI'fication and cleanupsLinus Torvalds2005-09-301-37/+37
| | | | | | Still tons of warnings with "-Wall", but now it's actually getting closer. It even compiles again.
* Run "indent -kr -i8" on the sourcesLinus Torvalds2005-09-301-283/+285
| | | | 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/+635
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.