mg(1) dired-unmark-backward

2013-12-19 Thread Mark Lumsden
Make 'dired-unmark-backward' behave the same as emacs. Any objections? -lum Index: dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.63 diff -u -p -u -p -r1.63 dired.c --- dired.c 3 Jun 2013 05:10:59

mg(1) find-file - missing directory

2014-04-01 Thread Mark Lumsden
Currently, if you use find-file (C-x C-f) to find a file in a non- existant directory, mg (and emacs - coincidentally) suggest you create the directory manually with the make-directory command. This diff offers to create the missing directory by pressing 'y'. If mg cannot create the missing the

mg(1) startup file comments

2014-04-02 Thread Mark Lumsden
ok to indicate a comment in an mg startup file with the '#' char? I can't see how this will break anybodys current startup files... -lum Index: extend.c === RCS file: /cvs/src/usr.bin/mg/extend.c,v retrieving revision 1.54 diff -u

bce - not working

2011-02-01 Thread Mark Lumsden
The bce(4) driver was removed from i386 GENERIC by Theo a few months ago because it can only access 1GB ram. My Dell Latitude D520 has 2GB RAM and sure enough the driver did random things when I tried to use it back then. Ive looked at NetBSD and they have an extra bus_dmatag_subregion()

systat(1) - remove duplicated prototypes

2011-02-03 Thread Mark Lumsden
Two prototypes are found in both systat.h and pftop.c. systat.h is included in pftop.c, and systat compiles and runs without the duplicated pftop.c protos. ok to remove? -mark Index: pftop.c === RCS file:

systat(1) pause bug

2011-02-08 Thread Mark Lumsden
In systat(1)'s pause mode 'p' all machine data isn't refreshed until 'p' is pressed again except the top line. The top line refreshes as per norm after every refresh interval (or if a manual refresh is requested). This diff stops the top line updating while in pause mode. ok? -mark Index:

apply(1) small cleanup

2011-04-26 Thread Mark Lumsden
Make a Private function private and other things. ok? -mark Index: apply.c === RCS file: /cvs/src/usr.bin/apply/apply.c,v retrieving revision 1.24 diff -u -p -r1.24 apply.c --- apply.c 27 Oct 2009 23:59:35 - 1.24 +++

Re: apply(1) small cleanup

2011-04-26 Thread Mark Lumsden
On Tue, Apr 26, 2011 at 05:59:45AM -0700, patrick keshishian wrote: On Tue, Apr 26, 2011 at 09:13:08PM +0500, Mark Lumsden wrote: Make a Private function private and other things. ok? -mark Index: apply.c === RCS

systat ifstat - undocumented options

2011-04-28 Thread Mark Lumsden
systat(1) has undocumented ifstat options. Shall we document them? Check out if_keyboard_callback() in if.c for the code. oks,comments? -mark PS Perhaps this is another pointless diff ;) Apologies in advance. Index: systat.1 ===

systat(1) vmstat memory KB - MB

2011-04-29 Thread Mark Lumsden
This allows the memory stats in vmstat view to be viewed in MB. ok/comments? -mark Index: systat.1 === RCS file: /cvs/src/usr.bin/systat/systat.1,v retrieving revision 1.92 diff -u -p -r1.92 systat.1 --- systat.129 Apr 2011

asa(1) return value

2011-04-30 Thread Mark Lumsden
According to asa(1)'s man page, it should return a value 0 if it encounters an error. Currently asa doesn't return a value greater than 0 if a file is missing that has been passed to it as an argument. For example: $ asa MISSINGFILE ...returns 0. However, FreeBSD returns 1 but NetBSD returns

perl -w and adduser(8)

2011-05-03 Thread Mark Lumsden
I thought I had found a bug in adduser and started having a look at the code. First thing I noticed is it didn't have perl -w so I added it, then realised there wasn't a bug, just user error Anyway, here is the code to allow adduser(8) have perl -w. I have tested and can see no functional

perl -w and adduser

2011-05-03 Thread Mark Lumsden
I thought I had found a bug in adduser and started having a look at the code. First thing I noticed is it didn't have perl -w so I added it, then realised there wasn't a bug, just user error Anyway, here is the code to allow adduser(8) have perl -w. I have tested and can see no functional

