Skip to content

Commit

Permalink
Let's get this going again. mg-7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ibara committed Jul 25, 2023
1 parent 053f809 commit caf7703
Show file tree
Hide file tree
Showing 46 changed files with 908 additions and 835 deletions.
106 changes: 53 additions & 53 deletions CVS/Entries
@@ -1,54 +1,54 @@
/version.c/1.10/Thu Mar 19 21:22:15 2015//
/word.c/1.19/Sun Jan 3 04:14:49 2016//
/tags.c/1.16/Result of merge//
/fileio.c/1.108/Result of merge//
/funmap.c/1.63/Result of merge//
/Makefile/1.35/Sat Jun 12 14:25:50 2021//
/README/1.14/Sat Jun 12 14:25:50 2021//
/autoexec.c/1.18/Sat Jun 12 14:25:34 2021//
/basic.c/1.50/Sat Jun 12 14:25:34 2021//
/bell.c/1.6/Sat Jun 12 14:25:50 2021//
/buffer.c/1.112/Sat Jun 12 14:25:34 2021//
/chrdef.h/1.10/Sat Jun 12 14:25:34 2021//
/cinfo.c/1.18/Sat Jun 12 14:25:34 2021//
/cmode.c/1.17/Sat Jun 12 14:25:34 2021//
/cscope.c/1.20/Sat Jun 12 14:25:34 2021//
/def.h/1.176/Result of merge//
/dir.c/1.31/Sat Jun 12 14:25:34 2021//
/dired.c/1.100/Sat Jun 12 14:25:50 2021//
/display.c/1.48/Sat Jun 12 14:25:34 2021//
/echo.c/1.68/Sat Jun 12 14:25:34 2021//
/extend.c/1.75/Result of merge//
/file.c/1.102/Sat Jun 12 14:25:34 2021//
/funmap.h/1.8/Sat Jun 12 14:25:34 2021//
/grep.c/1.49/Sat Jun 12 14:25:34 2021//
/help.c/1.35/Sat Jun 12 14:25:34 2021//
/interpreter.c/1.32/Sat Jun 12 14:25:50 2021//
/kbd.c/1.35/Sat Jun 12 14:25:34 2021//
/kbd.h/1.19/Sat Jun 12 14:25:34 2021//
/key.h/1.6/Sat Jun 12 14:25:34 2021//
/keymap.c/1.59/Sat Jun 12 14:25:34 2021//
/line.c/1.63/Sat Jun 12 14:25:34 2021//
/log.c/1.12/Sat Jun 12 14:25:34 2021//
/log.h/1.6/Sat Jun 12 14:25:34 2021//
/macro.c/1.16/Sat Jun 12 14:25:34 2021//
/macro.h/1.7/Sat Jun 12 14:25:34 2021//
/main.c/1.90/Result of merge//
/match.c/1.22/Sat Jun 12 14:25:34 2021//
/mg.1/1.125/Sat Jun 12 14:25:50 2021//
/modes.c/1.21/Sat Jun 12 14:25:34 2021//
/paragraph.c/1.46/Sat Jun 12 14:25:34 2021//
/pathnames.h/1.1/Sat Jun 12 14:25:34 2021//
/re_search.c/1.36/Sat Jun 12 14:25:34 2021//
/region.c/1.39/Sat Jun 12 14:25:34 2021//
/search.c/1.47/Sat Jun 12 14:25:34 2021//
/spawn.c/1.12/Sat Jun 12 14:25:34 2021//
/tty.c/1.39/Sat Jun 12 14:25:34 2021//
/ttyio.c/1.40/Sat Jun 12 14:25:34 2021//
/ttykbd.c/1.20/Sat Jun 12 14:25:34 2021//
/tutorial/1.18/Sat Jun 12 14:25:34 2021//
/undo.c/1.58/Sat Jun 12 14:25:34 2021//
/util.c/1.43/Sat Jun 12 14:25:34 2021//
/window.c/1.36/Sat Jun 12 14:25:34 2021//
/yank.c/1.15/Sat Jun 12 14:25:34 2021//
/Makefile/1.35/Tue Jul 25 20:51:27 2023//
/README/1.14/Tue Jul 25 20:51:27 2023//
/autoexec.c/1.19/Tue Jul 25 20:51:27 2023//
/basic.c/1.54/Tue Jul 25 20:51:27 2023//
/bell.c/1.7/Tue Jul 25 20:51:27 2023//
/buffer.c/1.114/Tue Jul 25 20:51:27 2023//
/chrdef.h/1.10/Tue Jul 25 20:51:20 2023//
/cinfo.c/1.18/Tue Jul 25 20:51:20 2023//
/cmode.c/1.22/Tue Jul 25 20:51:27 2023//
/cscope.c/1.22/Tue Jul 25 20:51:27 2023//
/def.h/1.180/Result of merge//
/dir.c/1.33/Tue Jul 25 20:51:27 2023//
/dired.c/1.102/Tue Jul 25 20:51:27 2023//
/display.c/1.52/Tue Jul 25 20:51:27 2023//
/echo.c/1.69/Tue Jul 25 20:51:27 2023//
/extend.c/1.80/Result of merge//
/file.c/1.103/Tue Jul 25 20:51:27 2023//
/fileio.c/1.111/Result of merge//
/funmap.c/1.67/Result of merge//
/funmap.h/1.8/Tue Jul 25 20:51:20 2023//
/grep.c/1.50/Tue Jul 25 20:51:27 2023//
/help.c/1.37/Tue Jul 25 20:51:27 2023//
/interpreter.c/1.35/Tue Jul 25 20:51:27 2023//
/kbd.c/1.37/Tue Jul 25 20:51:27 2023//
/kbd.h/1.19/Tue Jul 25 20:51:20 2023//
/key.h/1.6/Tue Jul 25 20:51:20 2023//
/keymap.c/1.61/Tue Jul 25 20:51:27 2023//
/line.c/1.63/Tue Jul 25 20:51:20 2023//
/log.c/1.13/Tue Jul 25 20:51:27 2023//
/log.h/1.6/Tue Jul 25 20:51:20 2023//
/macro.c/1.18/Tue Jul 25 20:51:27 2023//
/macro.h/1.7/Tue Jul 25 20:51:20 2023//
/main.c/1.95/Result of merge//
/match.c/1.25/Tue Jul 25 20:51:27 2023//
/mg.1/1.135/Tue Jul 25 20:51:27 2023//
/modes.c/1.22/Tue Jul 25 20:51:27 2023//
/paragraph.c/1.49/Tue Jul 25 20:51:27 2023//
/pathnames.h/1.1/Tue Jul 25 20:51:20 2023//
/re_search.c/1.37/Tue Jul 25 20:51:27 2023//
/region.c/1.44/Tue Jul 25 20:51:27 2023//
/search.c/1.50/Tue Jul 25 20:51:28 2023//
/spawn.c/1.13/Tue Jul 25 20:51:28 2023//
/tags.c/1.27/Result of merge//
/tty.c/1.40/Tue Jul 25 20:51:28 2023//
/ttyio.c/1.40/Tue Jul 25 20:51:20 2023//
/ttykbd.c/1.22/Tue Jul 25 20:51:28 2023//
/tutorial/1.19/Tue Jul 25 20:51:28 2023//
/undo.c/1.59/Tue Jul 25 20:51:28 2023//
/util.c/1.50/Tue Jul 25 20:51:28 2023//
/version.c/1.11/Result of merge//
/window.c/1.37/Tue Jul 25 20:51:28 2023//
/yank.c/1.16/Tue Jul 25 20:51:28 2023//
/word.c/1.21/Tue Jul 25 20:52:01 2023//
D
93 changes: 93 additions & 0 deletions README
@@ -0,0 +1,93 @@
[This is an edited version of the original mg README, updated slightly to
reflect changes in the last 20 years.]


