OpenBSD CVS

CVS log for src/usr.bin/mg/main.c


[BACK] Up to [local] / src / usr.bin / mg

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.96 / (download) - annotate - [select for diffs], Tue Oct 24 10:26:02 2023 UTC (6 months, 3 weeks ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.95: +4 -2 lines
Diff to previous 1.95 (colored)

call vttidy() in the exit path for the batch mode

Diff by Mark Willson (mark [at] hydrus.org.uk), thank you!

Revision 1.95 / (download) - annotate - [select for diffs], Fri Apr 14 15:34:08 2023 UTC (13 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

Add a missing void

Revision 1.94 / (download) - annotate - [select for diffs], Thu Mar 30 19:01:25 2023 UTC (13 months, 2 weeks ago) by op
Branch: MAIN
Changes since 1.93: +3 -3 lines
Diff to previous 1.93 (colored)

tabify two lines

Revision 1.93 / (download) - annotate - [select for diffs], Thu Mar 30 19:00:02 2023 UTC (13 months, 2 weeks ago) by op
Branch: MAIN
Changes since 1.92: +9 -4 lines
Diff to previous 1.92 (colored)

don't access(conffile)

This removes a few access(2) calls in the configuration file handling.
startupfile() now opens and return the file and to avoid surprises it
also uses a caller-provided buffer to store the filename.  This also
removes the extra adjustpath() that load() did: it has been moved to
evalfile() only.

with help, fixes and ok tb@

Revision 1.92 / (download) - annotate - [select for diffs], Thu Mar 30 08:07:07 2023 UTC (13 months, 2 weeks ago) by op
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

trailing whitespaces

Revision 1.91 / (download) - annotate - [select for diffs], Wed Mar 8 04:43:11 2023 UTC (14 months, 1 week ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.90: +1 -3 lines
Diff to previous 1.90 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.90 / (download) - annotate - [select for diffs], Mon May 3 12:18:43 2021 UTC (3 years ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.89: +2 -1 lines
Diff to previous 1.89 (colored)

When parsing a variable value within double quotes, allow an escaped
\" to be accomodated for. Also, move the variable structure to be
global in scope within mg.

Revision 1.89 / (download) - annotate - [select for diffs], Sat Mar 20 09:00:49 2021 UTC (3 years, 2 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.88: +52 -4 lines
Diff to previous 1.88 (colored)

Add a 'batch' mode to mg via the '-b' command line option which will
initialise a pty, run the specified file of mg commands and then exit.

This is to facilitate mg fitting into the OpenBSD regress test
framework and be able to run via a cron job.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Feb 23 08:10:51 2021 UTC (3 years, 2 months ago) by lum
Branch: MAIN
Changes since 1.87: +9 -5 lines
Diff to previous 1.87 (colored)

Allow the user to specify a path to the mg startup file on the command line.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Jun 22 15:38:15 2019 UTC (4 years, 10 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

Tidy up the comments:
1. two spelling mistakes.
2. change references to keystrokes, same as man page (UP-low).
3. update a filename reference to reality.

Revision 1.86 / (download) - annotate - [select for diffs], Mon Jun 10 06:52:44 2019 UTC (4 years, 11 months ago) by lum
Branch: MAIN
Changes since 1.85: +10 -1 lines
Diff to previous 1.85 (colored)

Allow mg to log its internal status to a file. At the moment it only
logs line information like front and back pointers in the linked list,
how many characters are used and where the cursor is placed in the
file.

With this diff logging is not switched on by default and has to
compiled into mg.  -DMGLOG has to be added to the Makefile:

CFLAGS+=-Wall -DREGEX -DMGLOG

And the comment character removed from:

#SRCS+=  log.c

ok bcallah@

Revision 1.85 / (download) - annotate - [select for diffs], Thu Dec 13 14:59:16 2018 UTC (5 years, 5 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.84: +5 -4 lines
Diff to previous 1.84 (colored)

Allow all non-ephemeral buffers to be toggled writable or read-only
while mg is running: toggle-read-only-all

Revision 1.84 / (download) - annotate - [select for diffs], Fri Sep 16 17:17:40 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.83: +1 -3 lines
Diff to previous 1.83 (colored)

like the sparc port, ancient wisdom is ancient. consign to the archives.
ok beck

Revision 1.83 / (download) - annotate - [select for diffs], Thu Jul 14 08:31:18 2016 UTC (7 years, 10 months ago) by semarie
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.82: +3 -2 lines
Diff to previous 1.82 (colored)

make several program to use "chown" promise.

it allows chown(2) call to change the user or group on a file.

- usr.bin/compress : aka gzip
- usr.bin/mg : open a file for writing
- usr.bin/sed : inplace editing
- usr.bin/sort : if outfile equals one of the input files

ok deraadt@ tb@

(and a reminder from Remi Locherer)

warning: in order to use it, you must have a recent kernel with the new
promise.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Apr 14 17:05:32 2016 UTC (8 years, 1 month ago) by lum
Branch: MAIN
Changes since 1.81: +3 -1 lines
Diff to previous 1.81 (colored)

Add 'sentence-end-double-space'.

If you prefer "lighter" punctuation and one space between sentences,
for example:

Mr and Mrs Jones are from the UK. They arrived today.

over more liberal use of full stops and double spaces between
sentences:

Mr. and Mrs. Jones are from the U.K.  They arrived today.

then toggling 'sentence-end-double-space' will make mg's
fill-paragraph function format text using one space instead of two
(the default) between sentences. However, be careful, should you have
a double spaced document and accidentally "format" it to have single
spaces, then you may have a problem. mg won't be able to revert the
formatting for you (unless you have a previous version of the text in
the "undo" history, or are using mg's backup facility and haven't
opened and saved multiple times!).

Comments from schwarze@

Revision 1.81 / (download) - annotate - [select for diffs], Thu Dec 24 09:07:47 2015 UTC (8 years, 4 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.80: +9 -4 lines
Diff to previous 1.80 (colored)

Add -R option to allow files specified on the command line to be
opened read-only. ok jasper@ phessler@ and man page advice from jmc@

Revision 1.80 / (download) - annotate - [select for diffs], Thu Nov 19 19:30:44 2015 UTC (8 years, 6 months ago) by bentley
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (colored)

"tty proc exec", not "proc exec tty"

Revision 1.79 / (download) - annotate - [select for diffs], Wed Nov 11 15:37:34 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

needs pledge "getpw" also

Revision 1.78 / (download) - annotate - [select for diffs], Wed Nov 11 15:10:20 2015 UTC (8 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.77: +4 -1 lines
Diff to previous 1.77 (colored)

pledge "stdio rpath wpath cpath fattr proc exec tty" seems to work.
there are a few system, popen, fork...
ok florian

Revision 1.77 / (download) - annotate - [select for diffs], Sun Nov 8 19:31:57 2015 UTC (8 years, 6 months ago) by jasper
Branch: MAIN
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

whitespace

Revision 1.76 / (download) - annotate - [select for diffs], Thu Oct 29 19:46:47 2015 UTC (8 years, 6 months ago) by lum
Branch: MAIN
Changes since 1.75: +5 -1 lines
Diff to previous 1.75 (colored)

Fix opening dired from the command line. Incorrect cursor placement
and make the error more useful when there is a problem opening a
directory. Reported by and ok jasper@

Revision 1.75 / (download) - annotate - [select for diffs], Thu Mar 19 21:22:15 2015 UTC (9 years, 2 months ago) by bcallah
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.74: +11 -5 lines
Diff to previous 1.74 (colored)

Clean up the includes in mg.
This does the following:
Moves all POSIX headers from sysdef.h into the individual .c files so that
each file now only includes what it needs. All headers are properly sorted.
Moves the remainder of sysdef.h to other files (mostly def.h) and deletes
sysdef.h now that it's no longer contains anything.
Tweak a comment that references sysdef.h so that it no longer does that.
ok florian@

Revision 1.74 / (download) - annotate - [select for diffs], Sun Nov 16 04:16:41 2014 UTC (9 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.73: +2 -1 lines
Diff to previous 1.73 (colored)

Stop using <sys/param.h>; replace MAXPATHLEN with PATH_MAX, stop using MAX(),
and pull in <limits.h> for *_MAX constants.

inspired on a diff from Kamil Rytarowski (n54 (at) gmx.com)
ok bcallah@

Revision 1.73 / (download) - annotate - [select for diffs], Thu Nov 13 21:36:23 2014 UTC (9 years, 6 months ago) by florian
Branch: MAIN
Changes since 1.72: +2 -2 lines
Diff to previous 1.72 (colored)

Nuke GOOD define and just exit(0) on success. While there remove
unused MALLOCROUND define.
No binary change.
From Martin Natano (natano AT natano DOT net).
OK lum@

Revision 1.72 / (download) - annotate - [select for diffs], Sat Mar 22 11:05:37 2014 UTC (10 years, 2 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.71: +1 -5 lines
Diff to previous 1.71 (colored)

donebell is no longer required.

Revision 1.71 / (download) - annotate - [select for diffs], Fri May 31 18:03:44 2013 UTC (10 years, 11 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.70: +10 -4 lines
Diff to previous 1.70 (colored)

Make the system bell toggleable via 'audible-bell', and if switched
off, make available an alternative 'visible-bell'.

ok florian@ jasper@ Feedback Sunil Nimmagadda.

Revision 1.70 / (download) - annotate - [select for diffs], Fri Dec 28 16:12:50 2012 UTC (11 years, 4 months ago) by naddy
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.69: +4 -1 lines
Diff to previous 1.69 (colored)

Respect locale for ctype purposes, e.g. display ISO Latin 1 characters;
ok stsp@ reyk@

Document that multi-byte character sets are not supported; from stsp@

Revision 1.69 / (download) - annotate - [select for diffs], Fri Aug 31 18:06:42 2012 UTC (11 years, 8 months ago) by lum
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (colored)

Allow an error message for a filename that is too long to be seen and
let the error stop mg exiting when C-x C-c is called.

Revision 1.68 / (download) - annotate - [select for diffs], Thu Aug 30 06:09:12 2012 UTC (11 years, 8 months ago) by lum
Branch: MAIN
Changes since 1.67: +3 -1 lines
Diff to previous 1.67 (colored)

This diff allows the user to decide what to do with buffers that
experience write errors during C-x C-c (exiting mg). Emacs stops the
exiting process when it encounters problem buffers and lets the user
decide what to do, currently mg continues exiting and the contents of
these buffers are lost. This diff bring mg more into line with emacs.

Review and observations from Sunil Nimmagadda.

Revision 1.67 / (download) - annotate - [select for diffs], Tue May 29 06:08:48 2012 UTC (11 years, 11 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.66: +1 -4 lines
Diff to previous 1.66 (colored)

There is no other reference to SYSCLEANUP in the src tree. Remove.

Revision 1.66 / (download) - annotate - [select for diffs], Tue May 29 05:52:46 2012 UTC (11 years, 11 months ago) by lum
Branch: MAIN
Changes since 1.65: +13 -23 lines
Diff to previous 1.65 (colored)

There is no need to use an *init* buffer if we go back and update
opened file(s)/*scratch* with default modes after they are open.
Also, pass buffer (bp) to edinit(), this fixes theo mode from the
command line (mg -f theo).

Revision 1.65 / (download) - annotate - [select for diffs], Fri May 25 05:05:48 2012 UTC (11 years, 11 months ago) by lum
Branch: MAIN
Changes since 1.64: +18 -9 lines
Diff to previous 1.64 (colored)

Prepare mg buffers before startup file is parsed so multiple files can
be opened via the startup file. Having find-file, insert-file etc.. in
the startup file now work as you would expect.

Reviewed by Sunil Nimmagadda.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Apr 12 04:47:59 2012 UTC (12 years, 1 month ago) by lum
Branch: MAIN
Changes since 1.63: +1 -8 lines
Diff to previous 1.63 (colored)

Remove the conditional directives NO_MACRO and NO_STARTUP.
They have not compiled for numerous years.
ok kjell@ millert@

Revision 1.63 / (download) - annotate - [select for diffs], Thu Jan 26 04:14:11 2012 UTC (12 years, 3 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.62: +5 -3 lines
Diff to previous 1.62 (colored)

Tidy window and buffer NULL checks.

Reveiwed by Sunil Nimmagadda.

Revision 1.62 / (download) - annotate - [select for diffs], Mon Nov 28 04:41:39 2011 UTC (12 years, 5 months ago) by lum
Branch: MAIN
Changes since 1.61: +3 -1 lines
Diff to previous 1.61 (colored)

Add some ctags support to mg. From Sunil Nimmagadda.

Man page review and suggestions from jmc@

Revewied and tested by myself, and ok deraadt@

Revision 1.61 / (download) - annotate - [select for diffs], Thu Jun 4 02:23:37 2009 UTC (14 years, 11 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (colored)

Rename w_flag to w_rflag. This is not a general purpose
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing one.

Turdshine. No functional chage.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Jun 13 18:51:02 2008 UTC (15 years, 11 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.59: +1 -3 lines
Diff to previous 1.59 (colored)

Remove mail-mode. It was a buggy reimplementation of auto-fill-mode.
If you use this, change your habits (and .mg) to use the following
commands instead:

mail-mode => auto-fill-mode
mail-set-margin => set-fill-column

ok henning@. Will also "fix" debian bug #460189

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jun 13 18:41:57 2008 UTC (15 years, 11 months ago) by kjell
Branch: MAIN
Changes since 1.58: +21 -6 lines
Diff to previous 1.58 (colored)

Fix autoexec file handling.
Two issues: *scratch* did not inherit any modes set from
~/.mg, as it was created too early. Switch to using *init* buffer
until after autoexec, then kill it and inherit correct *scratch*.
Second, -f should force the mode. Not toggle it.
ok phessler@

Revision 1.58 / (download) - annotate - [select for diffs], Thu Jun 12 01:58:44 2008 UTC (15 years, 11 months ago) by kjell
Branch: MAIN
Changes since 1.57: +3 -1 lines
Diff to previous 1.57 (colored)

Introduce a basic c-mode to mg.

The intent of this mode is NOT to copy emacs's monster cc-mode.
It is intended to handle basic KNF-format C, assisting
with indentation (to catch obvious typos), and strip
trailing whitespace. It is NOT enabled unless you ask for it (c-mode).

Basically, tab on start-of-line whitespace acts like tab.
Otherwise, tab indents.

Please try it out and let me know where it falls down.

Feedback Reyk, phessler. "hack in tree" from henning, theo

Revision 1.57 / (download) - annotate - [select for diffs], Thu May 29 19:58:15 2008 UTC (15 years, 11 months ago) by sobrado
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

add a detailed synopsis to mg(1); synchronize with usage.

tweaks by jmc@

ok jmc@

Revision 1.56 / (download) - annotate - [select for diffs], Tue Feb 20 04:39:45 2007 UTC (17 years, 3 months ago) by cloder
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.55: +3 -5 lines
Diff to previous 1.55 (colored)

Remove useless -h option (if you don't know the synopsis, how do you know
-h?). OK deraadt

Revision 1.55 / (download) - annotate - [select for diffs], Sun Nov 19 16:51:19 2006 UTC (17 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

spacing

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jul 25 08:22:32 2006 UTC (17 years, 9 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Rename the header line of a buffer to b_headp, from the remarkably
unintuitive b_linep. No binary change.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jul 17 14:11:55 2006 UTC (17 years, 10 months ago) by kjell
Branch: MAIN
Changes since 1.52: +20 -7 lines
Diff to previous 1.52 (colored)

Better usage() wording. Add -h to mean same. Some whitespace clean

Revision 1.52 / (download) - annotate - [select for diffs], Thu Jun 1 05:34:52 2006 UTC (17 years, 11 months ago) by jason
Branch: MAIN
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored)

make // /~ path rewriting optional in adjustname() and use it everywhere
except for the command line specified files.  ok kjell,cloder

Revision 1.51 / (download) - annotate - [select for diffs], Sun May 28 23:30:16 2006 UTC (17 years, 11 months ago) by kjell
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

Make Window Flags more mnemonic (and less dumb); i.e.
WFHARD -> WFFULL (Redraw full window)
WFFORCE -> WFFRAME (Reframe window).
No binary change

Revision 1.50 / (download) - annotate - [select for diffs], Mon Apr 3 02:43:22 2006 UTC (18 years, 1 month ago) by kjell
Branch: MAIN
Changes since 1.49: +4 -4 lines
Diff to previous 1.49 (colored)

fixed "text in message line would get stuck there" issue.
feedback from Philip Guenther and Han Boetes

Revision 1.49 / (download) - annotate - [select for diffs], Sat Feb 25 14:40:16 2006 UTC (18 years, 2 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.48: +2 -2 lines
Diff to previous 1.48 (colored)

Fix a coredump occurring when the terminal is resized while mg is
suspended. Problem reported and fixed tested by reyk@; tweak by
kjell@; ok kjell@

Revision 1.48 / (download) - annotate - [select for diffs], Tue Dec 13 06:01:27 2005 UTC (18 years, 5 months ago) by kjell
Branch: MAIN
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

More name-clash delinting

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 20 18:47:11 2005 UTC (18 years, 6 months ago) by kjell
Branch: MAIN
Changes since 1.46: +1 -3 lines
Diff to previous 1.46 (colored)

#ifdef NO_DIR can go too. From Han Boetes.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Nov 20 03:24:17 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.45: +1 -3 lines
Diff to previous 1.45 (colored)

toast NO_DIRED #ifdef; ok kjell

Revision 1.45 / (download) - annotate - [select for diffs], Fri Nov 18 20:56:53 2005 UTC (18 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.44: +7 -7 lines
Diff to previous 1.44 (colored)

greedy use of typedef struct was making code harder to read; ok kjell cloder

Revision 1.44 / (download) - annotate - [select for diffs], Thu Oct 13 20:43:17 2005 UTC (18 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.43: +3 -3 lines
Diff to previous 1.43 (colored)

toast unused variable

Revision 1.43 / (download) - annotate - [select for diffs], Thu Oct 13 20:41:09 2005 UTC (18 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

use strtonum() correctly

Revision 1.42 / (download) - annotate - [select for diffs], Thu Oct 13 05:47:45 2005 UTC (18 years, 7 months ago) by kjell
Branch: MAIN
Changes since 1.41: +6 -1 lines
Diff to previous 1.41 (colored)

Fix dired mode. Make deletions work, and keystrokes match emacs.
* dired-other-window should default to current buffer's path.
* Remove redundant code (from Han Boetes)
* Move initialization (and since we're here, fix mail-mode initialization
  too)
* Remove redundant keymap in dired.c, and replace it with
  the better one that was being ignored in keymap.c.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Aug 9 00:53:48 2005 UTC (18 years, 9 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Clean up eread handling in mg. (basically, fallout from the 'enter often
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.

Revision 1.40 / (download) - annotate - [select for diffs], Tue Jun 14 18:14:40 2005 UTC (18 years, 11 months ago) by kjell
Branch: MAIN
Changes since 1.39: +3 -1 lines
Diff to previous 1.39 (colored)

Add explicit public domain notices to all public domain files.
ok millert@, deraadt@

Revision 1.39 / (download) - annotate - [select for diffs], Thu Apr 21 19:16:21 2005 UTC (19 years, 1 month ago) by beck
Branch: MAIN
Changes since 1.38: +5 -2 lines
Diff to previous 1.38 (colored)

correct strlcpy abuse, and always check for NULL return from find_buffer
ok cloder@, feedback from many

Revision 1.38 / (download) - annotate - [select for diffs], Sun Apr 3 02:09:28 2005 UTC (19 years, 1 month ago) by db
Branch: MAIN
Changes since 1.37: +17 -17 lines
Diff to previous 1.37 (colored)

This is a no binary change which does:

- spelling, punctuation fixes
- variable declaration lineup
- use parentheses for return and sizeof
- K&R function declarations -> ANSI
- other minor code beautification

ok henning@

Revision 1.37 / (download) - annotate - [select for diffs], Sat Mar 12 10:36:13 2005 UTC (19 years, 2 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.36: +2 -2 lines
Diff to previous 1.36 (colored)

sync usage() w/ synopsis;

Revision 1.36 / (download) - annotate - [select for diffs], Sat Mar 12 06:16:07 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

spacing

Revision 1.35 / (download) - annotate - [select for diffs], Thu Mar 10 16:47:33 2005 UTC (19 years, 2 months ago) by henning
Branch: MAIN
Changes since 1.34: +9 -2 lines
Diff to previous 1.34 (colored)

add -n command line switch to disable backup file generation, handy
when you use mg for your mail from within mutt etc
from PR3930, Carson Harding <harding@motd.ca>, Thanks!

Revision 1.34 / (download) - annotate - [select for diffs], Wed Mar 9 16:20:48 2005 UTC (19 years, 2 months ago) by jfb
Branch: MAIN
Changes since 1.33: +9 -6 lines
Diff to previous 1.33 (colored)

fix mg's behaviour with regards to files on which we do not have
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@

Revision 1.33 / (download) - annotate - [select for diffs], Mon Jul 19 12:14:08 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

correct error checking for strtonum, from mjc@bitz.ca

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jul 11 23:46:17 2004 UTC (19 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

oops

I just realized I gave a really bad advise to pval, negative goto-line are
entirely valid (mean # of lines from end of file)

go back to INT_MIN as the lower bound

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jul 11 20:37:15 2004 UTC (19 years, 10 months ago) by pvalchev
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

change lower bound to 0, row shouldn't be negative; suggested & ok vincent

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jul 11 20:36:32 2004 UTC (19 years, 10 months ago) by pvalchev
Branch: MAIN
Changes since 1.29: +6 -11 lines
Diff to previous 1.29 (colored)

use strtonum instead of strtoul and don't abuse a long for int
functionality; ok vincent

Revision 1.29 / (download) - annotate - [select for diffs], Mon Feb 2 20:21:14 2004 UTC (20 years, 3 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.28: +7 -3 lines
Diff to previous 1.28 (colored)

be just like gnu emacs when more than 2 files are specified on the command
line: create a buffer list window

Revision 1.28 / (download) - annotate - [select for diffs], Tue Jan 27 23:43:37 2004 UTC (20 years, 3 months ago) by vincent
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

make mail-mode more intelligent on middle-of-line insertions, and add a
comment to change the wrapping column. (mail-set-margin)

tested by henning and phessler, thanks!

Revision 1.27 / (download) - annotate - [select for diffs], Thu Dec 4 01:52:01 2003 UTC (20 years, 5 months ago) by vincent
Branch: MAIN
Changes since 1.26: +11 -9 lines
Diff to previous 1.26 (colored)

split the screen in multiple windows when more than one files are given
on the command line

ok deraadt

Revision 1.26 / (download) - annotate - [select for diffs], Mon Oct 27 11:21:12 2003 UTC (20 years, 6 months ago) by vincent
Branch: MAIN
Changes since 1.25: +2 -9 lines
Diff to previous 1.25 (colored)

fix crash on startup by using the good allocation routine in edinit()

spotted and ok by henning

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jun 26 23:04:10 2003 UTC (20 years, 10 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.24: +3 -3 lines
Diff to previous 1.24 (colored)

protos

ok deraadt

Revision 1.24 / (download) - annotate - [select for diffs], Mon May 5 11:12:07 2003 UTC (21 years ago) by vincent
Branch: MAIN
Changes since 1.23: +50 -22 lines
Diff to previous 1.23 (colored)

add a mail-mode, to do automatic line-wrapping.

(at the same time, change the command line parsing to support a
 -f <mode> that is slightly different from the one in gnu emacs,
we apply it to all buffers created from command line arguments,
so you can use "mg -f mail-mode" as your editor. manpage change
coming soon)

ok henning

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 6 17:04:09 2003 UTC (21 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.22: +22 -2 lines
Diff to previous 1.22 (colored)

support +number; rewritten from buggy code by mjc@bitz.ca, vincent ok

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jul 25 16:37:54 2002 UTC (21 years, 9 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.21: +6 -4 lines
Diff to previous 1.21 (colored)

 replace the ugly and buggy adjustname function by a simple one using
simple APIs. makes mg not crash with 65k filenames...

 ok art@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jul 3 03:47:59 2002 UTC (21 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.20: +3 -1 lines
Diff to previous 1.20 (colored)

 a few missing tests for malloc()'s return value.

 ok art@

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jul 1 14:33:44 2002 UTC (21 years, 10 months ago) by vincent
Branch: MAIN
Changes since 1.19: +4 -6 lines
Diff to previous 1.19 (colored)

KNF + ansi; from zyrnix (only the easy part of his diffs)

Revision 1.19 / (download) - annotate - [select for diffs], Mon Mar 18 01:45:55 2002 UTC (22 years, 2 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.18: +3 -6 lines
Diff to previous 1.18 (colored)

 Enter the new undo code.  it is still disabled since it has bugs, but it's
somewhat more useful....

 ok millert@ + no objections on ICB

Revision 1.18 / (download) - annotate - [select for diffs], Thu Feb 21 15:27:29 2002 UTC (22 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.17: +1 -4 lines
Diff to previous 1.17 (colored)

KNF

Revision 1.17 / (download) - annotate - [select for diffs], Thu Feb 21 00:02:04 2002 UTC (22 years, 3 months ago) by deraadt
Branch: MAIN
Changes since 1.16: +5 -1 lines
Diff to previous 1.16 (colored)

signal-safe window size changing

Revision 1.16 / (download) - annotate - [select for diffs], Wed Feb 20 22:30:54 2002 UTC (22 years, 3 months ago) by vincent
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored)

 Add undo code to mg.

 needs further hacking.

 ok `whole bunch of people on icb'@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:49 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Part one of userland __P removal.  Done with a simple regexp with some minor hand editing to make comments line up correctly.  Another pass is forthcoming that handles the cases that could not be done automatically.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Jun 23 04:22:44 2001 UTC (22 years, 11 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.13: +3 -1 lines
Diff to previous 1.13 (colored)

Add "M-x theo". Just like "M-x doctor" in emacs... Well, almost.

More beer!

Revision 1.13 / (download) - annotate - [select for diffs], Thu May 24 10:58:34 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.12: +11 -1 lines
Diff to previous 1.12 (colored)

Add a compile/grep/id-utils mode.

The only pollution this code introduces in the rest of thed code is a call to
an init function in main(). In the future we might want to load extensions
like this dynamically.

Of course I did the test compile in the compile mode.

Revision 1.12 / (download) - annotate - [select for diffs], Thu May 24 10:43:19 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

Make the keymap/mode table growable in runtime.

Revision 1.11 / (download) - annotate - [select for diffs], Thu May 24 09:47:34 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)

Break out function -> name mappings to an own file.
Add a possibility to dynamically extend the function table.

Revision 1.10 / (download) - annotate - [select for diffs], Thu May 24 03:05:24 2001 UTC (23 years ago) by mickey
Branch: MAIN
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)

spaces

Revision 1.9 / (download) - annotate - [select for diffs], Wed May 23 23:29:48 2001 UTC (23 years ago) by mickey
Branch: MAIN
Changes since 1.8: +1 -2 lines
Diff to previous 1.8 (colored)

cinfo is const, keyname() and findbind() take buffer size to use strlcpy vs cpy+len

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 23 22:36:15 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored)

Get rid of unnecessary casts of NULL.

Revision 1.7 / (download) - annotate - [select for diffs], Wed May 23 22:20:35 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.6: +6 -6 lines
Diff to previous 1.6 (colored)

remove VOID. We're way beyond the point where this could build with an
ancient compiler.

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jan 29 01:58:08 2001 UTC (23 years, 3 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.5: +2 -0 lines
Diff to previous 1.5 (colored)

$OpenBSD$

Revision 1.5 / (download) - annotate - [select for diffs], Fri Sep 1 14:59:09 2000 UTC (23 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.4: +59 -60 lines
Diff to previous 1.4 (colored)

More -Wall anmd KNF, from op2@tomahawk.SQUiSH.org

Revision 1.4 / (download) - annotate - [select for diffs], Thu Apr 13 06:12:16 2000 UTC (24 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.3: +68 -60 lines
Diff to previous 1.3 (colored)

The start of KNF + -Wall.  The code has been run through indent but
needs hand fixup.  I stopped at keymap.c...

Revision 1.3 / (download) - annotate - [select for diffs], Sat Feb 26 22:53:16 2000 UTC (24 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2 (colored)

change WINDOW -> MGWIN to avoid curses type conflict
convert to terminfo in tty*.c
add support for some keypad function keys (arrows, pgup, pgdown)

Revision 1.2 / (download) - annotate - [select for diffs], Fri Feb 25 19:09:48 2000 UTC (24 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.1: +1 -1 lines
Diff to previous 1.1 (colored)

make it minimally compile; millert

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 25 19:08:49 2000 UTC (24 years, 2 months ago) by deraadt
Branch: MAIN

initial import of mg2a

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.