History log of /openbsd/usr.bin/mg/re_search.c (Results 1 – 25 of 37)
Revision Date Author Comments
# 5b133f3f 08-Mar-2023 guenther <guenther@openbsd.org>

Delete obsolete /* ARGSUSED */ lint comments.

ok miod@ millert@


# 79a91dcb 22-Apr-2021 lum <lum@openbsd.org>

Add a non-interactive version of query-replace-regexp function called
replace-regexp. Unfortunately query-replace-regexp can't be used in a
startup file.


# 8a6c6275 22-Jul-2020 tb <tb@openbsd.org>

Avoid running out of memory with query-replace-regex ^

Choosing ! (replace rest) never advances beyond the current line
and keeps inserting the replacement test, and mg eventually runs
out of memory

Avoid running out of memory with query-replace-regex ^

Choosing ! (replace rest) never advances beyond the current line
and keeps inserting the replacement test, and mg eventually runs
out of memory.

Patch from Mark Willson with minor stylistic tweaks.

Looks good to Hiltjo Posthuma who would have preferred making forward
replacing on empty lines work. Mark argued that this makes it behave
consistently with the current behaviour when searching for ^ and the
point at the beginning of a non-empty line in which case the cursor does
not move either.

Also tested by krw

show more ...


# d4d64747 09-Jul-2020 tb <tb@openbsd.org>

Avoid NULL deref in regexec when searching for empty lines.

Report & tweak from Hiltjo Posthuma


# f7b4fa5c 06-Aug-2017 bcallah <bcallah@openbsd.org>

Present the default choice before the colon in prompts. Matches GNU Emacs
behavior.

From Scott Cheloha <scottcheloha@gmail.com>

ok florian@


# 78607f8b 30-May-2017 florian <florian@openbsd.org>

fix -Wshadow warnings.
Found by bcallah, thanks!


# cc6738c5 19-Mar-2015 bcallah <bcallah@openbsd.org>

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 so

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@

show more ...


# dbf27552 20-Mar-2014 lum <lum@openbsd.org>

Add some missing dobeeps.
ok florian@


# 26083131 20-Dec-2013 florian <florian@openbsd.org>

Set the correct line number after successfully searching with
re-search-{backward,forward}.
OK lum


# b59d45bc 24-Sep-2013 jasper <jasper@openbsd.org>

rename re_match to regex_match to prevent a namespace conflict on Linux as
reported by Han Boetes.

while here, rename re_buff accordingly for consistency.

ok florian@


# 048419bb 31-May-2013 lum <lum@openbsd.org>

Make the system bell toggleable via 'audible-bell', and if switched
off, make available an alternative 'visible-bell'.

ok florian@ jasper@ Feedback Sunil Nimmagadda.


# c3823829 21-Jan-2011 kjell <kjell@openbsd.org>

It volates style(9), but in mg, #include"def.h" goes first. 'twas the way it was built. no binary change here. confirmed by lum@, tested by Henri Kemppainen


# f14f890a 04-Jun-2009 kjell <kjell@openbsd.org>

Rename w_flag to w_rflag. This is not a general purpose
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing

Rename w_flag to w_rflag. This is not a general purpose
flag: it is for redisplay options only. I need an additional all-purpose
flag, so renaming removes the desire to wrongly overload the existing one.

Turdshine. No functional chage.

show more ...


# b669aed8 25-Jul-2006 kjell <kjell@openbsd.org>

Rename the header line of a buffer to b_headp, from the remarkably
unintuitive b_linep. No binary change.


# d1db3928 28-May-2006 kjell <kjell@openbsd.org>

Make Window Flags more mnemonic (and less dumb); i.e.
WFHARD -> WFFULL (Redraw full window)
WFFORCE -> WFFRAME (Reframe window).
No binary change


# b055d85a 13-Dec-2005 kjell <kjell@openbsd.org>

More name-clash delinting


# 2818a53f 18-Nov-2005 deraadt <deraadt@openbsd.org>

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


# 2c3ccd67 18-Nov-2005 kjell <kjell@openbsd.org>

Casefold on replace was killed ages ago (it was wrong). Remove a
leftover (unused) variable.


# 2b63090f 14-Oct-2005 deraadt <deraadt@openbsd.org>

unused variables


# e4eb8759 09-Aug-2005 kjell <kjell@openbsd.org>

Clean up eread handling in mg. (basically, fallout from the 'enter often
means abort' behaviour added during the hackathon). Eliminates
redundant ereply function, fixes miscellaneous cores when abort

Clean up eread handling in mg. (basically, fallout from the 'enter often
means abort' behaviour added during the hackathon). Eliminates
redundant ereply function, fixes miscellaneous cores when aborting,
and move a number of assumed pathnames into the prompt text, since
they are used there anyway. All changes consistent with emacs behavior

ok beck@ many, many moons ago.

show more ...


# 00e5ac59 14-Jun-2005 kjell <kjell@openbsd.org>

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


# 454332da 14-Jun-2005 kjell <kjell@openbsd.org>

Three more ereply that should be ereads. This fixes henning's "replace
with null string is busted" observation.

ok henning@, cloder@


# 3578b81d 05-Jun-2005 kjell <kjell@openbsd.org>

if functions permits null reply from minibuffer, use eread (with
EFNUL), not ereply.
ok cloder


# f66aba3d 03-Apr-2005 db <db@openbsd.org>

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 beau

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@

show more ...


# e54a2abf 22-Jul-2004 vincent <vincent@openbsd.org>

stage 1 of the infinite minibuffer work - add support for on the fly
buffer reallocation in veread(). This commit only changes the API.
All the buffers have exactly the same bounds as before for now

stage 1 of the infinite minibuffer work - add support for on the fly
buffer reallocation in veread(). This commit only changes the API.
All the buffers have exactly the same bounds as before for now.

tested by a couple of my very helpful testers!

show more ...


12