summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2009-06-05 18:37:13 +0000
committerderaadt <deraadt@openbsd.org>2009-06-05 18:37:13 +0000
commit379e0739c05eca1b75994e61ebd814c0af60e51d (patch)
tree1d2f65b86f912a7ceb1c996f61210e60d862dc4b
parentemacs handles the undo of a region kill (C-w) differently than a line kill (diff)
downloadwireguard-openbsd-379e0739c05eca1b75994e61ebd814c0af60e51d.tar.xz
wireguard-openbsd-379e0739c05eca1b75994e61ebd814c0af60e51d.zip
swap function order to bring into scope
-rw-r--r--usr.bin/mg/buffer.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c
index 293f51008d5..948ce608942 100644
--- a/usr.bin/mg/buffer.c
+++ b/usr.bin/mg/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.72 2009/06/04 23:56:50 kjell Exp $ */
+/* $OpenBSD: buffer.c,v 1.73 2009/06/05 18:37:13 deraadt Exp $ */
/* This file is in the public domain. */
@@ -38,6 +38,26 @@ togglereadonly(int f, int n)
return (TRUE);
}
+/* Switch to the named buffer.
+ * If no name supplied, switch to the default (alternate) buffer.
+ */
+int
+usebufname(const char *bufp)
+{
+ struct buffer *bp;
+
+ if (bufp == NULL)
+ return (ABORT);
+ if (bufp[0] == '\0' && curbp->b_altb != NULL)
+ bp = curbp->b_altb;
+ else if ((bp = bfind(bufp, TRUE)) == NULL)
+ return (FALSE);
+
+ /* and put it in current window */
+ curbp = bp;
+ return (showbuffer(bp, curwp, WFFRAME | WFFULL));
+}
+
/*
* Attach a buffer to a window. The values of dot and mark come
* from the buffer if the use count is 0. Otherwise, they come
@@ -61,26 +81,6 @@ usebuffer(int f, int n)
return (usebufname(bufp));
}
-/* Switch to the named buffer.
- * If no name supplied, switch to the default (alternate) buffer.
- */
-int
-usebufname(const char *bufp)
-{
- struct buffer *bp;
-
- if (bufp == NULL)
- return (ABORT);
- if (bufp[0] == '\0' && curbp->b_altb != NULL)
- bp = curbp->b_altb;
- else if ((bp = bfind(bufp, TRUE)) == NULL)
- return (FALSE);
-
- /* and put it in current window */
- curbp = bp;
- return (showbuffer(bp, curwp, WFFRAME | WFFULL));
-}
-
/*
* pop to buffer asked for by the user.
*/