summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbcallah <bcallah@openbsd.org>2015-03-16 13:47:48 +0000
committerbcallah <bcallah@openbsd.org>2015-03-16 13:47:48 +0000
commit3eb81a2ed4fc3a78121d7f87aa355d6de57e083c (patch)
treef260a491f5ee71d5e9e18523eeabc90dab22a518
parentChange the internal name of the newline function to deconflict with a (diff)
downloadwireguard-openbsd-3eb81a2ed4fc3a78121d7f87aa355d6de57e083c.tar.xz
wireguard-openbsd-3eb81a2ed4fc3a78121d7f87aa355d6de57e083c.zip
Change the internal name of the newline function to deconflict with a
function of the same name in term.h. This is the first step towards cleaning up mg's includes. No user-visible changes. ok florian@
-rw-r--r--usr.bin/mg/buffer.c4
-rw-r--r--usr.bin/mg/cmode.c4
-rw-r--r--usr.bin/mg/def.h4
-rw-r--r--usr.bin/mg/funmap.c4
-rw-r--r--usr.bin/mg/keymap.c6
-rw-r--r--usr.bin/mg/random.c4
-rw-r--r--usr.bin/mg/util.c4
-rw-r--r--usr.bin/mg/yank.c4
8 files changed, 17 insertions, 17 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c
index de7b59c71af..ba5a11dd1f8 100644
--- a/usr.bin/mg/buffer.c
+++ b/usr.bin/mg/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.94 2014/06/12 16:29:41 bcallah Exp $ */
+/* $OpenBSD: buffer.c,v 1.95 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain. */
@@ -761,7 +761,7 @@ bufferinsert(int f, int n)
return (FALSE);
if ((clp = lforw(clp)) == bp->b_headp)
break;
- if (newline(FFRAND, 1) == FALSE) /* fake newline */
+ if (enewline(FFRAND, 1) == FALSE) /* fake newline */
return (FALSE);
nline++;
}
diff --git a/usr.bin/mg/cmode.c b/usr.bin/mg/cmode.c
index 1fdd78c6903..4cc4d8774bd 100644
--- a/usr.bin/mg/cmode.c
+++ b/usr.bin/mg/cmode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmode.c,v 1.12 2015/01/13 17:02:28 bcallah Exp $ */
+/* $OpenBSD: cmode.c,v 1.13 2015/03/16 13:47:48 bcallah Exp $ */
/*
* This file is in the public domain.
*
@@ -201,7 +201,7 @@ cc_lfindent(int f, int n)
{
if (n < 0)
return (FALSE);
- if (newline(FFRAND, 1) == FALSE)
+ if (enewline(FFRAND, 1) == FALSE)
return (FALSE);
return (cc_indent(FFRAND, n));
}
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h
index 15cc5cf1eb2..1e07cf1697c 100644
--- a/usr.bin/mg/def.h
+++ b/usr.bin/mg/def.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: def.h,v 1.141 2014/04/03 20:17:12 lum Exp $ */
+/* $OpenBSD: def.h,v 1.142 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain. */
@@ -510,7 +510,7 @@ int showcpos(int, int);
int getcolpos(struct mgwin *);
int twiddle(int, int);
int openline(int, int);
-int newline(int, int);
+int enewline(int, int);
int deblank(int, int);
int justone(int, int);
int delwhite(int, int);
diff --git a/usr.bin/mg/funmap.c b/usr.bin/mg/funmap.c
index b10a2cda3af..ea5afa02559 100644
--- a/usr.bin/mg/funmap.c
+++ b/usr.bin/mg/funmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: funmap.c,v 1.47 2013/05/31 18:03:44 lum Exp $ */
+/* $OpenBSD: funmap.c,v 1.48 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain */
@@ -129,7 +129,7 @@ static struct funmap functnames[] = {
{markbuffer, "mark-whole-buffer",},
{do_meta, "meta-key-mode",}, /* better name, anyone? */
{negative_argument, "negative-argument",},
- {newline, "newline",},
+ {enewline, "newline",},
{lfindent, "newline-and-indent",},
{forwline, "next-line",},
#ifdef NOTAB
diff --git a/usr.bin/mg/keymap.c b/usr.bin/mg/keymap.c
index 8d52ada1da7..12c33859670 100644
--- a/usr.bin/mg/keymap.c
+++ b/usr.bin/mg/keymap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keymap.c,v 1.52 2014/08/14 12:22:58 bcallah Exp $ */
+/* $OpenBSD: keymap.c,v 1.53 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain. */
@@ -359,7 +359,7 @@ static PF fund_CJ[] = {
lfindent, /* ^J */
killline, /* ^K */
reposition, /* ^L */
- newline, /* ^M */
+ enewline, /* ^M */
forwline, /* ^N */
openline, /* ^O */
backline, /* ^P */
@@ -444,7 +444,7 @@ static struct KEYMAPE (1 + IMAPEXT) fillmap = {
};
static PF indent_lf[] = {
- newline, /* ^J */
+ enewline, /* ^J */
rescan, /* ^K */
rescan, /* ^L */
lfindent /* ^M */
diff --git a/usr.bin/mg/random.c b/usr.bin/mg/random.c
index ecf5d71805f..1a7eeb7fabe 100644
--- a/usr.bin/mg/random.c
+++ b/usr.bin/mg/random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: random.c,v 1.33 2014/03/26 22:02:06 lum Exp $ */
+/* $OpenBSD: random.c,v 1.34 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain. */
@@ -189,7 +189,7 @@ openline(int f, int n)
*/
/* ARGSUSED */
int
-newline(int f, int n)
+enewline(int f, int n)
{
int s;
diff --git a/usr.bin/mg/util.c b/usr.bin/mg/util.c
index 896d62324f1..01176a6eb28 100644
--- a/usr.bin/mg/util.c
+++ b/usr.bin/mg/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.33 2014/03/26 22:02:06 lum Exp $ */
+/* $OpenBSD: util.c,v 1.34 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain. */
@@ -189,7 +189,7 @@ openline(int f, int n)
*/
/* ARGSUSED */
int
-newline(int f, int n)
+enewline(int f, int n)
{
int s;
diff --git a/usr.bin/mg/yank.c b/usr.bin/mg/yank.c
index feafc7cd31b..cba0a7b65cf 100644
--- a/usr.bin/mg/yank.c
+++ b/usr.bin/mg/yank.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yank.c,v 1.11 2014/03/20 07:47:29 lum Exp $ */
+/* $OpenBSD: yank.c,v 1.12 2015/03/16 13:47:48 bcallah Exp $ */
/* This file is in the public domain. */
@@ -239,7 +239,7 @@ yank(int f, int n)
i = 0;
while ((c = kremove(i)) >= 0) {
if (c == '\n') {
- if (newline(FFRAND, 1) == FALSE)
+ if (enewline(FFRAND, 1) == FALSE)
return (FALSE);
++nline;
} else {