summaryrefslogtreecommitdiff
path: root/usr.bin/mg/extend.c
AgeCommit message (Collapse)Author
2012-05-25Remove static FILE pointer used for handling files in fileio.c. Passlum
by reference instead. This allows the mg startup file to open other files without unexpected things happening. Discussed with Sunil Nimmagadda.
2012-04-12Remove the conditional directives NO_MACRO and NO_STARTUP.lum
They have not compiled for numerous years. ok kjell@ millert@
2011-01-21It volates style(9), but in mg, #include"def.h" goes first. 'twas the way it ↵Kjell Wooding
was built. no binary change here. confirmed by lum@, tested by Henri Kemppainen
2006-12-30one more 'verses'->'versus' typo in commentMartin Reindl
2006-12-21Fix a realloc-style bug (curmap = reallocmap(curmap)) inKjell Wooding
keymap repapping. spotted by theo
2006-07-25Add bfirstlp(), blastlp() macros, returning the first and last linesKjell Wooding
of a buffer respectively. Removes an ugly construction than necessitated "go to first line"-type comments throughout the code. No binary change
2006-07-25Rename the header line of a buffer to b_headp, from the remarkablyKjell Wooding
unintuitive b_linep. No binary change.
2006-06-01make // /~ path rewriting optional in adjustname() and use it everywhereJason Wright
except for the command line specified files. ok kjell,cloder
2006-03-30Clean up some allocations. Remove malloc casts, and some easyKjell Wooding
malloc(A*B)->calloc changes.
2005-12-20Clean up the ugly casted frees. In one case, this meant eliminating a nastyKjell Wooding
struct/union/casting nightmare when building the list of names for filename completion. In particular, be consistent about strduping and freeing the list data.
2005-12-20Do some delinting of strl-type functions. Also, remove a superfluousKjell Wooding
word in the undo-list.
2005-12-13More name-clash delintingKjell Wooding
2005-12-13do some silly de-lintingKjell Wooding
2005-11-18greedy use of typedef struct was making code harder to read; ok kjell cloderTheo de Raadt
2005-11-07add missing ctype.hKjell Wooding
2005-11-07Allow ctrl-key patterns ("^X^C") in keybind function. WillKjell Wooding
allow more modularization of keymaps later. Also, improved error checking suggested by cloder.
2005-10-14add missing /* ARGSUSED */ to quiet lint.Kjell Wooding
2005-10-14put proto in same #ifdef as codeTheo de Raadt
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-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-10spacingTheo de Raadt
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-09-22fix leak on realloc failureVincent Labrecque
ok henning tedu
2002-09-15 rename realocmap to reallocmap, plus some style.Vincent Labrecque
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-21fix bad usage of strlcpy()'s return value. (made pointers pointVincent Labrecque
beyond the boundaries of buffers) ok deraadt@
2002-05-29 show the line number in the config file when we find an error.Vincent Labrecque
ok art@
2002-03-11 remove errno=0 assignments, we don't need these with Hakan's codeVincent Labrecque
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-03-10Better long vs int. millert@ ok.Hakan Olsson
2002-02-16Part one of userland __P removal. Done with a simple regexp with some minor ↵Todd C. Miller
hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
2002-02-14 use strtol instead of atoi to get range checking, etcVincent Labrecque
2002-02-13 simplify the define_key() code to use sane functions in two separate bufferVincent Labrecque
instead of hardcoding sizes. ok art@,deraadt@
2001-07-05Fix a seg fault when an init file can't be readMatthieu Herrb
2001-05-24Make the keymap/mode table growable in runtime.Artur Grabowski
2001-05-24Break out function -> name mappings to an own file.Artur Grabowski
Add a possibility to dynamically extend the function table.
2001-05-24spacesMichael Shalayeff
2001-05-23cinfo is const, keyname() and findbind() take buffer size to use strlcpy vs ↵Michael Shalayeff
cpy+len
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-23Use 'fundamental_map' where 'map_table[0].p_map' or 'name_map("fundamental")'Artur Grabowski
were used.
2001-05-23There is no need to use name_mode when all we use from the mode is the map.Artur Grabowski
name_map gives us what we want.
2001-05-23Deal with another strangeness caused by the abuse of theArtur Grabowski
global ele variable.
2001-05-23Add an argument to doscan which is a pointer to a KEYMAP pointer.Artur Grabowski
If that argument is not NULL, we set it to the k_prefmap of the pressed key if there is one. This is what most of the users of doscan did anyway, but they did it through leaked global state.
2001-05-23Get rid of 'prefix' and use NULL instead.Artur Grabowski
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...