diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 00:00:00 -0800 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 00:00:00 -0800 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /gnu/libexec/uucp/libuucp | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) | |
download | src-5e0e9b99dc3fc0ecd49d929db0d57c784b66f481.tar.gz src-5e0e9b99dc3fc0ecd49d929db0d57c784b66f481.zip |
Release FreeBSD 1.1.5.1release/1.1.5.1_cvsreleng/1
This commit was manufactured to restore the state of the 1.1.5.1-RELEASE image.
Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'gnu/libexec/uucp/libuucp')
-rw-r--r-- | gnu/libexec/uucp/libuucp/MANIFEST | 1 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/Makefile | 7 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/buffer.c | 24 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/debug.c | 10 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/getlin.c | 2 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/parse.c | 20 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/status.c | 18 | ||||
-rw-r--r-- | gnu/libexec/uucp/libuucp/strtou.c | 21 |
8 files changed, 89 insertions, 14 deletions
diff --git a/gnu/libexec/uucp/libuucp/MANIFEST b/gnu/libexec/uucp/libuucp/MANIFEST index 093924858eac..4fe9c3b318e0 100644 --- a/gnu/libexec/uucp/libuucp/MANIFEST +++ b/gnu/libexec/uucp/libuucp/MANIFEST @@ -22,6 +22,7 @@ strncs.c strrch.c strstr.c strtol.c +strtou.c xfree.c xmall.c xreall.c diff --git a/gnu/libexec/uucp/libuucp/Makefile b/gnu/libexec/uucp/libuucp/Makefile index 604ea21c089d..e709431abc6a 100644 --- a/gnu/libexec/uucp/libuucp/Makefile +++ b/gnu/libexec/uucp/libuucp/Makefile @@ -1,9 +1,10 @@ # This is the Makefile for the libuucp subdirectory of Taylor UUCP -# $Id: Makefile,v 1.2 1993/08/16 16:22:34 jtc Exp $ +# $Id: Makefile,v 1.3 1994/05/07 18:13:29 ache Exp $ LIB= uucp -SRCS= buffer.c crc.c debug.c escape.c getopt.c getop1.c parse.c \ - spool.c status.c xfree.c xmall.c xreall.c getlin.c +SRCS = buffer.c crc.c debug.c escape.c getopt.c getop1.c parse.c spool.c \ + status.c xfree.c xmall.c xreall.c \ + getlin.c CFLAGS+= -I$(.CURDIR)/../common_sources NOMAN= noman diff --git a/gnu/libexec/uucp/libuucp/buffer.c b/gnu/libexec/uucp/libuucp/buffer.c index c44fa4513942..8ddb2219cf4f 100644 --- a/gnu/libexec/uucp/libuucp/buffer.c +++ b/gnu/libexec/uucp/libuucp/buffer.c @@ -1,7 +1,7 @@ /* buffer.c Manipulate buffers used to hold strings. - Copyright (C) 1992 Ian Lance Taylor + Copyright (C) 1992, 1993 Ian Lance Taylor This file is part of Taylor UUCP. @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author of the program may be contacted at ian@airs.com or - c/o Infinity Development Systems, P.O. Box 520, Waltham, MA 02254. + c/o Cygnus Support, Building 200, 1 Kendall Square, Cambridge, MA 02139. */ #include "uucp.h" @@ -97,13 +97,31 @@ void ubuffree (z) char *z; { - size_t ioff; struct sbuf *q; + /* The type of ioff should be size_t, but making it int avoids a bug + in some versions of the HP/UX compiler, and will always work. */ + int ioff; if (z == NULL) return; ioff = offsetof (struct sbuf, u); q = (struct sbuf *) (pointer) (z - ioff); + +#ifdef DEBUG_BUFFER + { + struct sbuf *qlook; + + for (qlook = qBlist; qlook != NULL; qlook = qlook->qnext) + { + if (qlook == q) + { + ulog (LOG_ERROR, "ubuffree: Attempt to free buffer twice"); + abort (); + } + } + } +#endif + q->qnext = qBlist; qBlist = q; } diff --git a/gnu/libexec/uucp/libuucp/debug.c b/gnu/libexec/uucp/libuucp/debug.c index 86f784154ab6..16c1b54891a8 100644 --- a/gnu/libexec/uucp/libuucp/debug.c +++ b/gnu/libexec/uucp/libuucp/debug.c @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author of the program may be contacted at ian@airs.com or - c/o Infinity Development Systems, P.O. Box 520, Waltham, MA 02254. + c/o Cygnus Support, Building 200, 1 Kendall Square, Cambridge, MA 02139. */ #include "uucp.h" @@ -29,6 +29,8 @@ #include "uudefs.h" +#if DEBUG > 1 + /* The debugging level. */ int iDebug; @@ -63,9 +65,9 @@ idebug_parse (z) iret = 0; - for (ztok = strtok (zcopy, ","); + for (ztok = strtok (zcopy, ", \t"); ztok != NULL; - ztok = strtok ((char *) NULL, ",")) + ztok = strtok ((char *) NULL, ", \t")) { if (strcasecmp (ztok, "all") == 0) { @@ -91,6 +93,8 @@ idebug_parse (z) return iret; } +#endif /* DEBUG > 1 */ + /* A debugging routine used when displaying buffers. */ size_t diff --git a/gnu/libexec/uucp/libuucp/getlin.c b/gnu/libexec/uucp/libuucp/getlin.c index 1c204e74ee30..983da7d18751 100644 --- a/gnu/libexec/uucp/libuucp/getlin.c +++ b/gnu/libexec/uucp/libuucp/getlin.c @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author of the program may be contacted at ian@airs.com or - c/o Infinity Development Systems, P.O. Box 520, Waltham, MA 02254. + c/o Cygnus Support, Building 200, 1 Kendall Square, Cambridge, MA 02139. */ #include "uucp.h" diff --git a/gnu/libexec/uucp/libuucp/parse.c b/gnu/libexec/uucp/libuucp/parse.c index e4b72435f5c6..a77350a68773 100644 --- a/gnu/libexec/uucp/libuucp/parse.c +++ b/gnu/libexec/uucp/libuucp/parse.c @@ -1,7 +1,7 @@ /* parse.c Parse a UUCP command string. - Copyright (C) 1991, 1992 Ian Lance Taylor + Copyright (C) 1991, 1992, 1993 Ian Lance Taylor This file is part of the Taylor UUCP package. @@ -20,13 +20,13 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author of the program may be contacted at ian@airs.com or - c/o Infinity Development Systems, P.O. Box 520, Waltham, MA 02254. + c/o Cygnus Support, Building 200, 1 Kendall Square, Cambridge, MA 02139. */ #include "uucp.h" #if USE_RCS_ID -const char parse_rcsid[] = "$Id: parse.c,v 1.1 1993/08/05 18:26:43 conklin Exp $"; +const char parse_rcsid[] = "$Id: parse.c,v 1.2 1994/05/07 18:13:33 ache Exp $"; #endif #include "uudefs.h" @@ -59,6 +59,7 @@ fparse_cmd (zcmd, qcmd) && qcmd->bcmd != 'P') return FALSE; + qcmd->bgrade = '\0'; qcmd->pseq = NULL; qcmd->zfrom = NULL; qcmd->zto = NULL; @@ -164,10 +165,21 @@ fparse_cmd (zcmd, qcmd) z = strtok ((char *) NULL, " \t\n"); if (z == NULL) return FALSE; - qcmd->imode = (int) strtol (z, &zend, 8); + qcmd->imode = (int) strtol (z, &zend, 0); if (*zend != '\0') return FALSE; + /* As a magic special case, if the mode came out as the decimal + values 666 or 777, assume that they actually meant the octal + values. Most systems use a leading zero, but a few do not. + Since both 666 and 777 are greater than the largest legal mode + value, which is 0777 == 511, this hack does not restrict any + legal values. */ + if (qcmd->imode == 666) + qcmd->imode = 0666; + else if (qcmd->imode == 777) + qcmd->imode = 0777; + z = strtok ((char *) NULL, " \t\n"); if (qcmd->bcmd == 'E' && z == NULL) return FALSE; diff --git a/gnu/libexec/uucp/libuucp/status.c b/gnu/libexec/uucp/libuucp/status.c index bee5f83dd08f..65e854ebdca2 100644 --- a/gnu/libexec/uucp/libuucp/status.c +++ b/gnu/libexec/uucp/libuucp/status.c @@ -7,6 +7,22 @@ /* Status strings. These must match enum tstatus_type. */ +#if USE_TRADITIONAL_STATUS + +const char *azStatus[] = +{ + "SUCCESSFUL", + "DEVICE FAILED", + "DIAL FAILED", + "LOGIN FAILED", + "STARTUP FAILED", + "CONVERSATION FAILED", + "TALKING", + "WRONG TIME TO CALL" +}; + +#else + const char *azStatus[] = { "Conversation complete", @@ -18,3 +34,5 @@ const char *azStatus[] = "Talking", "Wrong time to call" }; + +#endif diff --git a/gnu/libexec/uucp/libuucp/strtou.c b/gnu/libexec/uucp/libuucp/strtou.c new file mode 100644 index 000000000000..cd22506da301 --- /dev/null +++ b/gnu/libexec/uucp/libuucp/strtou.c @@ -0,0 +1,21 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#define UNSIGNED 1 + +#include "lib/strtol.c" |