summaryrefslogtreecommitdiff
path: root/usr.bin/mg
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-23 15:39:36 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-23 15:39:36 +0000
commitbefeab973494be008db9819919a445fc67bfd219 (patch)
tree9b76663a767a809255e513fe795cce2df860c549 /usr.bin/mg
parent218a52aa50ed489e69cc656102edcf0e798655b0 (diff)
It's unnecessary to have addline as a function. Make it a macro.
Diffstat (limited to 'usr.bin/mg')
-rw-r--r--usr.bin/mg/buffer.c12
-rw-r--r--usr.bin/mg/def.h4
2 files changed, 3 insertions, 13 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c
index 9dd99ca70d6..cd86a29648c 100644
--- a/usr.bin/mg/buffer.c
+++ b/usr.bin/mg/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.8 2001/05/23 15:35:10 art Exp $ */
+/* $OpenBSD: buffer.c,v 1.9 2001/05/23 15:39:35 art Exp $ */
/*
* Buffer handling.
@@ -316,7 +316,6 @@ addlinef(BUFFER *bp, char *fmt, ...)
{
va_list ap;
LINE *lp;
- int i;
int ntext;
char dummy[1];
@@ -338,15 +337,6 @@ addlinef(BUFFER *bp, char *fmt, ...)
}
/*
- * Wrapper for addlinef with just one string. Should go away.
- */
-int
-addline(BUFFER *bp, char *text)
-{
- return addlinef(bp, "%s", text);
-}
-
-/*
* Look through the list of buffers, giving the user a chance to save them.
* Return TRUE if there are any changed buffers afterwards. Buffers that
* don't have an associated file don't count. Return FALSE if there are
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h
index a9f9ebaf102..ee05600f31d 100644
--- a/usr.bin/mg/def.h
+++ b/usr.bin/mg/def.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: def.h,v 1.11 2001/05/23 15:35:10 art Exp $ */
+/* $OpenBSD: def.h,v 1.12 2001/05/23 15:39:35 art Exp $ */
/*
* This file is the general header file for all parts
@@ -367,8 +367,8 @@ int poptobuffer __P((int, int));
int killbuffer __P((int, int));
int savebuffers __P((int, int));
int listbuffers __P((int, int));
-int addline __P((BUFFER *, char *));
int addlinef __P((BUFFER *, char *, ...));
+#define addline(bp, text) addlinef(bp, "%s", text)
int anycb __P((int));
int bclear __P((BUFFER *));
int showbuffer __P((BUFFER *, MGWIN *, int));