adduser(8): send email improvements

2011-05-06 Thread Mark Lumsden
The interface to sending new user welcome messages in adduser(8) isn't very intuitive. For example when setting up the config file using: # adduser -config_create Eventually you are asked: Send message from file: /etc/adduser.message no [no]: If you answer yes, adduser takes your input as the

adduser(8) - adduser.conf quotations

2011-05-11 Thread Mark Lumsden
Hopefully one day adduser(8), will have use warnings; added to it. However, when that glorious does come, any existing adduser.conf files created by adduser(8) will generate warnings because the template adduser(8) uses to create adduser.conf has some unquoted strings. This diff allows any future

adduser(8) - message_read, filetest

2011-05-18 Thread Mark Lumsden
Here is another small diff that tidys somemore of adduser. The @message_buffer array is cleared in message_read(), so no need to clear it just before calling message_read(). Also, make the first call to filetest() display an error message if a problem is found but not the following ones. While

Re: [PATCH] dired mg patch

2011-08-27 Thread Mark Lumsden
Here is a modified diff, the changes revolve around the d_warpdot function. Logan has already tested this. Any other test's/oks? -lum Index: dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.48 diff -u -p

top(1) make 2 variables relationship more explicit

2011-08-27 Thread Mark Lumsden
If a terminals capability is deemed insufficient for top, the variable is_a_terminal is switched to 0 in the init_screen function, as is the variable smart_terminal. This diff makes this logical relationship more explicit in the relevant code. There is no functional change. ok/comments? -lum

Re: [PATCH] dired mg patch

2011-08-28 Thread Mark Lumsden
This is a slightly modified diff from Henri's latest one. It fixes the issue that if a filename has a space at the start of it, the point will stay in the first character column and not jump to the first non ' ' character in the filename. However, it does seem to expose a bug in dired, that if

Re: mg word wrapping tweak

2011-08-30 Thread Mark Lumsden
--- | Date: Wed, 29 Jun 2011 23:12:16 -0700 | From: Matthew Dempsky | To: tech@openbsd.org | Subject: mg word wrapping tweak It drives me crazy that when I have a complete parenthetical sentence, mg keeps insisting on taking away my double space after the close parenthesis. Diff below

Re: ctags(1) and mg(1) again

2011-10-13 Thread Mark Lumsden
I'll try and have a look at it. Although, I may not be able to do it for a couple of weeks, vbusy. Any other tests/comments from other mg users most welcome. -lum

Re: Pipe text from mg to external command

2011-12-27 Thread Mark Lumsden
I can have a look at this, though it may not be for a week or so. Testers/comments welcome... mark

Small pkill enhancement

2012-01-15 Thread Mark Lumsden
Some months ago there was an email about adding a 'i' option to pgrep/pkill, one suggestion from that discussion was giving pkill the ability to say if nothing had been killed. http://marc.info/?l=openbsd-techm=130789344027691w=2 I must say, I liked this idea. But only got time recently to have

Re: Small pkill enhancement

2012-01-15 Thread Mark Lumsden
On 15 January 2012 at 19:02 Nicholas Marriott nicholas.marri...@gmail.com wrote: Hi I think that error message is misleading if you are running pkill as root. Yes, I agree. How about instead of only printing if it did nothing, -l makes it always print %d processes signalled? Currently,

Re: Small pkill enhancement

2012-01-16 Thread Mark Lumsden
On 16 January 2012 at 07:43 Nicholas Marriott nicholas.marri...@gmail.com wrote: On Mon, Jan 16, 2012 at 04:50:32AM +, Mark Lumsden wrote: On 15 January 2012 at 19:02 Nicholas Marriott nicholas.marri...@gmail.com wrote: Hi I think that error message is misleading if you

mg: NULL check diff

2012-01-24 Thread Mark Lumsden
This diff does two things: 1. Remove the unused secondary (wp == NULL) check. 2. Moves the (bp == NULL) check to a more useful place. I think point 1 is kind of obvious. Currently the logic can never reach there. For point 2, bp is used in new_window() so a NULL check would be better before

