summaryrefslogtreecommitdiff
path: root/usr.bin/vi
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-02-01 21:57:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-02-01 21:57:22 +0000
commitf2564f045af5276a45f57a1563d1e707b466b275 (patch)
tree659c4d58fa31322bf369540d52140b2166b543c9 /usr.bin/vi
parent160c8e93abc596a7db8918f3c3cef30d8fb18af2 (diff)
Move variable declarations around to compile with gcc 2
Diffstat (limited to 'usr.bin/vi')
-rw-r--r--usr.bin/vi/common/main.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c
index 099a346bc29..e50581972d2 100644
--- a/usr.bin/vi/common/main.c
+++ b/usr.bin/vi/common/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.17 2009/01/28 21:30:43 sobrado Exp $ */
+/* $OpenBSD: main.c,v 1.18 2009/02/01 21:57:21 miod Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -70,6 +70,18 @@ editor(gp, argc, argv)
int ch, flagchk, lflag, secure, startup, readonly, rval, silent;
char *tag_f, *wsizearg, path[256];
+ static const char *optstr[3] = {
+#ifdef DEBUG
+ "c:D:FlRrSsT:t:vw:",
+ "c:D:eFlRrST:t:w:",
+ "c:D:eFlrST:t:w:"
+#else
+ "c:FlRrSst:vw:",
+ "c:eFlRrSt:w:",
+ "c:eFlrSt:w:"
+#endif
+ };
+
/* Initialize the busy routine, if not defined by the screen. */
if (gp->scr_busy == NULL)
gp->scr_busy = vs_busy;
@@ -125,18 +137,6 @@ editor(gp, argc, argv)
else if (!strcmp(gp->progname, "view"))
pmode = MODE_VIEW;
- static const char *optstr[3] = {
-#ifdef DEBUG
- "c:D:FlRrSsT:t:vw:",
- "c:D:eFlRrST:t:w:",
- "c:D:eFlrST:t:w:"
-#else
- "c:FlRrSst:vw:",
- "c:eFlRrSt:w:",
- "c:eFlrSt:w:"
-#endif
- };
-
while ((ch = getopt(argc, argv, optstr[pmode])) != -1)
switch (ch) {
case 'c': /* Run the command. */