- store getopt's return value into an int, not a char

- getopt(3) returns -1 when out of arguments, not EOF
- rename patches with update-patches
This commit is contained in:
pvalchev 2002-02-23 23:45:18 +00:00
parent 7c67697d8c
commit ab4b094775
7 changed files with 69 additions and 41 deletions

View File

@ -1,28 +0,0 @@
--- contool.c.orig Thu Feb 24 09:55:30 1994
+++ contool.c Sun Jan 5 13:48:41 1997
@@ -284,6 +284,9 @@
EXPORT acquire_console()
{ int console;
+#if (defined(BSD) && (BSD >= 199306))
+ int i;
+#endif
#ifdef SVR4
if (slave > 0) {
@@ -293,8 +296,15 @@
abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]);
}
#else
+#if (defined(BSD) && (BSD >= 199306))
+ i=1;
+#endif
if (slave > 0)
+#if (defined(BSD) && (BSD >= 199306))
+ if (ioctl(slave, TIOCCONS, &i) == -1)
+#else
if (ioctl(slave, TIOCCONS, NULL) == -1)
+#endif
abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]);
#endif
}

View File

@ -1,5 +1,6 @@
--- Imakefile.orig Thu Feb 24 18:55:24 1994
+++ Imakefile Tue Apr 4 23:33:50 2000
$OpenBSD: patch-Imakefile,v 1.1 2002/02/23 23:45:18 pvalchev Exp $
--- Imakefile.orig Thu Feb 24 10:55:24 1994
+++ Imakefile Sat Feb 23 16:38:21 2002
@@ -1,19 +1,19 @@
# Mailer you use. Solaris 2.x users, change this to /usr/bin/mailx
-MAILER = /usr/ucb/mail

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-contool_c,v 1.1 2002/02/23 23:45:18 pvalchev Exp $
--- contool.c.orig Thu Feb 24 10:55:30 1994
+++ contool.c Sat Feb 23 16:39:06 2002
@@ -284,6 +284,9 @@ PRIVATE end_command()
EXPORT acquire_console()
{ int console;
+#if (defined(BSD) && (BSD >= 199306))
+ int i;
+#endif
#ifdef SVR4
if (slave > 0) {
@@ -293,8 +296,15 @@ EXPORT acquire_console()
abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]);
}
#else
+#if (defined(BSD) && (BSD >= 199306))
+ i=1;
+#endif
if (slave > 0)
+#if (defined(BSD) && (BSD >= 199306))
+ if (ioctl(slave, TIOCCONS, &i) == -1)
+#else
if (ioctl(slave, TIOCCONS, NULL) == -1)
+#endif
abend("%s: could not attach to /dev/console: %s", program, sys_errlist[errno]);
#endif
}
@@ -346,10 +356,11 @@ PRIVATE parse_options(argc, argv)
int *argc;
char **argv;
-{ char *s, c, path[1024], *log_file = NULL, *p;
+{ char *s, path[1024], *log_file = NULL, *p;
int log = FALSE;
static char cmdline[MAXPATHLEN + 10];
struct stat sb;
+ int c;
if (p = getenv(CONTOOL_FILTERS))
filter_file = strsave(p);
@@ -360,7 +371,7 @@ char **argv;
cmdline[0] = '\0';
- while ((c = get_option(argc, argv, "c:fi:lL:n?", &s)) != EOF)
+ while ((c = get_option(argc, argv, "c:fi:lL:n?", &s)) != -1)
switch (c) {
case 'c' : filter_file = expand_tilde(s);
explicit_filters = TRUE;

View File

@ -1,5 +1,6 @@
--- expand.c.orig Thu Feb 24 09:55:35 1994
+++ expand.c Sun Jan 5 12:25:09 1997
$OpenBSD: patch-expand_c,v 1.1 2002/02/23 23:45:18 pvalchev Exp $
--- expand.c.orig Thu Feb 24 10:55:35 1994
+++ expand.c Sat Feb 23 16:38:21 2002
@@ -17,6 +17,7 @@
/* without prior permission from Harris Corporation. */
/************************************************************************/

View File

@ -1,5 +1,6 @@
--- filters.c.orig Thu Feb 24 09:55:37 1994
+++ filters.c Sun Jan 5 13:51:25 1997
$OpenBSD: patch-filters_c,v 1.1 2002/02/23 23:45:18 pvalchev Exp $
--- filters.c.orig Thu Feb 24 10:55:37 1994
+++ filters.c Sat Feb 23 16:38:21 2002
@@ -25,12 +25,17 @@
#include <stdio.h>
@ -18,7 +19,7 @@
#include "manifest.h"
#include "contool.h"
#include "contool_ui.h"
@@ -122,8 +127,14 @@
@@ -122,8 +127,14 @@ Filter *f;
{
cond_free(f->start);

View File

@ -1,5 +1,6 @@
--- manifest.h.orig Thu Feb 24 09:55:52 1994
+++ manifest.h Sun Jan 5 13:52:40 1997
$OpenBSD: patch-manifest_h,v 1.1 2002/02/23 23:45:18 pvalchev Exp $
--- manifest.h.orig Thu Feb 24 10:55:52 1994
+++ manifest.h Sat Feb 23 16:38:21 2002
@@ -23,6 +23,9 @@
/* */
/************************************************************************/

View File

@ -1,5 +1,6 @@
--- regexp.c.orig Thu Feb 24 09:55:47 1994
+++ regexp.c Sun Jan 5 12:25:10 1997
$OpenBSD: patch-regexp_c,v 1.1 2002/02/23 23:45:18 pvalchev Exp $
--- regexp.c.orig Thu Feb 24 10:55:47 1994
+++ regexp.c Sat Feb 23 16:38:21 2002
@@ -17,22 +17,14 @@
/* without prior permission from Harris Corporation. */
/************************************************************************/
@ -25,7 +26,7 @@
PRIVATE char error_message[512];
@@ -49,37 +41,10 @@
@@ -49,37 +41,10 @@ char *str;
p = str + strlen(str) - 1;
if (p >= str && *p == '\n')
*p = '\0';
@ -65,7 +66,7 @@
}
/************************************************************************/
@@ -109,34 +74,40 @@
@@ -109,34 +74,40 @@ Filter *filter;
char *start;
char *stop;