Re: nc port scan, aka udp noise maker.

2012-02-05 Thread Mark Lumsden
There is a CAVEAT section in the man page that should also be amended, I suspect. Although useless on the initaiting machine, is it of any use to be able to scan a range of UDP ports, for diagnotic reasons, and to see what is received (or not) on the receiving machine? As in, can anything be

Re: nc port scan, aka udp noise maker.

2012-02-05 Thread Mark Lumsden
There is a CAVEAT section in the man page that should also be amended, I suspect. Heh, whoops. :) There is more code that could be removed from main() From what I can tell, no traffic is actually generated on the initaiting machine.. nothing in tcpdump anyway. Isn't that strange?

Re: nc port scan, aka udp noise maker.

2012-02-06 Thread Mark Lumsden
On 2012/02/06 00:21, Bryan Steele wrote: On Mon, Feb 06, 2012 at 04:47:45AM +, Mark Lumsden wrote: There is a CAVEAT section in the man page that should also be amended, I suspect. Heh, whoops. :) Although useless on the initaiting machine, is it of any use to be able to scan

Re: nc port scan, aka udp noise maker.

2012-02-06 Thread Mark Lumsden
On 06 February 2012 at 10:53 Mark Lumsden m...@showcomplex.com wrote: On 2012/02/06 00:21, Bryan Steele wrote: On Mon, Feb 06, 2012 at 04:47:45AM +, Mark Lumsden wrote: There is a CAVEAT section in the man page that should also be amended, I suspect. Heh, whoops. :) Although

Re: nc port scan, aka udp noise maker.

2012-02-06 Thread Mark Lumsden
Here is a diff that improves the CAVEATS section which describes using the options -uz together. Any objections? -lum Index: nc.1 === RCS file: /cvs/src/usr.bin/nc/nc.1,v retrieving revision 1.59 diff -u -p -r1.59 nc.1 --- nc.1

nc(1) - unused error message

2012-02-07 Thread Mark Lumsden
Currently, if a range of ports is specified when using the -l (listening) option, nc(1) prints this error message: nc: getaddrinfo: service not supported for ai_socktype However, there is a check to make sure that a range of ports is not specified when nc is used in listening mode which gives a

Re: nc(1) - unused error message

2012-02-07 Thread Mark Lumsden
On Wed, Feb 08, 2012 at 07:37:09AM +, Mark Lumsden wrote: Currently, if a range of ports is specified when using the -l (listening) option, nc(1) prints this error message: nc: getaddrinfo: service not supported for ai_socktype However, there is a check to make sure that a range

Re: nc(1) - unused error message

2012-02-08 Thread Mark Lumsden
Ha, just noticed nc -l can use /etc/services. Some services have a '-' in them so no point having a '-' check earlier either. So just remove check that can never be reached. -lum Index: netcat.c === RCS file:

nc(1) - amend IPv6 comment

2012-02-08 Thread Mark Lumsden
In my tests, IPv6 worked ok. ok to amend comment? (and small typo) -lum Index: netcat.c === RCS file: /cvs/src/usr.bin/nc/netcat.c,v retrieving revision 1.104 diff -u -p -r1.104 netcat.c --- netcat.c9 Feb 2012 03:27:36 -

Re: Pipe text from mg to external command

2012-03-12 Thread Mark Lumsden
This version properly captures data from external command and puts it into *Shell Command Output* buffer. These are the new commands added to mg with this diff... C-x h mark-whole-buffer M-| shell-command-on-region Comments? I'll try and review this diff this weekend. Did anyone test

Re: [trentb...@gmail.com: Re: mg: The Delete key should delete the character to the right of the cursor]

2012-03-25 Thread Mark Lumsden
Any objections? -lum This patch for mg is suggested by the debian team to add support for the del key. Seems like a nobrainer and also works in OpenBSD. Sorry for the long message but I want to give credit where credit is due. - Forwarded message from Trent W. Buck trentb...@gmail.com

mg(1) 'C-x C-w' file exists check

