Portable version of the OpenBSD maintained mg, micro emacs clone
Switch branches/tags
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CVS Upstream commit from Reyk@ with the following commit message: Sep 25, 2018
.cvsignore update Jan 24, 2016
.gitignore improve gitignore Apr 7, 2018
.mg Add all files, CVS dir and all. Jan 24, 2016
CMakeLists.txt Add CMakeLists.txt Sep 28, 2018
GNUmakefile Support DragonFlyBSD Aug 31, 2018
Makefile Add CMakeLists.txt Sep 28, 2018
README Add all files, CVS dir and all. Jan 24, 2016
README.md Add documentation and kudos for the CMake support. Thanks @mazocomp Sep 28, 2018
autoexec.c Add all files, CVS dir and all. Jan 24, 2016
basic.c Add all files, CVS dir and all. Jan 24, 2016
bell.c Add all files, CVS dir and all. Jan 24, 2016
buffer.c Lots of upstream bugfixes Aug 28, 2017
chrdef.h Add all files, CVS dir and all. Jan 24, 2016
cinfo.c Add all files, CVS dir and all. Jan 24, 2016
cmode.c Add all files, CVS dir and all. Jan 24, 2016
cscope.c Mainly upstream merges, and a typo from me. Oct 14, 2017
def.h Merge pull request #4 from mazocomp/master Sep 27, 2018
dir.c Lots of upstream bugfixes Aug 28, 2017
dired.c Support DragonFlyBSD Aug 31, 2018
display.c Lots of upstream bugfixes Aug 28, 2017
echo.c Push two minor upstream diffs Nov 26, 2016
extend.c New upstream releases, mostly from reports by Joachim Nilsson, who Sep 12, 2016
file.c Add all files, CVS dir and all. Jan 24, 2016
fileio.c Upstream override of my previous patch. Apr 19, 2018
funmap.c Upstream commit from Reyk@ with the following commit message: Sep 25, 2018
funmap.h Add all files, CVS dir and all. Jan 24, 2016
grep.c upstream sync Mar 28, 2018
help.c Add all files, CVS dir and all. Jan 24, 2016
kbd.c Add all files, CVS dir and all. Jan 24, 2016
kbd.h Add all files, CVS dir and all. Jan 24, 2016
key.h Add all files, CVS dir and all. Jan 24, 2016
keymap.c Add all files, CVS dir and all. Jan 24, 2016
line.c Upstream commit from Reyk@ with the following commit message: Sep 25, 2018
macro.c Add all files, CVS dir and all. Jan 24, 2016
macro.h Add all files, CVS dir and all. Jan 24, 2016
main.c Add CMakeLists.txt Sep 28, 2018
match.c Add all files, CVS dir and all. Jan 24, 2016
mg.1 Upstream commit from Reyk@ with the following commit message: Sep 25, 2018
modes.c Lots of upstream bugfixes Aug 28, 2017
paragraph.c New upstream releases, mostly from reports by Joachim Nilsson, who Sep 12, 2016
pathnames.h Add all files, CVS dir and all. Jan 24, 2016
re_search.c Patch from the alpine linux team, to build mg with musl libc. Next Apr 8, 2018
reallocarray.c Support DragonFlyBSD Aug 31, 2018
region.c New upstream releases, mostly from reports by Joachim Nilsson, who Sep 12, 2016
search.c Af few upstream commits, as pointed out by Leonid Bobrov Jul 13, 2018
spawn.c Add all files, CVS dir and all. Jan 24, 2016
tags.c Support DragonFlyBSD Aug 31, 2018
tty.c Add all files, CVS dir and all. Jan 24, 2016
ttyio.c Add all files, CVS dir and all. Jan 24, 2016
ttykbd.c upstream sync Mar 28, 2018
tutorial upstream commit to the tutorial, as pointed out by: Leonid Bobrov May 28, 2018
undo.c Support DragonFlyBSD Aug 31, 2018
util.c Add all files, CVS dir and all. Jan 24, 2016
version.c Add all files, CVS dir and all. Jan 24, 2016
window.c Add all files, CVS dir and all. Jan 24, 2016
word.c Add all files, CVS dir and all. Jan 24, 2016
yank.c Add all files, CVS dir and all. Jan 24, 2016

README.md

PORTING MG AND USING LIBBSD

I've maintained and ported mg for quite some time now and at first it was easy recently it got harder and harder since it was a moving target. Especially the inclusion of some system specific libraries since about 2 years ago made it too much of an effort for my humble coding skills.

So recently Jasper Lievisse Adriaanse asked me to try it again and I restarted working on the project and ran into exactly the same problems again. While googling for solutions I ran into libbsd:

http://libbsd.freedesktop.org/wiki/

It's a porting library for OpenBSD code! And after installing that it was a piece of pie to get mg ported again.

PORTING TO ALL OTHER PLATFORMS

Okay, that was debian. Now I have to get the rest of all the previously suported platforms working again. All help is welcome and as always: Please provide patches that do not break stuff for other platforms.

BUILDING MG

So, basic instructions for building mg:

  • Get the libbsd and libncurses dev packages installed.
  • Run the following commands:
make
sudo make install

USING CMAKE

You can also build mg with cmake, it goes like this:

  • Get the libbsd and libncurses dev packages installed.
  • Run the following commands:
mkdir build
cd build
cmake ..
make
sudo make install

Kudos to Leonid Bobrov(@mazocomp) for adding CMAKE support.

STATIC BUILDS

I recently figured out how to make really portable static builds: On an alpine linux system, build with the command:

make STATIC=yesplease

glibc does not really support static binaries. https://www.musl-libc.org/ does not have this problem.

USING CVS

This code is the cvs checkout from the OpenBSD project so if you install cvs you can see what I changed to port mg. Like this:

cvs diff -uw