summaryrefslogtreecommitdiff
path: root/usr.bin/mg/file.c
AgeCommit message (Collapse)Author
2005-10-14add missing /* ARGSUSED */ to quiet lint.Kjell Wooding
2005-10-13spacingTheo de Raadt
2005-10-13Make dired buffer read-only by default.Kjell Wooding
Noticed by Han Boetes
2005-10-13Use dired mode automatically if file specified for loading isKjell Wooding
a directory. Modified version of patch from Han Boetes. ok cloder@
2005-10-13KNF and minor cleanup. Remove an impossible condition check.Kjell Wooding
Also, remove annoying "now readonly" message, as this information is already reflected in the statusbar
2005-08-09Clean up eread handling in mg. (basically, fallout from the 'enter oftenKjell Wooding
means abort' behaviour added during the hackathon). Eliminates redundant ereply function, fixes miscellaneous cores when aborting, and move a number of assumed pathnames into the prompt text, since they are used there anyway. All changes consistent with emacs behavior ok beck@ many, many moons ago.
2005-06-14Add explicit public domain notices to all public domain files.Kjell Wooding
ok millert@, deraadt@
2005-06-03Clean up find-alternate-file (C-x C-v) so abort returns to originalKjell Wooding
file, like its emacs ancestor. ok cloder@
2005-05-30add find-alternate-file command and binding for ^X^V; ok cloderJason Wright
(you're welcome kjell)
2005-05-27In find file, behave like emacs: the default starting directory forChad Loder
completion is the directory of the current buffer's file, if any, rather than the working directory from where you launched mg. Prodding by reyk, ok reyk and fgont
2005-04-21correct strlcpy abuse, and always check for NULL return from find_bufferBob Beck
ok cloder@, feedback from many
2005-04-03This is a no binary change which does:David Berghoff
- spelling, punctuation fixes - variable declaration lineup - use parentheses for return and sizeof - K&R function declarations -> ANSI - other minor code beautification ok henning@
2005-03-10fix more BACKUP/NOBACKUP/NO_BACKUP confusion, again no binary change.Henning Brauer
spotted by jmc@
2005-03-09fix mg's behaviour with regards to files on which we do not haveJean-Francois Brousseau
write access. diff originally from vincent@ and forgotten for a while. ok rohee@, "toss it in, i'll bitch if it doesn't work" henning@
2004-07-22stage 1 of the infinite minibuffer work - add support for on the flyVincent Labrecque
buffer reallocation in veread(). This commit only changes the API. All the buffers have exactly the same bounds as before for now. tested by a couple of my very helpful testers!
2003-11-09fix the undo record size for insert-file so we do not get an extra byteVincent Labrecque
2003-11-08typos from Jonathon Gray;Jason McIntyre
2003-10-13remember the new filename on ^X^WVincent Labrecque
ok deraadt
2003-08-16spacingTheo de Raadt
2003-01-06support +number; rewritten from buggy code by mjc@bitz.ca, vincent okTheo de Raadt
2002-09-15don't add undo records when we open a file, only when we insert it.Vincent Labrecque
ok deraadt@
2002-07-25 replace the ugly and buggy adjustname function by a simple one usingVincent Labrecque
simple APIs. makes mg not crash with 65k filenames... ok art@
2002-07-03 a few missing tests for malloc()'s return value.Vincent Labrecque
ok art@
2002-07-01KNF + ansi; from zyrnix (only the easy part of his diffs)Vincent Labrecque
2002-06-19add an undo insert record on insert-file. this makes insert-file undoable.Vincent Labrecque
ok deraadt@
2002-05-29 add an "auto-execute" feature, that allows binding function calls toVincent Labrecque
certain patterns. for example, `auto-execute "*.c" auto-indent-mode'. ok art@
2002-05-29 add a function to visit a file read-only mapped to C-x C-vVincent Labrecque
ok art@
2002-03-16 add readonly buffer supportVincent Labrecque
plus some KNF ok art@
2002-03-11 * Move to ANSI function definitions.Vincent Labrecque
* Add a whole lot of consts where I thought it made sense no ok, but no objections either...
2002-02-19 Make multiple buffers with the same basename work correctly.. (like GNUVincent Labrecque
emacs) and unbreak a stupid loop at the same time. ok art@
2002-02-14some KNFTheo de Raadt
2002-02-13 Oups, don't print fname<1> when there's only one buffer for this file.Vincent Labrecque
2002-02-13 Make mg malloc the l_text element instead of reallocating whole LINEVincent Labrecque
structures all the time.
2002-02-13 * Replace unsafe strcpy and strcat calls to safe strlcpy and strlcat.Vincent Labrecque
* Be a little bit more verbose about some errors * Fix some memory leaks in fileio.c ok deraadt@, art@
2001-05-24spacesMichael Shalayeff
2001-05-23Get rid of unnecessary casts of NULL.Artur Grabowski
2001-05-23remove VOID. We're way beyond the point where this could build with anArtur Grabowski
ancient compiler.
2001-05-04Cleanups in filename and buffer name handling.Artur Grabowski
Mostly just using libc instead of rolling our own.
2001-01-29$OpenBSD$Niklas Hallqvist
2000-09-01More -Wall anmd KNF, from op2@tomahawk.SQUiSH.orgTodd C. Miller
2000-04-13The start of KNF + -Wall. The code has been run through indent butTodd C. Miller
needs hand fixup. I stopped at keymap.c...
2000-02-26change WINDOW -> MGWIN to avoid curses type conflictTodd C. Miller
convert to terminfo in tty*.c add support for some keypad function keys (arrows, pgup, pgdown)
2000-02-25initial import of mg2aTheo de Raadt