2000-03-12 07:21:27 +00:00
|
|
|
--- Wnn/jserver/de.c~ Fri Aug 19 10:31:23 1994
|
|
|
|
+++ Wnn/jserver/de.c Fri Mar 10 00:44:42 2000
|
1997-09-10 06:52:02 +00:00
|
|
|
@@ -65,6 +65,9 @@
|
|
|
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
|
|
|
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
|
|
+#include <sys/param.h>
|
|
|
|
+#endif
|
|
|
|
#ifdef SYSVR2
|
|
|
|
#include <sys/param.h>
|
|
|
|
#ifndef SIGCHLD
|
|
|
|
@@ -264,7 +267,16 @@
|
1997-02-28 09:24:51 +00:00
|
|
|
fclose(stdin);
|
|
|
|
fclose(stdout);
|
|
|
|
if(!noisy){
|
1997-09-10 06:52:02 +00:00
|
|
|
+#if !(defined(BSD) && (BSD >= 199306)) /* !4.4BSD-Lite by Taoka */
|
1997-02-28 09:24:51 +00:00
|
|
|
fclose(stderr);
|
1997-09-10 06:52:02 +00:00
|
|
|
+#else /* 4.4BSD-Lite */
|
1997-02-28 09:24:51 +00:00
|
|
|
+ int fd = open("/dev/null", O_WRONLY);
|
|
|
|
+ if (fd < 0) {
|
|
|
|
+ xerror("Cannot open /dev/null\n");
|
|
|
|
+ }
|
|
|
|
+ dup2(fd, 2);
|
|
|
|
+ close(fd);
|
1997-09-10 06:52:02 +00:00
|
|
|
+#endif /* 4.4BSD-Lite */
|
1997-02-28 09:24:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(hpux) || defined(SOLARIS)
|
2000-03-12 07:21:27 +00:00
|
|
|
@@ -542,10 +554,14 @@
|
|
|
|
|
|
|
|
/** **/
|
|
|
|
void
|
|
|
|
-gets_cur(cp)
|
|
|
|
+gets_cur(cp, len)
|
|
|
|
register char *cp;
|
|
|
|
+int len;
|
|
|
|
{
|
|
|
|
- while((*cp++ = getc_cur()) != '\0');
|
|
|
|
+ int i;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < len; i++)
|
|
|
|
+ if ((*(cp + i) = getc_cur()) == '\0') break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** **/
|
|
|
|
@@ -648,6 +664,17 @@
|
|
|
|
{
|
|
|
|
register int c;
|
|
|
|
while(c= *p++) putc_cur(c);
|
|
|
|
+ putc_cur(0);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/** **/
|
|
|
|
+void
|
|
|
|
+puts_n_cur(p,n)
|
|
|
|
+char *p;
|
|
|
|
+int n;
|
|
|
|
+{
|
|
|
|
+ register int c;
|
|
|
|
+ while((c = *p++) && --n >= 0) putc_cur(c);
|
|
|
|
putc_cur(0);
|
|
|
|
}
|
|
|
|
|