2012-04-10 Thread Mark Lumsden
This diff makes mg behave more like emacs by checking if the file about to be written exists. ok? -lum Index: file.c === RCS file: /cvs/src/usr.bin/mg/file.c,v retrieving revision 1.76 diff -u -p -r1.76 file.c --- file.c 31

top(1) cannot show minus process lines

2012-04-11 Thread Mark Lumsden
Currently if you resize an xterm that top(1) is running in to too few lines for any processes to be shown and then type 'n' to show X process lines, top will display a message saying: This terminal can only display -Y processes. Obviously a negative number is not quite correct. This diff makes

mg Makefile: remove CVS tag from tutorial

2012-05-06 Thread Mark Lumsden
Just make tutorial file neater on installation. ok? -lum Index: Makefile === RCS file: /cvs/src/usr.bin/mg/Makefile,v retrieving revision 1.25 diff -u -p -r1.25 Makefile --- Makefile28 Nov 2011 04:41:39 - 1.25 +++

Re: mg Makefile: remove CVS tag from tutorial

2012-05-06 Thread Mark Lumsden
On Sun, May 06, 2012 at 09:30:30PM +0200, Mark Kettenis wrote: Date: Sun, 6 May 2012 23:24:50 +0500 From: Mark Lumsden m...@showcomplex.com Just make tutorial file neater on installation. ok? Ugh, using perl to install the binary feels very worng. Why not simply remove that line

mg(1): bug in writeout() function

2012-05-07 Thread Mark Lumsden
writeout() writes the data in a buffer to a file. Currently, it also uses the fupdstat() function to update the buffer statistics (fi_mode, fi_mtime..etc), once the writing has been done. However, one of the two uses of writeout introduces a bug where the fupdstat function is called using the

Re: mg(1): bug in writeout() function

2012-05-08 Thread Mark Lumsden
writeout() writes the data in a buffer to a file. Currently, it also uses the fupdstat() function to update the buffer statistics (fi_mode, fi_mtime..etc), once the writing has been done. However, one of the two uses of writeout introduces a bug where the fupdstat function is called using the

mg(1) Save throwaway buffers

2012-05-08 Thread Mark Lumsden
emacs allows you to save throwaway buffers, e.g. *scratch*, by using C-x s if their contents have changed. Also, if a throwaway buffer has changed and you exit emacs via C-x c you are not asked to save it. Currently, mg adheres to emacs behaviour on the second point but not on the first. You

Re: mg(1) allow no-tab-mode to compile

2012-05-17 Thread Mark Lumsden
Attached is a diff to allow no-tab-mode to compile. It's basically the same as a diff sent to this list around 2 years ago minus enabling this mode by default The diff looks ok. However, no-tab-mode looks a bit buggy. Especially if you toggle it on/off. imo, no-tab-mode should get fixed, then

mg(1) open ~files in current dir

2012-05-21 Thread Mark Lumsden
If you give emacs a filename with a tilde at the front of the name it will open the file if it exists in the current directory. $ emacs ~abc mg doesn't, mg will give a message Unkown user abc. If the file doesn't exist and no user exists with the name abc, emacs will create a new buffer called

mg - start up file diffs (2 of 2)

2012-05-23 Thread Mark Lumsden
Further to my previous email, I noticed if I tried to use any of the *file* commands in the startup ~/.mg file, nothing happened. By looking at main.c, I realised that the order of starup function calls was the problem. This diff moves the creation of the startup buffers before parsing the startup

Re: mg(1) start up file diffs (2 of 2)

2012-05-23 Thread Mark Lumsden
any of the *file* commands should be... any of the other *file* commands such as insert-file, etc.. - Forwarded message from Mark Lumsden m...@showcomplex.com - From: Mark Lumsden m...@showcomplex.com To: tech@openbsd.org Subject: mg(1) start up file diffs (2 of 2) Further to my

Re: mg - start up file diffs (2 of 2)

2012-05-24 Thread Mark Lumsden
...Commands that are usually located in the startup file (global-set-key, set-default-mode etc...) are unaffected since they are not reliant on the buffers being created or not. However, wider testing would be appreciated. So its good to test. Here is an updated diff, which DOES update any

mg end of buffer page down diff