Mg (mg) is a Public Domain EMACS style editor. It is "broadly"
compatible with GNU Emacs, the latest creation of Richard M.
Stallman, Chief GNUisance and inventor of Emacs. GNU Emacs (and other
portions of GNU as they are released) are essentially free, (there are
handling charges for obtaining it) and so is Mg. You may never have
to learn another editor. (But probably will, at least long enough to
port Mg...) Mg was formerly named MicroGnuEmacs, the name change was
done at the request of Richard Stallman.

Mg is not associated with the GNU project, and it does not have the
copyright restrictions present in GNU Emacs. (However, some modules
do have copyright notices.) The Mg authors individually may or may
not agree with the opinions expressed by Richard Stallman in "The GNU
Manifesto".

This program is intended to be a small, fast, and portable editor for
people who can't (or don't want to) run real Emacs for one reason
or another. It is compatible with GNU because there shouldn't be
any reason to learn more than one Emacs flavor.


Beyond the work of Dave Conroy, author of the original public domain
v30, the current version contains the work of:

blarson@ecla.usc.edu Bob Larson
mic@emx.utexas.edu Mic Kaczmarczik
mwm@violet.berkeley.edu Mike Meyer
sandra@cs.utah.edu Sandra Loosemore
mp1u+@andrew.cmu.edu Michael Portuesi
RCKG01M@CALSTATE.BITNET Stephen Walton
hakanson@mist.cs.orst.edu Marion Hakanson

