summaryrefslogtreecommitdiff
path: root/usr.bin/mg/def.h
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2002-02-13 22:36:59 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2002-02-13 22:36:59 +0000
commit217b0b07917ac5f475a49566515dbb0dd718e9e3 (patch)
treee65bfbec3cf2523e2b6f8825b457777dae446a66 /usr.bin/mg/def.h
parent89c154094948ee29b84f3b385e2c0dde6bbeca1f (diff)
Make mg malloc the l_text element instead of reallocating whole LINE
structures all the time.
Diffstat (limited to 'usr.bin/mg/def.h')
-rw-r--r--usr.bin/mg/def.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h
index bd2af3aae6b..cc880b52637 100644
--- a/usr.bin/mg/def.h
+++ b/usr.bin/mg/def.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: def.h,v 1.25 2002/02/13 03:03:49 vincent Exp $ */
+/* $OpenBSD: def.h,v 1.26 2002/02/13 22:36:58 vincent Exp $ */
/*
* This file is the general header file for all parts
@@ -121,11 +121,7 @@ typedef struct LINE {
struct LINE *l_bp; /* Link to the previous line */
int l_size; /* Allocated size */
int l_used; /* Used size */
-#ifndef ZEROARRAY
- char l_text[1]; /* A bunch of chars. */
-#else
- char l_text[]; /* A bunch of chars. */
-#endif
+ char *l_text; /* Content of the line */
} LINE;
/*
@@ -318,7 +314,7 @@ void upmodes __P((BUFFER *));
/* line.c X */
LINE *lalloc __P((int));
-LINE *lallocx __P((int));
+int lrealloc __P((LINE *, int));
void lfree __P((LINE *));
void lchange __P((int));
int linsert __P((int, int));