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.
m
> [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
ok to give README a title?
-lum
Index: README
===
RCS file: /cvs/src/usr.bin/mg/README,v
retrieving revision 1.11
diff -u -p -r1.11 README
--- README 7 Jun 2012 15:15:04 - 1.11
+++ README 8 Jun 2012 10:58:10 -
[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 f
> 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.
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
> -u -user should work, did you test it? I thought getopt was smart
> enough to know if an argument is needed, it comes next. I think
> that's nicer than a different letter for command line and interactive
> mode.
>From the man page:
-U user
Show only those processes owned by
> Hopefully this is the final diff.
>
> Showing a single user and then hiding them will now work as one would
> expect.
>
> I also forgot to update usage().
looks reasonable. ok lum@
> 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 diff
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 - 1
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: /cvs/
After a recent commit (http://marc.info/?l=openbsd-tech&m=133787310204563&w=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 b
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: /cvs/src/usr.bin/mg/REA
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
=
> ...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 an
Currently, in mg, if you search (C-s) for a string and that string is located
at the end of a buffer AND there is no new-line after it, your search will
halt. For example, if you copy the text below into a new buffer and remove any
new lines after the last 5, then search for 5. When you reach the l
"any of the *file* commands"
should be...
any of the other *file* commands
such as insert-file, etc..
- Forwarded message from Mark Lumsden -----
From: Mark Lumsden
To: tech@openbsd.org
Subject: mg(1) start up file diffs (2 of 2)
Further to my previous email, I noticed if
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
If you want to open up a file using the mg startup file (~/.mg) using the
find-file command, e.g:
find-file main.c
mg will give an odd message of "File read error", but the file opens anyway.
However, if by accident you try to open a non-existant file mg will segv.
After investigating I found m
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
> 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, th
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 rece
>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 w
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 wrong
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
> >
> > Just make tutorial file neater on installation. ok?
>
> Ugh, using perl to install the binary feels very worng.
>
> Why
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
+++ Makefi
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
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 Aug
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" -
>
>
> Hello.
>
> mg(1) editor has a small resource leak in make_file_list() function.
> If it cannot allocate space for `current' list it returns without
> closing `dirp' with closedir() call.
>
> Index: fileio.c
> ===
> RCS file: /c
> 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 anyon
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 -
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: /cvs/src/usr.bin/nc/n
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 t
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 m
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
On 06 February 2012 at 10:53 Mark Lumsden wrote:
> >On 2012/02/06 00:21, Bryan Steele wrote:
> >> On Mon, Feb 06, 2012 at 04:47:45AM +0000, Mark Lumsden wrote:
> >> > There is a CAVEAT section in the man page that should also be
> >> > am
>On 2012/02/06 00:21, Bryan Steele wrote:
>> On Mon, Feb 06, 2012 at 04:47:45AM +0000, Mark Lumsden wrote:
>> > There is a CAVEAT section in the man page that should also be
>> > amended, I suspect.
>>
>> Heh, whoops. :)
>>
>> > Although
>> 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?
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 infer
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 new_
On 16 January 2012 at 07:43 Nicholas Marriott
wrote:
> On Mon, Jan 16, 2012 at 04:50:32AM +0000, Mark Lumsden wrote:
> > On 15 January 2012 at 19:02 Nicholas Marriott
> > wrote:
> >
> > > Hi
> > >
> > > I think that error message is m
On 15 January 2012 at 19:02 Nicholas Marriott
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, the diff from Free
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-tech&m=130789344027691&w=2
I must say, I liked this idea. But only got time recently
to have
I can have a look at this, though it may not be for a week or so.
Testers/comments welcome...
mark
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
---
| 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 belo
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 a
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
Ind
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 -r
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 i
In version 1.58 of newsyslog.c, 512 was changed to 256, the cvs comments
also suggest the kilobytes remark is wrong. As does the st_size of the
struct used in lstat.
So looks ok to correct the situation to as it just now.
Obviously changing the MIN_SIZE to 512 is something else (as per Benny's
r
On Thu, May 12, 2011 at 09:06:44AM +0200, Alexander Hall wrote:
> On 05/12/11 07:30, Mark Lumsden wrote:
> > Hopefully one day adduser(8), will have "use warnings;" added to it.
>
> Looking at it, I'd rather see it shot in the head and buried.
>
> Well, ma
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 futur
Further to the earlier diff, this accomodates bob's New User verbiage
and logic from the install routine when someone answers "yes" to a
question where that is not an option, e.g. -config_create
-mark
Index: adduser.8
===
RCS file: /
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
>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 function
On Mon, May 02, 2011 at 10:10:01PM +0500, Mark Lumsden wrote:
> This diff modifies the adduser.8 EXAMPLES section to be more inline with the
> rest of the man page.
>
> 1. Passwords typed on the command line should ideally be put through
>encrypt(1) (unless -unencrypted
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 cha
This diff modifies the adduser.8 EXAMPLES section to be more inline with the
rest of the man page.
1. Passwords typed on the command line should ideally be put through
encrypt(1) (unless -unencrypted is used)
2. Welcome messages are not on by default now. Therefore must be explicity
set wi
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 0
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 05:4
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
===
R
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?
> >
> > -ma
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
+++
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: systa
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: /cvs/src/usr.bin/systat/p
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() function
I agree with what you have done. Thanks.
Although I've included the information about the user created via the
installation method being added to the wheel group. But then again I would even
go as far as informing the user during the installation that the users they are
about to create are mem
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: /cvs/src/share
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.
ok
> 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):
>
>
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
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 revis
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
P
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
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 stat.
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
This diff includes the 'P' option in the manpage and interactive helptext.
The install floppys are here:
http://www.cyodesigns.com/diffs/floppy47.fs
http://www.cyodesigns.com/diffs/floppyB47.fs
http://www.cyodesigns.com/diffs/floppyC47.fs
If you take one for a spin, could you let me know pls. I
On Thu, 08.04.2010 at 07:24:26 +0100, Mark Lumsden
wrote:
>> The behaviour your diff introduces isn't without precedence.
>I'm sorry, but I don't understand what you want to say.
>The patch will make isakmpd generate a log entry when it starts. For
>me, usual
> When I use Disklabel, I have been in the habit of issuing 'p m '
> rather than just 'p '
>
> 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
argument
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 "i
> On 2010/04/07 11:21, Mark Lumsden wrote:
>> I press 'p' then 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/dis
I press 'p' then 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: /cvs/src/sbin/diskla
101 - 184 of 184 matches
Mail list logo