openbsd-ports/misc/mshell/patches/patch-mshell_c

54 lines
1.2 KiB
Plaintext

$OpenBSD: patch-mshell_c,v 1.2 2009/03/26 18:25:28 naddy Exp $
--- mshell.c.orig Thu Mar 26 12:17:55 2009
+++ mshell.c Thu Mar 26 12:18:03 2009
@@ -1,8 +1,10 @@
#include "mshell.h"
#include <setjmp.h>
-char * index ();
+#include <stdlib.h>
+#include <string.h>
+
extern char G_homevar [];
extern char G_uservar [];
extern char G_termvar [];
@@ -26,8 +28,7 @@ char *m;
exec_string [DESCLEN],
*args [MAXARGS],
*menu_array [LINES],
- tmpword [WORDLEN],
- *malloc();
+ tmpword [WORDLEN];
int i,
idx,
@@ -35,8 +36,7 @@ char *m;
firsttime = TRUE,
dontdisplay = FALSE,
unix_flag,
- menu_flag,
- exit();
+ menu_flag;
static jmp_buf topenv;
static int topenvset;
@@ -49,7 +49,7 @@ char *m;
signal (SIGPIPE, SIG_IGN); /* ignore dead pipes */
log("enter", m);
- while TRUE {
+ while (TRUE) {
if (!topenvset) {
topenvset = TRUE;
@@ -142,7 +142,7 @@ char *m;
if ( strcmp (action_string, NULLSTR) == 0 ) {
invalid_option = TRUE;
- printf ("\tNo such help option name as: %s\!\!\n", opt2);
+ printf ("\tNo such help option name as: %s!!\n", opt2);
}
else {
tmpword[0] = EOS;