2012-05-25 Thread Mark Lumsden
When you page down a document and get to the last page, mg doesn't stop, it keeps going until the last line is at the top of the window. This diff makes mg stop paging down when the end of the text is visible. Comments/ok? -lum ps some whitespace for readability added. Index: basic.c

mg history and window relocation

2012-05-25 Thread Mark Lumsden
Move the windows section in the tutorial to a more sensible place (next to buffers) and move the mg history into the README file which seems a more sensible place as well. ok? -lum Index: README === RCS file:

mg - remove *init* buffer

2012-05-28 Thread Mark Lumsden
After a recent commit (http://marc.info/?l=openbsd-techm=133787310204563w=2) I realised the *init* buffer could be removed since we went back and updated modes after scratch was created. There is a side effect to this diff; theo mode now works from the command line: $ mg -f theo [it had been

mg - scrolling back diff

2012-05-31 Thread Mark Lumsden
Currently, mg's cursor jumps from top to bottom of the screen as you scroll upwards, I find this behaviour confusing at times. This diff makes mg's scroll back the same as emacs. Comments/ok? mark Index: basic.c === RCS file:

mg - more emacs scroll compatibility

2012-05-31 Thread Mark Lumsden
Show a message and beep when you reach either end of a buffer. ok? -lum Index: basic.c === RCS file: /cvs/src/usr.bin/mg/basic.c,v retrieving revision 1.33 diff -u -p -r1.33 basic.c --- basic.c 31 May 2012 10:55:53 -

Re: cscope support in mg

2012-06-01 Thread Mark Lumsden
Here is an updated diff with following changes... Manpage update. Remove conditional compilation of cscope functionality. Fixed a memory leak in csexists function. Treat current word at cursor as default input for cscope commands. Comments? I like it. I'm using your previous diffs

mg - corner-case backward scrolling

2012-06-05 Thread Mark Lumsden
There is a corner case when the screen buffer is only 1 line long where the loop that looks for the current dot line goes through the whole buffer until it finds the correct line. This means the line number decrement is way over what it should be. This diff accounts for that corner case. ok? -lum

Re: mg - corner-case backward scrolling

2012-06-07 Thread Mark Lumsden
There is a corner case when the screen buffer is only 1 line long where the loop that looks for the current dot line goes through the whole buffer until it finds the correct line. This means the line number decrement is way over what it should be. This diff accounts for that corner case. ok?

mg - save backup files to homedir (diff v2)

2012-06-07 Thread Mark Lumsden
[note: I've modifed this diff from the first version with comments from eric@ and Sunil Nimmagadda.] I find the backup files mg creates scattered around a pain but then again I don't want to switch backups off since they can be useful. Also, I don't feel the need to implement something in mg as

mg - Another corner-case scrolling fix

2012-06-08 Thread Mark Lumsden
Bit difficult to explain this one. If you have a file open that is 3 or 4 times longer than the length of the viewable window and are at the bottom of the buffer then scroll up to the top using M-v, your cursor should remain at the bottom left of the window once you reach the top of the buffer.

Re: mg - save backup files to homedir (diff v2)

2012-06-09 Thread Mark Lumsden
So perhaps it is better for mg to behave more like emacs when it comes to saving backup files in a single directory. Especially if a user has two files open with the same name and are working on them simultaneously. In this diff I've added the path to the backup file name. Like emacs, it

mg - save backup files to homedir (diff v3)

2012-06-13 Thread Mark Lumsden
If you use mg as the editor with mutt, any backup files mutt creates are kept in /tmp. However, with backup-to-home-directory enabled all backup files are moved to ~/.mg.d. Personally, I'd rather not move these backups but keep them in the /tmp dir. This modified diff allows backup files that

mg - another ~file bug

2012-06-14 Thread Mark Lumsden
Currently, in mg, if you try to open a file that doesn't exist and has a name longer than LOGIN_NAME_MAX and also has a tilde at the front e.g. $ mg ~01234567890123456789012345678901 you will receive a msg: Login name too long Since the filename cannot be a user name (it is too long),

mg - end-of-buffer diff

2012-06-15 Thread Mark Lumsden
Currently, if you are at the start of a buffer that is longer than the window and press M-, you will move to the end of the buffer. There is a difference between mg and emacs' behaviour though. In emacs, your cursor will be placed at the bottom of the window (minus 3 lines) which means most of the

Re: tinyscheme + mg

2012-06-28 Thread Mark Lumsden
Here is an updated diff for mg with tinyscheme integration. It's based on tedu's original diff with various tweaks and changes. For those worried about mg being too bloated, rest assured, it's still small and lean and a big part smaller than vi ;-) It's not fully possible to turn mg into your

Re: tinyscheme + mg

2012-06-28 Thread Mark Lumsden
I'm all for adding support for scripting into mg, though I would be tempted to rip out all nonessential functionality first (ng? ;) and add it back via the scripting language. I would think the goal should be to make mg significantly *smaller* any such change Could you clarify what you mean

Re: tinyscheme + mg

2012-06-28 Thread Mark Lumsden
I'd be a lot happier voicing an opinion in support of something like this if I also saw diffs and interest in *using* them to extend functionality later or replace some things easier to do with scheme to make the code simpler - something kjell was alluding to. I think we can work

mg(1) - closing buffer behaviour

2012-08-29 Thread Mark Lumsden
If you C-x C-c out of emacs and there are unsaved buffers, emacs asks if you want to save them (mg behaves the same). If there is a write error (permissions or non-existant parent directory) emacs stops exiting. This allows the user to decide what to do with these buffers. In mg, the contents of

lost user error message

2012-08-30 Thread Mark Lumsden
There is an check when closing mg via C-x C-c, that if a file name is too long, the user should receive an error message Error: filename too long!, however, currently that message gets lost due to that check returning ABORT. This diff changes the return value to UERROR which allows the message to

Re: (Fwd) last(1) nit

2013-02-10 Thread Mark Lumsden
Printing just the file name (as opposed to the full path) is how NetBSD and linux behave. FreeBSD has the same behaviour as OpenBSD. I'd follow the first 2. Any objections? -lum Might I suggest using basename()? --- last.c.orig 2009-10-27 23:59:39.0 + +++ last.c 2013-02-09

mg(1) M-{} line number fix

2013-02-14 Thread Mark Lumsden
Fix forward-paragraph and backward-paragraph's handling of line numbers. ok? -lum Index: paragraph.c === RCS file: /cvs/src/usr.bin/mg/paragraph.c,v retrieving revision 1.22 diff -u -p -r1.22 paragraph.c --- paragraph.c 29 Nov

adduser default blowfish rounds

2013-05-13 Thread Mark Lumsden
Shouldn't the default rounds for blowfish in adduser.perl be the same as login.conf? ok? mark Index: adduser.perl === RCS file: /cvs/src/usr.sbin/adduser/adduser.perl,v retrieving revision 1.58 diff -u -p -u -p -r1.58 adduser.perl

Re: adduser default blowfish rounds

2013-05-13 Thread Mark Lumsden
On Mon, May 13, 2013 at 08:24:43PM +0100, Stuart Henderson wrote: On 2013/05/13 18:35, Mark Lumsden wrote: Shouldn't the default rounds for blowfish in adduser.perl be the same as login.conf? ok? mark Index: adduser.perl

mg(1): shell-command

2013-05-21 Thread Mark Lumsden
This diff modifies the shell-command-on-region function and gives us shell-command. It makes getting output from other commands into mg really easy. Comments/oks? -lum Index: def.h === RCS file: /cvs/src/usr.bin/mg/def.h,v

Re: mg(1): shell-command

2013-05-22 Thread Mark Lumsden
To make the shell-command-on-region and this command behave like that requires another diff. mark On Wed, May 22, 2013 at 09:32:45AM +0200, Jasper Lievisse Adriaanse wrote: On Tue, May 21, 2013 at 07:54:31PM +, Mark Lumsden wrote: This diff modifies the shell-command-on-region function

Re: mg(1): shell-command

2013-05-22 Thread Mark Lumsden
I am glad to say, 3 of you are on your toes today. I sent the wrong diff, and to be honest I wasn't sure if any one would notice. Gold Stars to you all On Wed, May 22, 2013 at 09:07:56AM +, Florian Obser wrote: On Tue, May 21, 2013 at 07:54:31PM +, Mark Lumsden wrote: This diff

mg(1) dired buffer refresh

2013-05-27 Thread Mark Lumsden
In mg dired mode, if you execute these commands: dired-copy-file dired-rename-file dired-create-directory The dired buffer is not refreshed with the updated action. This diff fixes that. Comments/oks? -lum Index: dired.c === RCS

mg(1) dired buffer refresh

2013-05-27 Thread Mark Lumsden
In mg dired mode, if you execute these commands: dired-copy-file dired-rename-file dired-create-directory The dired buffer is not refreshed with the updated action. This diff fixes that. Comments/oks? -lum Index: dired.c === RCS

mg(1) dired-create-directory

2013-05-27 Thread Mark Lumsden
dired-create-directory is missing from the function maps. ok? -lum Index: dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.52 diff -u -p -r1.52 dired.c --- dired.c 3 Nov 2012 15:36:03 - 1.52

mg.1 dired commands

2013-05-27 Thread Mark Lumsden
I realised the dired commands are not in the mg man page. ok? -lum Index: mg.1 === RCS file: /cvs/src/usr.bin/mg/mg.1,v retrieving revision 1.76 diff -u -p -r1.76 mg.1 --- mg.122 May 2013 19:23:45 - 1.76 +++ mg.1

mg(1) dired warpdot

2013-05-28 Thread Mark Lumsden
The mg dired commands: dired-flag-file-deleted dired-backup-unflag dired-unflag behave more like emacs when the cursor stays on the first character of the file name. ok? mark Index: dired.c === RCS file:

mg(1) dired opening ~/

2013-05-29 Thread Mark Lumsden
Currently dired mode doesn't use the adjustname() function early enough when passed ~. For example typing 'M-x dired', then: Dired: ~ Doesn't open your home directory. However, with this diff mg behaves like emacs. ok? mark Index: dired.c

mg(1) - use more adjustname() in dired

2013-05-29 Thread Mark Lumsden
The dired-copy-file and dired-rename-file commands do not use adjustname() for the new path. Hence 'M-x dired-copy-file': Dired: ~/filename will not work. This diff fixes that behaviour. ok? mark Index: dired.c === RCS file:

mg(1) visible/audible bell control

2013-05-30 Thread Mark Lumsden
This diff adds the capability to toggle on and off the system bell within mg via the 'audible-bell' command. It also introduces the 'visible-bell' command: the modeline will flash instead. However, both can be used together, if so desired. Comments/oks? -lum Index: Makefile

mg(1) M-} forward para diff

2013-05-31 Thread Mark Lumsden
A while back, I committed a diff that fixed scrolling backwards by paragraph in mg. I thought I would give it a while before writing the corresponding diff for going forwards, just to make sure there were no problems with the first diff. So here it is. Before you compile this diff, (and if you

mg(1) 'q' for quit-window in dired mode

2013-06-01 Thread Mark Lumsden
This diff adds the key binding 'q' and function 'quit-window' to mg's dired mode. Comments/oks? mark Index: buffer.c === RCS file: /cvs/src/usr.bin/mg/buffer.c,v retrieving revision 1.90 diff -u -p -r1.90 buffer.c --- buffer.c

[m...@showcomplex.com: mg(1) 'q' for quit-window in dired mode]

2013-06-01 Thread Mark Lumsden
The man page has an error... it should read: .It q quit-window - Forwarded message from Mark Lumsden m...@showcomplex.com - Date: Sat, 1 Jun 2013 15:05:16 + From: Mark Lumsden m...@showcomplex.com To: tech@openbsd.org Subject: mg(1) 'q' for quit-window in dired mode User-Agent

mg(1) rename dired commands

2013-06-02 Thread Mark Lumsden
This diff renames the dired-* command names to be in line with emacs. Any objections? mark Index: dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.59 diff -u -p -r1.59 dired.c --- dired.c 30 May 2013

mg(1) 'g' dired refresh buffer

2013-06-02 Thread Mark Lumsden
This diff uses 'g' to refresh the dired buffer. mark Index: dired.c === RCS file: /cvs/src/usr.bin/mg/dired.c,v retrieving revision 1.62 diff -u -p -r1.62 dired.c --- dired.c 2 Jun 2013 10:09:21 - 1.62 +++ dired.c

stat.c remove unused variable

2010-08-31 Thread Mark Lumsden
Remove unused variable, linkfail. Unused since v1.6. ok? mark Index: stat.c === RCS file: /cvs/src/usr.bin/stat/stat.c,v retrieving revision 1.15 diff -u -p -r1.15 stat.c --- stat.c 29 Jun 2010 20:51:05 - 1.15 +++

stat.c const char *

2010-09-01 Thread Mark Lumsden
Add const keyword to pointers that point to strings which shouldn't be changed and remove blankline from usage(). ok? -mark Index: stat.c === RCS file: /cvs/src/usr.bin/stat/stat.c,v retrieving revision 1.16 diff -u -p -r1.16

msgs - empty bounds file problem

2010-09-22 Thread Mark Lumsden
When messages are added to the /var/msgs/ directory via: # msgs -s The contents of the bounds file are incorrectly filled with a random number if the bounds file is initially empty (which it is on a newly installed system). This diff is one way to fix the problem. ok? mark Index: msgs.c

msgs(1) - small tidy msgs.c

2010-09-22 Thread Mark Lumsden
This diff does 3 things, which I don't think are complicated, hence I will put them together. 1. remove quitit since it is not required. We exit without using it. 2. swap the position of qQ and xX. Its tidier in my mind. 3. Change the fall-thru comments to FALLTHROUGH. any or all ok? -mark

netcat(1): check local port val

2010-09-23 Thread Mark Lumsden
Add a check to the user supplied value of the local port. I haven't used the return value of strtonum since pflag is used later as a pointer. ok? -mark Index: netcat.c === RCS file: /cvs/src/usr.bin/nc/netcat.c,v retrieving

gencat.c - else if

2010-09-24 Thread Mark Lumsden
This diff removes an } else if { which is split over two lines. The logic of the if statement suggests to me that there was no missing {. There is no other change apart from moving white space, so no functional difference. ok? -mark Index: gencat.c

Re: netcat(1): check local port val

2010-09-27 Thread Mark Lumsden
Hi Mark, Mark Lumsden wrote on Thu, Sep 23, 2010 at 07:38:00AM +: Add a check to the user supplied value of the local port. [...] ok? No, not ok; i think the patch is incorrect. The pflag is passed to getaddrinfo(3): int getaddrinfo(const char *hostname, const char

systat.1 - Interfaces correction

2011-01-15 Thread Mark Lumsden
The number of IPKTS and OPKTS in systat(1) is calculated by taking away the new total packets from the old total packets and dividing the result by the delay between refreshes (naptime). This calculation is performed in the macro UPDATE in if.c I think the current description is inaccurate.

afterboot.8 - Login in as root

2011-01-22 Thread Mark Lumsden
afterboot.8 hasn't been changed to reflect the fact that a user can be created during installation and you have no other option but to login as root on first boot. comments/ok? -mark Index: afterboot.8 === RCS file:

disklabel - 'P' option

2010-04-07 Thread Mark Lumsden
I press 'p' then enter after everything I do in disklabel. 'P' automatically prints out the equivalent of 'p' after each command and saves on finger wear and tear. like/dislike? -mark Index: editor.c === RCS file:

Re: isakmpd: tiny patch

2010-04-08 Thread Mark Lumsden
The behaviour your diff introduces isn't without precedence. Some daemons do this when starting, some don't. Eh, not sure what to say really... Its kind of a moot point for me. -mark === Hello, while playing with isakmpd, I found that it would be nice to have a complement for the

Re: disklabel - 'P' option

2010-04-08 Thread Mark Lumsden
When I use Disklabel, I have been in the habit of issuing 'p m enter' rather than just 'p enter' Since I do it for disk / usb thumb setups, and so forth, I find the 'megabyte-able' printing more consistent to my liking. Attached is an amended diff that allows the 'P' option to take an

  1   2   >