People who have worked on previous versions of Mg:

rtech!daveb@sun.com Dave Brower

Early release history:

* Nov 16, 1986: First release to mod.sources
* Mar 3, 1987: First Release (mg1a) via comp.sources.unix
* May 26, 1988: Second release: (mg2a) via comp.sources.misc
* Jan 26, 1992: Linux port released by Charles Hedrick. This version
later makes its way onto tsx-11, Infomagic, and various other Linux
repositories.
* Feb 25, 2000: First import into the OpenBSD tree, where it is
currently maintained with contributions from many others.

----------------------------------------------------------------------

Known limitations:

Recursive bindings may cause help and key rebinding code to go into
an infinite loop, aborting with a stack overflow.

Overwrite mode does not work in macros. (Characters are inserted
rather than overwriting.)

Dired mode has some problems: .. and . are not recognized as special
cases. Also, mg uses the output of the command 'ls' to populate a
dired buffer. This is not ideal, dired mode should probably be
rewritten to use the directory(3) set of functions.

On systems with 16 bit integers, the kill buffer cannot exceed 32767
bytes.

Unlike GNU Emacs, Mg's minibuffer isn't multi-line aware and hence
some commands like "shell-command-on-region" always pop up a buffer to
display output irrespective of output's size.

While navigating source code using Mg's cscope commands, the cursor
is always at the match location rather than in *cscope* buffer. Mg uses
the same keybindings of GNU Emacs's xcscope package for it's cscope commands.
As Mg's keybindings are case-insensitive some of the commands don't have a
default keybinding.

New implementation oddities:

