head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.54 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.52 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.50 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.48 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.46 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.44 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.42 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.40 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.38 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.36 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.34 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.32 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.30 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.28 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.26 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.24 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.22 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.20 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.18 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.16 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.14 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.12 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.10 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.8 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.6 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.4 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 buildlink2-base:1.2 netbsd-1-4-PATCH001:1.1.1.1 netbsd-1-4-RELEASE:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.2 date 99.08.26.19.01.45; author jlam; state dead; branches; next 1.1; 1.1 date 98.12.03.15.08.53; author frueauf; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 98.12.03.15.08.53; author frueauf; state Exp; branches; next ; desc @@ 1.2 log @Update xisp to 2.6. Numerous bug-fixes and feature enhancements. @ text @$NetBSD: patch-af,v 1.1 1998/12/03 15:08:53 frueauf Exp $ --- xisp.c.orig Mon Oct 26 05:35:01 1998 +++ xisp.c Tue Dec 1 04:02:05 1998 @@@@ -299,13 +299,13 @@@@ { char emsg[MSGLEN_ERR+1]; -#ifndef SUNOS5x +#ifdef HAVE_STRERROR + sprintf(emsg, "xISP: %s: %s\n", msg, strerror(errno)); +#else if (errno < sys_nerr) sprintf(emsg, "xISP: %s: %s\n", msg, sys_errlist[errno]); else sprintf(emsg, "xISP: %s: error #%d\n", msg, errno); -#else - sprintf(emsg, "xISP: %s: %s\n", msg, strerror(errno)); #endif fputs(emsg, stderr); exit(1); @@@@ -497,13 +497,20 @@@@ global.pipePath, global.pipePath); exit(1); } +#if (defined(BSD) && BSD >= 199306) + if (mkfifo(Pipe, 0600)) /* directory is OK, so */ + doErr("namedPipe: mkfifo"); /* create the FIFO node */ +#else if (mknod(Pipe, S_IFIFO+0600, 0)) /* directory is OK, so */ doErr("namedPipe: mknod"); /* create the FIFO node */ +#endif } -#ifndef SUNOS5x - fd = open(fname, O_RDONLY|O_NDELAY); /* and open it for reading */ -#else +#ifdef SUNOS5x + fd = open(fname, O_RDONLY|O_NONBLOCK); /* and open it for reading */ +#elif (defined(BSD) && BSD >= 199306) fd = open(fname, O_RDONLY|O_NONBLOCK); /* and open it for reading */ +#else + fd = open(fname, O_RDONLY|O_NDELAY); /* and open it for reading */ #endif if (fd < 0) /* bail out on error */ doErr("namedPipe: open"); @@@@ -568,11 +575,11 @@@@ va_start(ap); /* start variable arg list */ fmt = va_arg(ap, char*); /* first string is format */ -#ifndef SUNOS41x - bw = vsprintf(btmp, fmt, ap); /* pass the rest to vsprintf */ -#else +#ifdef BROKEN_VSPRINTF vsprintf(btmp, fmt, ap); bw = strlen(btmp); +#else + bw = vsprintf(btmp, fmt, ap); /* pass the rest to vsprintf */ #endif va_end(ap); /* end variable arg list */ if ((tot+bw) < (MSGLEN_BROWSER-1)) /* do we have space for new? */ @@@@ -959,7 +966,7 @@@@ allow_detached is set, then init's PID (i.e., 1) is also considered a valid parent PID. */ -#if !defined(SUNOS41x) && !defined(SUNOS5x) +#if !defined(SUNOS41x) && !defined(SUNOS5x) && !(defined(BSD) && BSD >= 199306) int procPID(char *procname, int parentPID, int allow_detached) { DIR *procd; @@@@ -1015,6 +1022,8 @@@@ #ifdef SUNOS41x infofp = popen("/bin/ps -aclxw", "r"); /* open proc info stream */ +#elif (defined(BSD) && BSD >= 199306) + infofp = popen("/bin/ps -aclxw", "r"); /* open proc info stream */ #else infofp = popen("/bin/ps -el", "r"); /* open proc info stream */ #endif @@@@ -1026,6 +1035,10 @@@@ if (sscanf(psLine, "%*s %*s %d %d %*s" " %*s %*s %*s %*s %*s %*s %*s" " %*s %s", &pid, &ppid, name)) +#elif (defined(BSD) && BSD >= 199306) + if (sscanf(psLine, "%*s %d %d %*s" + " %*s %*s %*s %*s %*s %*s %*s" + " %*s %s", &pid, &ppid, name)) #else if (sscanf(psLine, "%*s %*s %*s %d %d" " %*s %*s %*s %*s %*s %*s %*s" @@@@ -1358,11 +1371,11 @@@@ va_start(ap); fmt = va_arg(ap, char*); -#ifndef SUNOS41x - bw = vsprintf(buf, fmt, ap); -#else +#ifdef BROKEN_VSPRINTF vsprintf(buf, fmt, ap); bw = strlen(buf); +#else + bw = vsprintf(buf, fmt, ap); #endif va_end(ap); fl_addto_browser(fd_logInfo->costBrowser, buf); @@@@ -1650,10 +1663,10 @@@@ strcat(res, "..."); len += 3; while (swidth > hsize && len > 3) { -#ifndef SUNOS41x - memmove(&res[len-5], &res[len-3], 4); -#else +#ifdef SUNOS41x bcopy(&res[len-3], &res[len-5], 4); +#else + memmove(&res[len-5], &res[len-3], 4); #endif len = strlen(res); swidth = fl_get_string_width(FL_NORMAL_STYLE, FL_NORMAL_SIZE, @@@@ -2370,10 +2383,10 @@@@ if (dialWait) dialWait = 0; /* no more waiting */ } else if (br < 0) { /* read failed */ -#ifndef SUNOS41x - if (errno != EAGAIN) /* pipe output unavailable? */ +#ifdef SUNOS41x + if (errno != EWOULDBLOCK) /* pipe output unavailable? */ #else - if (errno != EWOULDBLOCK) + if (errno != EAGAIN) #endif doErr("doBUpdate: read"); /* no, abort with diagnostic */ fl_set_timer(btimer, BU_INTERVAL); /* yes, restart timer */ @@@@ -2430,10 +2443,10 @@@@ fl_set_timer(btimer, BU_INTERVAL); /* and restart timer */ } else if (br < 0) { /* read failed */ -#ifndef SUNOS41x - if (errno != EAGAIN) /* pipe output unavailable? */ +#ifdef SUNOS41x + if (errno != EWOULDBLOCK) /* pipe output unavailable? */ #else - if (errno != EWOULDBLOCK) + if (errno != EAGAIN) #endif doErr("doBUpdate: read"); /* no, abort with diagnostic */ fl_set_timer(btimer, BU_INTERVAL); /* yes, restart timer */ @@@@ -2476,10 +2489,10 @@@@ fl_set_timer(btimer, BU_INTERVAL); /* and restart timer */ } else if (br < 0) { /* read failed */ -#ifndef SUNOS41x - if (errno != EAGAIN) /* pipe output unavailable? */ +#ifdef SUNOS41x + if (errno != EWOULDBLOCK) /* pipe output unavailable? */ #else - if (errno != EWOULDBLOCK) + if (errno != EAGAIN) #endif doErr("doBUpdate: read"); /* no, abort with diagnostic */ fl_set_timer(btimer, BU_INTERVAL); /* yes, restart timer */ @@@@ -3590,10 +3603,10 @@@@ if (a->cur < global.numISPs) { p_dest = &xispOptions[a->cur]; p_src = &xispOptions[(a->cur)+1]; -#ifndef SUNOS41x - memmove(p_dest, p_src, (global.numISPs-(a->cur))*sizeof(xisprc_t)); -#else +#ifdef SUNOS41x bcopy(p_src, p_dest, (global.numISPs-(a->cur))*sizeof(xisprc_t)); +#else + memmove(p_dest, p_src, (global.numISPs-(a->cur))*sizeof(xisprc_t)); #endif } else @@@@ -5330,10 +5343,10 @@@@ if (sPTT < (global.numPTTs-1)) { p_dest = &ptt[sPTT]; p_src = &ptt[sPTT+1]; -#ifndef SUNOS41x - memmove(p_dest, p_src, (global.numPTTs-sPTT-1)*sizeof(ptt_t)); -#else +#ifdef SUNOS41x bcopy(p_src, p_dest, (global.numPTTs-sPTT-1)*sizeof(ptt_t)); +#else + memmove(p_dest, p_src, (global.numPTTs-sPTT-1)*sizeof(ptt_t)); #endif } else { @@@@ -6710,10 +6723,10 @@@@ fontSelect(); /* select desired fonts */ (void) pppdVersion(); /* check pppd version */ -#ifndef SUNOS41x - atexit(exitCleanup); /* register cleanup proc */ -#else +#ifdef SUNOS41x on_exit(exitCleanup, 0); +#else + atexit(exitCleanup); /* register cleanup proc */ #endif recordPID(); /* check/write PID file */ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @Initial import of xisp-2.5p4, a user-friendly X11 interface to pppd/chat. Based on pr 6518 by Johnny C. Lam with some rework by me. @ text @@