OpenBSD CVS

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


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.37 / (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_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, HEAD
Changes since 1.36: +1 -2 lines
Diff to previous 1.36 (colored)

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@

Revision 1.36 / (download) - annotate - [select for diffs], Mon Dec 26 19:16:02 2022 UTC (16 months, 3 weeks ago) by jmc
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

spelling fixes; from paul tagliamonte
amendments to his diff are noted on tech

Revision 1.35 / (download) - annotate - [select for diffs], Mon Mar 1 10:51:14 2021 UTC (3 years, 2 months 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, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Put the hardcoded '\n' character which is found throughout mg into a
buffer specific variable. The diff should not produce any behavourial
changes in mg.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Feb 9 10:13:13 2020 UTC (4 years, 3 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.33: +6 -6 lines
Diff to previous 1.33 (colored)

Do not define variables in def.h since this will lead to duplicate definitions
in every source file that includes def.h
Found by gcc10 in portable in gentoo and fedora.
Patch from Ulrich Mueller (ulm AT gentoo.org) via Han Boetes, thanks!
Ok tb

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jul 3 18:11:07 2019 UTC (4 years, 10 months ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.32: +24 -1 lines
Diff to previous 1.32 (colored)

selfinsert() can't be called directly from a startup file or by
'eval-current-buffer' since it is by design, meant to be called interactively
as characters are typed in a buffer. ask_selfinsert() allows selfinsert() to
be used by excline(). Having ask_selfinsert() helps with regression testing.
No manual page entry since use case is a bit obscure. See 'insert' command.

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jun 26 16:54:29 2019 UTC (4 years, 10 months ago) by lum
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Add some key and map logging.

Revision 1.31 / (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.30: +10 -1 lines
Diff to previous 1.30 (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.30 / (download) - annotate - [select for diffs], Sat Sep 26 21:51:58 2015 UTC (8 years, 7 months ago) by jasper
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, 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, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

whitespace

Revision 1.29 / (download) - annotate - [select for diffs], Wed Mar 25 20:53:31 2015 UTC (9 years, 1 month ago) by bcallah
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.28: +1 -9 lines
Diff to previous 1.28 (colored)

unifdef -U NO_DPROMPT and GOSREC.
NO_DPROMPT has been around since the import of mg2a and it has never been
considered a "(Common) compile-time option" in the Makefile.
Assume everyone has been running mg this way since at least 2000 if not
already in the 90s.

Same with GOSREC. Has always been there but it looks like no one noticed
it (and no one was running with it). Indeed, the mg tutorial appears to be
oblivious to GOSREC being an option.

With this commit there are no more #ifndef blocks in mg. Only a couple of
#ifdef blocks remain.

ok lum@

Revision 1.28 / (download) - annotate - [select for diffs], Wed Mar 25 12:29:03 2015 UTC (9 years, 1 month ago) by bcallah
Branch: MAIN
Changes since 1.27: +1 -3 lines
Diff to previous 1.27 (colored)

Remove unused METACH #define.
No one is defining their own METABIT so remove the #ifndef around it.

ok florian@

Revision 1.27 / (download) - annotate - [select for diffs], Thu Mar 19 21:22:15 2015 UTC (9 years, 2 months ago) by bcallah
Branch: MAIN
Changes since 1.26: +5 -1 lines
Diff to previous 1.26 (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.26 / (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_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (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.25 / (download) - annotate - [select for diffs], Thu Apr 12 04:47:59 2012 UTC (12 years, 1 month ago) by lum
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.24: +4 -21 lines
Diff to previous 1.24 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Sat Jun 14 07:38:53 2008 UTC (15 years, 11 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, 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, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.23: +36 -9 lines
Diff to previous 1.23 (colored)

unf*ck undo.
No seriously. Reposition the cursor to the start of the redo
position, like emacs. This gets us halfway to being emacs-finger-friendly.
For the rest, introduce a rptcount variable to count successive invocations
of the same function. This means undo will abort properly on C-g, and
other such interruptions.
This is a lot of diff for a simple-seeming problem. Emacs undo is hard.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Dec 21 18:06:02 2006 UTC (17 years, 5 months ago) by kjell
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.22: +6 -7 lines
Diff to previous 1.22 (colored)

Eliminate BSMAP #ifdef (we didn't define it). This exposes bsmap-mode,
which swaps ^H and DEL.

ok jason@

Revision 1.22 / (download) - annotate - [select for diffs], Mon Apr 3 02:43:22 2006 UTC (18 years, 1 month ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Tue Dec 13 07:20:13 2005 UTC (18 years, 5 months ago) by kjell
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.20: +5 -5 lines
Diff to previous 1.20 (colored)

Last round of easy delinting.

Revision 1.20 / (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.19: +2 -2 lines
Diff to previous 1.19 (colored)

More name-clash delinting

Revision 1.19 / (download) - annotate - [select for diffs], Sat Nov 19 20:14:38 2005 UTC (18 years, 6 months ago) by kjell
Branch: MAIN
Changes since 1.18: +1 -7 lines
Diff to previous 1.18 (colored)

Goodbye NO_METAKEY
(#ifdef is for emacs developers)

Revision 1.18 / (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.17: +5 -5 lines
Diff to previous 1.17 (colored)

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

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

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

Revision 1.16 / (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.15: +28 -29 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Sun Feb 1 22:26:40 2004 UTC (20 years, 3 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

remove old precompiler weirdness that is not really needed...

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jul 1 14:33:44 2002 UTC (21 years, 10 months ago) by vincent
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.13: +13 -26 lines
Diff to previous 1.13 (colored)

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

Revision 1.13 / (download) - annotate - [select for diffs], Thu Feb 21 15:27:29 2002 UTC (22 years, 3 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

KNF

Revision 1.12 / (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.11: +2 -2 lines
Diff to previous 1.11 (colored)

signal-safe window size changing

Revision 1.11 / (download) - annotate - [select for diffs], Wed Feb 13 22:36:58 2002 UTC (22 years, 3 months ago) by vincent
Branch: MAIN
Changes since 1.10: +10 -18 lines
Diff to previous 1.10 (colored)

 Make mg malloc the l_text element instead of reallocating whole LINE
 structures all the time.

Revision 1.10 / (download) - annotate - [select for diffs], Thu May 24 03:05:23 2001 UTC (23 years ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.9: +11 -11 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: +4 -3 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:20:35 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

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

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

Add an argument to doscan which is a pointer to a KEYMAP pointer.
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.

Revision 1.6 / (download) - annotate - [select for diffs], Wed May 23 16:14:00 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.5: +12 -12 lines
Diff to previous 1.5 (colored)

Get rid of 'prefix' and use NULL instead.

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 3 20:40:22 2001 UTC (23 years ago) by art
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (colored)

Add a delay (in miliseconds) argument to ttwait.

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

$OpenBSD$

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

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

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

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

Revision 1.1 / (download) - annotate - [select for diffs], Fri Feb 25 19:08:48 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.