insert and define-key are new commands corresponding to the mocklisp
functions in GNU Emacs. (Mg does not have non-command functions.)
(Mg's insert will only insert one string.)

The display wrap code does not work at all like that of GNU emacs.

Some commands that do not mimic emacs exactly don't have a "standard"
emacs name. For example 'backup-to-home-directory' is only a partial
implementation of emacs' range of commands that allow a user to
customise the backup file location. If a more complete implementation
were coded of these commands the non standard commands would probably
be removed.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -59,4 +59,4 @@ reach out to the tech@ mailing list on OpenBSD.
Get a tarball
-------------
See the Releases tab on GitHub.
The latest version is mg-7.0.
The latest version is mg-7.3.
3 changes: 1 addition & 2 deletions autoexec.c
@@ -1,4 +1,4 @@
/* $OpenBSD: autoexec.c,v 1.18 2021/04/21 14:45:28 lum Exp $ */
/* $OpenBSD: autoexec.c,v 1.19 2023/03/08 04:43:11 guenther Exp $ */
/* this file is in the public domain */
/* Author: Vincent Labrecque <vincent@openbsd.org> April 2002 */

Expand Down Expand Up @@ -93,7 +93,6 @@ add_autoexec(const char *pattern, const char *func)
* function to execute when a file matching the specified pattern
* is read into a buffer.
*/
/* ARGSUSED */
int
auto_execute(int f, int n)
{
Expand Down
26 changes: 4 additions & 22 deletions basic.c
@@ -1,4 +1,4 @@
/* $OpenBSD: basic.c,v 1.50 2021/02/27 13:24:52 lum Exp $ */
/* $OpenBSD: basic.c,v 1.54 2023/04/21 13:39:36 op Exp $ */

/* This file is in the public domain */

Expand Down Expand Up @@ -26,7 +26,6 @@
/*
* Go to beginning of line.
*/
/* ARGSUSED */
int
gotobol(int f, int n)
{
Expand All @@ -43,7 +42,6 @@ gotobol(int f, int n)
* 0. Error if you try to move back from
* the beginning of the buffer.
*/
/* ARGSUSED */
int
backchar(int f, int n)
{
Expand Down Expand Up @@ -72,7 +70,6 @@ backchar(int f, int n)
/*
* Go to end of line.
*/
/* ARGSUSED */
int
gotoeol(int f, int n)
{
Expand All @@ -89,7 +86,6 @@ gotoeol(int f, int n)
* 0. Error if you try to move forward
* from the end of the buffer.
*/
/* ARGSUSED */
int
forwchar(int f, int n)
{
Expand Down Expand Up @@ -182,7 +178,6 @@ gotoeob(int f, int n)
* actually do it. The last command controls how
* the goal column is set.
*/
/* ARGSUSED */
int
forwline(int f, int n)
{
Expand Down Expand Up @@ -226,7 +221,6 @@ forwline(int f, int n)
* call your alternate. Figure out the new line and
* call "movedot" to perform the motion.
*/
/* ARGSUSED */
int
backline(int f, int n)
{
Expand Down Expand Up @@ -280,16 +274,10 @@ getgoal(struct line *dlp)
int c, i, col = 0;
char tmp[5];


for (i = 0; i < llength(dlp); i++) {
c = lgetc(dlp, i);
if (c == '\t'
#ifdef NOTAB
&& !(curbp->b_flag & BFNOTAB)
#endif
) {
col |= 0x07;
col++;
if (c == '\t') {
col = ntabstop(col, curbp->b_tabw);
} else if (ISCTRL(c) != FALSE) {
col += 2;
} else if (isprint(c))
Expand All @@ -311,7 +299,6 @@ getgoal(struct line *dlp)
* the window is zapped, we have to do a hard
* update and get it back.
*/
/* ARGSUSED */
int
forwpage(int f, int n)
{
Expand Down Expand Up @@ -355,7 +342,6 @@ forwpage(int f, int n)
* hard update is done because the top line in
* the window is zapped.
*/
/* ARGSUSED */
int
backpage(int f, int n)
{
Expand Down Expand Up @@ -460,7 +446,6 @@ isetmark(void)
* to the value of dot. A message is written to
* the echo line. (ewprintf knows about macros)
*/
/* ARGSUSED */
int
setmark(int f, int n)
{
Expand All @@ -470,7 +455,6 @@ setmark(int f, int n)
}

/* Clear the mark, if set. */
/* ARGSUSED */
int
clearmark(int f, int n)
{
Expand All @@ -491,7 +475,6 @@ clearmark(int f, int n)
* that moves the mark about. The only possible
* error is "no mark".
*/
/* ARGSUSED */
int
swapmark(int f, int n)
{
Expand Down Expand Up @@ -521,7 +504,6 @@ swapmark(int f, int n)
* it is the line number, else prompt for a line number
* to use.
*/
/* ARGSUSED */
int
gotoline(int f, int n)
{
Expand All @@ -536,7 +518,7 @@ gotoline(int f, int n)
return (ABORT);
n = (int)strtonum(buf, INT_MIN, INT_MAX, &err);
if (err)
return(dobeep_msgs("Line number %s", err));
return(dobeep_msgs("Line number", err));
}
return(setlineno(n));
}
Expand Down
4 changes: 1 addition & 3 deletions bell.c
@@ -1,4 +1,4 @@
/* $OpenBSD: bell.c,v 1.6 2021/05/06 12:44:21 lum Exp $ */
/* $OpenBSD: bell.c,v 1.7 2023/03/08 04:43:11 guenther Exp $ */

/*
* This file is in the public domain.
Expand Down Expand Up @@ -65,7 +65,6 @@ dobeep(void)
}
}

/* ARGSUSED */
int
toggleaudiblebell(int f, int n)
{
Expand All @@ -77,7 +76,6 @@ toggleaudiblebell(int f, int n)
return (TRUE);
}

/* ARGSUSED */
int
togglevisiblebell(int f, int n)
{
Expand Down

0 comments on commit caf7703

Please sign in to comment.