Remove trailing whitespace.

This commit is contained in:
Rodney W. Grimes 1995-05-30 05:51:47 +00:00
parent a2f0036ac4
commit 6c06b4e2aa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8870
563 changed files with 3986 additions and 3979 deletions

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: c++rt0.c,v 1.2 1994/01/29 01:58:31 jtc Exp $
* $Id: c++rt0.c,v 1.1 1994/03/09 17:12:59 nate Exp $
*/
/*
@ -46,7 +46,7 @@ __dtors(void)
{
unsigned long i = (unsigned long) __DTOR_LIST__[0];
void (**p)(void) = __DTOR_LIST__ + i;
while (i--)
(**p--)();
}

View File

@ -157,7 +157,7 @@ __bt_sync(dbp, flags)
goto ecrsr;
mpool_put(t->bt_mp, h, MPOOL_DIRTY);
}
if ((status = mpool_sync(t->bt_mp)) == RET_SUCCESS)
CLR(t, B_MODIFIED);

View File

@ -196,7 +196,7 @@ __bt_open(fname, flags, mode, openinfo, dflags)
default:
goto einval;
}
if ((t->bt_fd = open(fname, flags, mode)) < 0)
goto err;

View File

@ -185,7 +185,7 @@ typedef struct htab { /* Memory resident data structure */
* so it starts on this page and continues on the next.
* The format of the page is:
* KEY_OFF PARTIAL_KEY OVFL_PAGENO OVFLPAGE
*
*
* KEY_OFF -- offset of the beginning of the key
* PARTIAL_KEY -- 1
* OVFL_PAGENO - page number of the next overflow page
@ -220,7 +220,7 @@ typedef struct htab { /* Memory resident data structure */
* OVFL_PAGENO - page number of the next overflow page
* OVFLPAGE -- 0
*
* FULL_KEY_DATA
* FULL_KEY_DATA
* This must be the first key/data pair on the page.
* There are two cases:
*

View File

@ -688,7 +688,7 @@ overflow_page(hashp)
in_use_bits = free_bit;
else
in_use_bits = (hashp->BSIZE << BYTE_SHIFT) - 1;
if (i == first_page) {
bit = hashp->LAST_FREED &
((hashp->BSIZE << BYTE_SHIFT) - 1);

View File

@ -94,7 +94,7 @@ mpool_open(key, fd, pagesize, maxcache)
mp->free.cnext = mp->free.cprev = (BKT *)&mp->free;
mp->lru.cnext = mp->lru.cprev = (BKT *)&mp->lru;
for (entry = 0; entry < HASHSIZE; ++entry)
mp->hashtable[entry].hnext = mp->hashtable[entry].hprev =
mp->hashtable[entry].hnext = mp->hashtable[entry].hprev =
mp->hashtable[entry].cnext = mp->hashtable[entry].cprev =
(BKT *)&mp->hashtable[entry];
mp->curcache = 0;
@ -106,8 +106,8 @@ mpool_open(key, fd, pagesize, maxcache)
mp->pgin = mp->pgout = NULL;
#ifdef STATISTICS
mp->cachehit = mp->cachemiss = mp->pagealloc = mp->pageflush =
mp->pageget = mp->pagenew = mp->pageput = mp->pageread =
mp->cachehit = mp->cachemiss = mp->pagealloc = mp->pageflush =
mp->pageget = mp->pagenew = mp->pageput = mp->pageread =
mp->pagewrite = 0;
#endif
return (mp);
@ -132,7 +132,7 @@ mpool_filter(mp, pgin, pgout, pgcookie)
mp->pgout = pgout;
mp->pgcookie = pgcookie;
}
/*
* MPOOL_NEW -- get a new page
*
@ -335,7 +335,7 @@ mpool_sync(mp)
* mp: mpool cookie
*
* Returns:
* NULL on failure and a pointer to the BKT on success
* NULL on failure and a pointer to the BKT on success
*/
static BKT *
mpool_bkt(mp)
@ -478,7 +478,7 @@ mpool_stat(mp)
mp->pagealloc, mp->pageflush);
if (mp->cachehit + mp->cachemiss)
(void)fprintf(stderr,
"%.0f%% cache hit rate (%lu hits, %lu misses)\n",
"%.0f%% cache hit rate (%lu hits, %lu misses)\n",
((double)mp->cachehit / (mp->cachehit + mp->cachemiss))
* 100, mp->cachehit, mp->cachemiss);
(void)fprintf(stderr, "%lu page reads, %lu page writes\n",
@ -497,7 +497,7 @@ mpool_stat(mp)
cnt = 0;
} else
sep = ", ";
}
(void)fprintf(stderr, "\n");
}

View File

@ -143,7 +143,7 @@ einval: errno = EINVAL;
if (flags == R_SETCURSOR)
t->bt_rcursor = nrec;
SET(t, R_MODIFIED);
return (__rec_ret(t, NULL, nrec, key, NULL));
}

View File

@ -93,7 +93,7 @@ __rec_search(t, recno, op)
if (__bt_push(t, pg, index - 1) == RET_ERROR)
return (NULL);
pg = r->pgno;
switch (op) {
case SDELETE:

View File

@ -107,7 +107,7 @@ __rec_seq(dbp, key, data, flags)
einval: errno = EINVAL;
return (RET_ERROR);
}
if (t->bt_nrecs == 0 || nrec > t->bt_nrecs) {
if (!ISSET(t, R_EOF | R_INMEM) &&
(status = t->bt_irec(t, nrec)) != RET_SUCCESS)

View File

@ -629,7 +629,7 @@ load(db, argv)
key.size = sizeof(recno_t);
data.data = lp;
data.size = len + 1;
} else {
} else {
key.data = lp;
key.size = len + 1;
for (p = lp + len - 1, t = buf; p >= lp; *t++ = *p--);

View File

@ -337,7 +337,7 @@ get(dbp, kp)
/* NOTREACHED */
case 1:
(void)write(ofd, NOSUCHKEY, sizeof(NOSUCHKEY) - 1);
(void)fprintf(stderr, "%d: %.*s: %s\n",
(void)fprintf(stderr, "%d: %.*s: %s\n",
lineno, kp->size, kp->data, NOSUCHKEY);
break;
}
@ -443,7 +443,7 @@ dump(dbp, rev)
}
done: return;
}
u_int
setflags(s)
char *s;
@ -476,7 +476,7 @@ setflags(s)
err("line %lu: %s: unknown flag", lineno, s);
/* NOTREACHED */
}
DBTYPE
dbtype(s)
char *s;
@ -506,7 +506,7 @@ setinfo(type, s)
*eq++ = '\0';
if (!isdigit(*eq))
err("%s: structure set statement must be a number", s);
switch(type) {
case DB_BTREE:
if (!strcmp("flags", s)) {

View File

@ -110,5 +110,5 @@ main(argc, argv)
exit(0);
}

View File

@ -97,7 +97,7 @@ char **argv;
fprintf(stderr, "cannot enter: key %s\n",
item.data);
exit(1);
}
}
}
(dbp->close)(dbp);

View File

@ -99,7 +99,7 @@ char **argv;
fprintf(stderr, "cannot enter: key %s\n",
item.data);
exit(1);
}
}
}
if ( --argc ) {
@ -113,7 +113,7 @@ char **argv;
if (stat) {
fprintf ( stderr, "Error retrieving %s\n", key.data );
exit(1);
}
}
}
fclose(fp);
}

View File

@ -86,8 +86,8 @@ char **argv;
key.data = wp1;
item.data = wp2;
while ( fgets(wp1, 8192, stdin) &&
fgets(wp2, 8192, stdin) &&
while ( fgets(wp1, 8192, stdin) &&
fgets(wp2, 8192, stdin) &&
i++ < MAXWORDS) {
/*
* put info in structure, and structure in the item
@ -103,14 +103,14 @@ char **argv;
item.data);
fprintf(stderr, "\terrno: %d\n", errno);
exit(1);
}
}
}
if ( --argc ) {
fp = fopen ( argv[0], "r");
i = 0;
while ( fgets(wp1, 256, fp) &&
fgets(wp2, 8192, fp) &&
while ( fgets(wp1, 256, fp) &&
fgets(wp2, 8192, fp) &&
i++ < MAXWORDS) {
key.size = strlen(wp1);

View File

@ -72,7 +72,7 @@ char **argv;
/*
* put info in structure, and structure in the item
*/
for ( stat = (dbp->seq) (dbp, &res, &item, 1 );
for ( stat = (dbp->seq) (dbp, &res, &item, 1 );
stat == 0;
stat = (dbp->seq) (dbp, &res, &item, 0 ) ) {

View File

@ -1,5 +1,5 @@
# From: @(#)Makefile.inc 8.3 (Berkeley) 4/16/94
# $Id: Makefile.inc,v 1.14 1994/11/13 20:47:41 phk Exp $
# $Id: Makefile.inc,v 1.15 1994/12/18 14:06:38 guido Exp $
# machine-independent gen sources
.PATH: ${.CURDIR}/${MACHINE}/gen ${.CURDIR}/gen
@ -56,7 +56,7 @@ MAN3+= gen/alarm.3 gen/clock.3 gen/confstr.3 gen/config_open.3 \
gen/uname.3 gen/unvis.3 gen/usleep.3 gen/utime.3 gen/valloc.3 gen/vis.3
MLINKS+=config_open.3 config_next.3 config_open.3 config_close.3 \
config_open.3 config_skip.3
config_open.3 config_skip.3
MLINKS+=crypt.3 encrypt.3 crypt.3 setkey.3
MLINKS+=directory.3 closedir.3 directory.3 dirfd.3 directory.3 opendir.3 \
directory.3 readdir.3 directory.3 rewinddir.3 directory.3 seekdir.3 \

View File

@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";*/
static const char rcsid[] =
"$Id$";
"$Id: uname.c,v 1.2 1994/10/13 20:31:19 wollman Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -58,7 +58,7 @@ uname(name)
len = sizeof(name->sysname);
oerrno = errno;
if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) {
if(errno == ENOMEM)
if(errno == ENOMEM)
errno = oerrno;
else
rval = -1;
@ -69,7 +69,7 @@ uname(name)
len = sizeof(name->nodename);
oerrno = errno;
if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) {
if(errno == ENOMEM)
if(errno == ENOMEM)
errno = oerrno;
else
rval = -1;
@ -80,7 +80,7 @@ uname(name)
len = sizeof(name->release);
oerrno = errno;
if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) {
if(errno == ENOMEM)
if(errno == ENOMEM)
errno = oerrno;
else
rval = -1;

View File

@ -6,12 +6,12 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
* $Id$
* $Id: config.c,v 1.1 1994/11/13 20:47:43 phk Exp $
*
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$Id: config.c,v 1.1 1994/01/14 12:24:39 jkh Exp $";
static char rcsid[] = "$Id: config.c,v 1.1 1994/11/13 20:47:43 phk Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@ -21,7 +21,7 @@ static char rcsid[] = "$Id: config.c,v 1.1 1994/01/14 12:24:39 jkh Exp $";
* Will open the named file, read it into a private malloc'ed area,
* and close the file again.
* All lines where the first !isspace() char is '#' are deleted.
* If contlines are non-zero lines where the first char is isspace()
* If contlines are non-zero lines where the first char is isspace()
* will be joined to the preceeding line.
* In case of trouble the name of the offending system call will be
* returned. On success NULL is returned.
@ -93,8 +93,8 @@ config_open(const char *filename, int contlines)
/*
* /^[ \t]*#[^\n]*$/d
*
* Delete all lines where the first !isspace() char is '#'
*
* Delete all lines where the first !isspace() char is '#'
*/
ptr = file_buf;

View File

@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/* from static char sccsid[] = "@(#)crypt.c 5.11 (Berkeley) 6/25/91"; */
static char rcsid[] = "$Header: /a/cvs/386BSD/src/lib/libc/gen/crypt.c,v 1.6 1993/08/29 22:03:56 nate Exp $";
static char rcsid[] = "$Header: /home/ncvs/src/lib/libc/gen/crypt.c,v 1.2 1994/08/22 20:38:00 csgr Exp $";
#endif /* LIBC_SCCS and not lint */
#include <unistd.h>
@ -44,7 +44,7 @@ static char rcsid[] = "$Header: /a/cvs/386BSD/src/lib/libc/gen/crypt.c,v 1.6 199
/*
* UNIX password, and DES, encryption.
*
*
* since this is non-exportable, this is just a dummy. if you want real
* encryption, make sure you've got libcrypt.a around.
*/

View File

@ -149,13 +149,13 @@ rangematch(pattern, test, flags)
*/
if (negate = (*pattern == '!' || *pattern == '^'))
++pattern;
for (ok = 0; (c = *pattern++) != ']';) {
if (c == '\\' && !(flags & FNM_NOESCAPE))
c = *pattern++;
if (c == EOS)
return (NULL);
if (*pattern == '-'
if (*pattern == '-'
&& (c2 = *(pattern+1)) != EOS && c2 != ']') {
pattern += 2;
if (c2 == '\\' && !(flags & FNM_NOESCAPE))

View File

@ -313,7 +313,7 @@ fts_read(sp)
}
p->fts_info = FTS_DP;
return (p);
}
}
/* Rebuild if only read the names and now traversing. */
if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
@ -508,7 +508,7 @@ fts_children(sp, instr)
if (instr == FTS_NAMEONLY) {
sp->fts_options |= FTS_NAMEONLY;
instr = BNAMES;
} else
} else
instr = BCHILD;
/*
@ -680,7 +680,7 @@ mem1: saved_errno = errno;
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
#ifdef DT_DIR
|| nlinks > 0 &&
|| nlinks > 0 &&
dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN
#endif
) {
@ -774,7 +774,7 @@ fts_stat(sp, p, follow)
/* If user needs stat info, stat buffer already allocated. */
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
/*
* If doing a logical walk, or application requested FTS_FOLLOW, do
* a stat(2). If that fails, check for a non-existent symlink. If
@ -786,7 +786,7 @@ fts_stat(sp, p, follow)
if (!lstat(p->fts_accpath, sbp)) {
errno = 0;
return (FTS_SLNONE);
}
}
p->fts_errno = saved_errno;
goto err;
}
@ -919,7 +919,7 @@ fts_lfree(head)
* Allow essentially unlimited paths; find, rm, ls should all work on any tree.
* Most systems will allow creation of paths much longer than MAXPATHLEN, even
* though the kernel won't resolve them. Add the size (not just what's needed)
* plus 256 bytes so don't realloc the path 2 bytes at a time.
* plus 256 bytes so don't realloc the path 2 bytes at a time.
*/
static int
fts_palloc(sp, more)

View File

@ -313,7 +313,7 @@ fts_read(sp)
}
p->fts_info = FTS_DP;
return (p);
}
}
/* Rebuild if only read the names and now traversing. */
if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
@ -508,7 +508,7 @@ fts_children(sp, instr)
if (instr == FTS_NAMEONLY) {
sp->fts_options |= FTS_NAMEONLY;
instr = BNAMES;
} else
} else
instr = BCHILD;
/*
@ -680,7 +680,7 @@ mem1: saved_errno = errno;
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
#ifdef DT_DIR
|| nlinks > 0 &&
|| nlinks > 0 &&
dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN
#endif
) {
@ -774,7 +774,7 @@ fts_stat(sp, p, follow)
/* If user needs stat info, stat buffer already allocated. */
sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
/*
* If doing a logical walk, or application requested FTS_FOLLOW, do
* a stat(2). If that fails, check for a non-existent symlink. If
@ -786,7 +786,7 @@ fts_stat(sp, p, follow)
if (!lstat(p->fts_accpath, sbp)) {
errno = 0;
return (FTS_SLNONE);
}
}
p->fts_errno = saved_errno;
goto err;
}
@ -919,7 +919,7 @@ fts_lfree(head)
* Allow essentially unlimited paths; find, rm, ls should all work on any tree.
* Most systems will allow creation of paths much longer than MAXPATHLEN, even
* though the kernel won't resolve them. Add the size (not just what's needed)
* plus 256 bytes so don't realloc the path 2 bytes at a time.
* plus 256 bytes so don't realloc the path 2 bytes at a time.
*/
static int
fts_palloc(sp, more)

View File

@ -42,7 +42,7 @@ static char sccsid[] = "@(#)getcap.c 8.3 (Berkeley) 3/25/94";
#include <ctype.h>
#include <db.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
@ -198,7 +198,7 @@ getent(cap, len, db_array, fd, name, depth, nfield)
char *record, *cbuf;
int tc_not_resolved;
char pbuf[_POSIX_PATH_MAX];
/*
* Return with ``loop detected'' error if we've recursed more than
* MAX_RECURSION times.
@ -306,7 +306,7 @@ getent(cap, len, db_array, fd, name, depth, nfield)
for (;;) {
if (bp >= b_end) {
int n;
n = read(fd, buf, sizeof(buf));
if (n <= 0) {
if (myfd)
@ -323,7 +323,7 @@ getent(cap, len, db_array, fd, name, depth, nfield)
b_end = buf+n;
bp = buf;
}
c = *bp++;
if (c == '\n') {
if (rp > record && *(rp-1) == '\\') {
@ -335,7 +335,7 @@ getent(cap, len, db_array, fd, name, depth, nfield)
*rp++ = c;
/*
* Enforce loop invariant: if no room
* Enforce loop invariant: if no room
* left in record buffer, try to get
* some more.
*/
@ -364,13 +364,13 @@ getent(cap, len, db_array, fd, name, depth, nfield)
*/
if (eof)
break;
/*
* Toss blank lines and comments.
*/
if (*record == '\0' || *record == '#')
continue;
/*
* See if this is the record we want ...
*/
@ -431,7 +431,7 @@ tc_exp: {
tclen = s - tcstart;
tcend = s;
iret = getent(&icap, &ilen, db_p, fd, tc, depth+1,
iret = getent(&icap, &ilen, db_p, fd, tc, depth+1,
NULL);
newicap = icap; /* Put into a register. */
newilen = ilen;
@ -447,11 +447,11 @@ tc_exp: {
tc_not_resolved = 1;
/* couldn't resolve tc */
if (iret == -1) {
*(s - 1) = ':';
*(s - 1) = ':';
scan = s - 1;
tc_not_resolved = 1;
continue;
}
}
/* not interested in name field of tc'ed record */
@ -514,7 +514,7 @@ tc_exp: {
*/
scan = s-1;
}
}
/*
* Close file (if we opened it), give back any extra memory, and
@ -524,17 +524,17 @@ tc_exp: {
(void)close(fd);
*len = rp - record - 1; /* don't count NUL */
if (r_end > rp)
if ((record =
if ((record =
realloc(record, (size_t)(rp - record))) == NULL) {
errno = ENOMEM;
return (-2);
}
*cap = record;
if (tc_not_resolved)
return (1);
return (0);
}
}
static int
cdbget(capdbp, bp, name)
@ -564,7 +564,7 @@ cdbget(capdbp, bp, name)
key.data = (char *)data.data + 1;
key.size = data.size - 1;
}
*bp = (char *)data.data + 1;
return (((char *)(data.data))[0] == TCERR ? 1 : 0);
}
@ -641,7 +641,7 @@ cgetclose()
}
/*
* Cgetnext() gets either the first or next entry in the logical database
* Cgetnext() gets either the first or next entry in the logical database
* specified by db_array. It returns 0 upon completion of the database, 1
* upon returning an entry with more remaining, and -1 if an error occurs.
*/
@ -702,10 +702,10 @@ cgetnext(bp, db_array)
slash = 1;
else
slash = 0;
}
}
/*
/*
* Line points to a name line.
*/
i = 0;
@ -745,12 +745,12 @@ cgetnext(bp, db_array)
*rp++ = *cp;
*rp = '\0';
/*
* XXX
/*
* XXX
* Last argument of getent here should be nbuf if we want true
* sequential access in the case of duplicates.
* sequential access in the case of duplicates.
* With NULL, getent will return the first entry found
* rather than the duplicate entry record. This is a
* rather than the duplicate entry record. This is a
* matter of semantics that should be resolved.
*/
status = getent(bp, &dummy, db_array, -1, buf, 0, NULL);
@ -894,10 +894,10 @@ cgetstr(buf, cap, str)
* Cgetustr retrieves the value of the string capability cap from the
* capability record pointed to by buf. The difference between cgetustr()
* and cgetstr() is that cgetustr does not decode escapes but rather treats
* all characters literally. A pointer to a NUL terminated malloc'd
* copy of the string is returned in the char pointed to by str. The
* all characters literally. A pointer to a NUL terminated malloc'd
* copy of the string is returned in the char pointed to by str. The
* length of the string not including the trailing NUL is returned on success,
* -1 if the requested string capability couldn't be found, -2 if a system
* -1 if the requested string capability couldn't be found, -2 if a system
* error was encountered (storage allocation failure).
*/
int
@ -1039,10 +1039,10 @@ nfcmp(nf, rec)
{
char *cp, tmp;
int ret;
for (cp = rec; *cp != ':'; cp++)
;
tmp = *(cp + 1);
*(cp + 1) = '\0';
ret = strcmp(nf, rec);

View File

@ -338,7 +338,7 @@ _getypgroup(struct group *gr, const char *name, char *map)
return 0;
}
if(yp_match(_gr_yp_domain, map, name, strlen(name),
if(yp_match(_gr_yp_domain, map, name, strlen(name),
&result, &resultlen))
return 0;
@ -402,5 +402,5 @@ unpack:
}
return 1;
}
#endif /* YP */

View File

@ -192,7 +192,7 @@ innetgr(group, host, user, dom)
char *hst, *usr, *dm;
/* Sanity check */
if (group == NULL || !strlen(group))
return (0);

View File

@ -355,7 +355,7 @@ _createcaches()
n->next = namehead;
namehead = n;
}
/*
/*
* If netgroup 'foo' doesn't exist,
* try group 'foo' instead.
*/
@ -419,7 +419,7 @@ _createcaches()
n->next = namehead;
namehead = n;
}
/*
/*
* If netgroup 'foo' doesn't exist,
* try group 'foo' instead.
*/
@ -599,7 +599,7 @@ _getyppass(struct passwd *pw, const char *name, const char *map)
gotmaster++;
}
if(yp_match(_pw_yp_domain, (char *)&mastermap, name, strlen(name),
if(yp_match(_pw_yp_domain, (char *)&mastermap, name, strlen(name),
&result, &resultlen))
return 0;
@ -739,5 +739,5 @@ unpack:
}
return 1;
}
#endif /* YP */

View File

@ -72,7 +72,7 @@ getusershell()
void
endusershell()
{
if (shells != NULL)
free(shells);
shells = NULL;

View File

@ -83,7 +83,7 @@ getvfsbyname(const char *name)
}
for(i = 0; i < _vfslistlen; i++) {
if( ! strcmp(_vfslist[i].vfc_name, name) )
if( ! strcmp(_vfslist[i].vfc_name, name) )
break;
}
@ -113,7 +113,7 @@ getvfsbytype(int type)
}
for(i = 0; i < _vfslistlen; i++) {
if(_vfslist[i].vfc_index == type)
if(_vfslist[i].vfc_index == type)
break;
}

View File

@ -58,7 +58,7 @@ static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
* GLOB_TILDE:
* expand ~user/foo to the /home/dir/of/user/foo
* GLOB_BRACE:
* expand {1,2}{a,b} to 1a 1b 2a 2b
* expand {1,2}{a,b} to 1a 1b 2a 2b
* gl_matchc:
* Number of matches in the current invocation of glob.
*/
@ -173,7 +173,7 @@ glob(pattern, flags, errfunc, pglob)
bufend = bufnext + MAXPATHLEN;
if (flags & GLOB_QUOTE) {
/* Protect the quoted characters. */
while (bufnext < bufend && (c = *patnext++) != EOS)
while (bufnext < bufend && (c = *patnext++) != EOS)
if (c == QUOTE) {
if ((c = *patnext++) == EOS) {
c = QUOTE;
@ -184,8 +184,8 @@ glob(pattern, flags, errfunc, pglob)
else
*bufnext++ = c;
}
else
while (bufnext < bufend && (c = *patnext++) != EOS)
else
while (bufnext < bufend && (c = *patnext++) != EOS)
*bufnext++ = c;
*bufnext = EOS;
@ -246,7 +246,7 @@ static int globexp2(ptr, pattern, pglob, rv)
for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++)
continue;
if (*pe == EOS) {
/*
/*
* We could not find a matching RBRACKET.
* Ignore and just look for RBRACE
*/
@ -274,7 +274,7 @@ static int globexp2(ptr, pattern, pglob, rv)
for (pl = pm++; *pm != RBRACKET && *pm != EOS; pm++)
continue;
if (*pm == EOS) {
/*
/*
* We could not find a matching RBRACKET.
* Ignore and just look for RBRACE
*/
@ -299,7 +299,7 @@ static int globexp2(ptr, pattern, pglob, rv)
/* Append the current string */
for (lm = ls; (pl < pm); *lm++ = *pl++)
continue;
/*
/*
* Append the rest of the pattern after the
* closing brace
*/
@ -344,15 +344,15 @@ globtilde(pattern, patbuf, pglob)
return pattern;
/* Copy up to the end of the string or / */
for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH;
for (p = pattern + 1, h = (char *) patbuf; *p && *p != SLASH;
*h++ = *p++)
continue;
*h = EOS;
if (((char *) patbuf)[0] == EOS) {
/*
* handle a plain ~ or ~/ by expanding $HOME
/*
* handle a plain ~ or ~/ by expanding $HOME
* first and then trying the password file
*/
if ((h = getenv("HOME")) == NULL) {
@ -375,14 +375,14 @@ globtilde(pattern, patbuf, pglob)
/* Copy the home directory */
for (b = patbuf; *h; *b++ = *h++)
continue;
/* Append the rest of the pattern */
while ((*b++ = *p++) != EOS)
continue;
return patbuf;
}
/*
* The main glob() routine: compiles the pattern (optionally processing
@ -440,7 +440,7 @@ glob0(pattern, pglob)
break;
case STAR:
pglob->gl_flags |= GLOB_MAGCHAR;
/* collapse adjacent stars to one,
/* collapse adjacent stars to one,
* to avoid exponential behavior
*/
if (bufnext == patbuf || bufnext[-1] != M_ALL)
@ -460,17 +460,17 @@ glob0(pattern, pglob)
return(err);
/*
* If there was no match we are going to append the pattern
* If there was no match we are going to append the pattern
* if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified
* and the pattern did not contain any magic characters
* GLOB_NOMAGIC is there just for compatibility with csh.
*/
if (pglob->gl_pathc == oldpathc &&
((pglob->gl_flags & GLOB_NOCHECK) ||
if (pglob->gl_pathc == oldpathc &&
((pglob->gl_flags & GLOB_NOCHECK) ||
((pglob->gl_flags & GLOB_NOMAGIC) &&
!(pglob->gl_flags & GLOB_MAGCHAR))))
return(globextend(pattern, pglob));
else if (!(pglob->gl_flags & GLOB_NOSORT))
else if (!(pglob->gl_flags & GLOB_NOSORT))
qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc,
pglob->gl_pathc - oldpathc, sizeof(char *), compare);
return(0);
@ -519,7 +519,7 @@ glob2(pathbuf, pathend, pattern, pglob)
*pathend = EOS;
if (g_lstat(pathbuf, &sb, pglob))
return(0);
if (((pglob->gl_flags & GLOB_MARK) &&
pathend[-1] != SEP) && (S_ISDIR(sb.st_mode)
|| (S_ISLNK(sb.st_mode) &&
@ -572,7 +572,7 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob)
*pathend = EOS;
errno = 0;
if ((dirp = g_opendir(pathbuf, pglob)) == NULL) {
/* TODO: don't call for ENOENT or ENOTDIR? */
if (pglob->gl_errfunc) {
@ -598,7 +598,7 @@ glob3(pathbuf, pathend, pattern, restpattern, pglob)
/* Initial DOT must be matched literally. */
if (dp->d_name[0] == DOT && *pattern != DOT)
continue;
for (sc = (u_char *) dp->d_name, dc = pathend;
for (sc = (u_char *) dp->d_name, dc = pathend;
(*dc++ = *sc++) != EOS;)
continue;
if (!match(pathend, pattern, restpattern)) {
@ -644,7 +644,7 @@ globextend(path, pglob)
const Char *p;
newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs);
pathv = pglob->gl_pathv ?
pathv = pglob->gl_pathv ?
realloc((char *)pglob->gl_pathv, newsize) :
malloc(newsize);
if (pathv == NULL)
@ -686,7 +686,7 @@ match(name, pat, patend)
case M_ALL:
if (pat == patend)
return(1);
do
do
if (match(name, pat, patend))
return(1);
while (*name++ != EOS);
@ -825,7 +825,7 @@ g_Ctoc(str, buf)
}
#ifdef DEBUG
static void
static void
qprintf(str, s)
const char *str;
register Char *s;

View File

@ -95,8 +95,8 @@ __fdnlist(fd, list)
* does not start at a page boundary - we save ourselves a
* lot of nastiness by mmapping the whole file.
*
* This gives us an easy way to randomly access all the strings,
* without making the memory allocation permanent as with
* This gives us an easy way to randomly access all the strings,
* without making the memory allocation permanent as with
* malloc/free (i.e., munmap will return it to the system).
*/
a_out_mmap = mmap(NULL, (size_t)st.st_size, PROT_READ, 0, fd, (off_t)0);

View File

@ -53,8 +53,8 @@ static struct pid {
struct pid *next;
FILE *fp;
pid_t pid;
} *pidlist;
} *pidlist;
FILE *
popen(program, type)
const char *program;
@ -155,6 +155,6 @@ pclose(iop)
else
last->next = cur->next;
free(cur);
return (pid == -1 ? -1 : pstat.w_status);
}

View File

@ -79,7 +79,7 @@ scandir(dirname, namelist, select, dcomp)
/*
* estimate the array size by taking the size of the directory file
* and dividing it by a multiple of the minimum size entry.
* and dividing it by a multiple of the minimum size entry.
*/
arraysz = (stb.st_size / 24);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));

View File

@ -190,7 +190,7 @@ setmode(p)
(void)sigprocmask(SIG_SETMASK, &sigoset, NULL);
setlen = SET_LEN + 2;
if ((set = malloc((u_int)(sizeof(BITCMD) * setlen))) == NULL)
return (NULL);
saveset = set;
@ -368,7 +368,7 @@ addcmd(set, op, who, oparg, mask)
set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS;
set->bits = mask;
}
if (oparg == '+')
set->cmd2 |= CMD2_SET;
else if (oparg == '-')
@ -399,7 +399,7 @@ dumpmode(set)
/*
* Given an array of bitcmd structures, compress by compacting consecutive
* '+', '-' and 'X' commands into at most 3 commands, one of each. The 'u',
* 'g' and 'o' commands continue to be separate. They could probably be
* 'g' and 'o' commands continue to be separate. They could probably be
* compacted, but it's not worth the effort.
*/
static int

View File

@ -184,5 +184,5 @@ yesno: if (sysctl(mib, 2, &value, &len, NULL, 0) == -1)
errno = EINVAL;
return (-1);
}
return (sysctl(mib, 2, &value, &len, NULL, 0) == -1 ? -1 : value);
return (sysctl(mib, 2, &value, &len, NULL, 0) == -1 ? -1 : value);
}

View File

@ -49,7 +49,7 @@ static char sccsid[] = "@(#)telldir.c 8.1 (Berkeley) 6/4/93";
/*
* One of these structures is malloced to describe the current directory
* position each time telldir is called. It records the current magic
* position each time telldir is called. It records the current magic
* cookie returned by getdirentries and the offset within the buffer
* associated with that return value.
*/

View File

@ -50,9 +50,9 @@ ttyslot()
char *name;
setttyent();
for (cnt = 0; cnt < 3; ++cnt)
for (cnt = 0; cnt < 3; ++cnt)
if (name = ttyname(cnt)) {
if (p = rindex(name, '/'))
if (p = rindex(name, '/'))
++p;
else
p = name;

View File

@ -54,7 +54,7 @@ ualarm(usecs, reload)
new.it_interval.tv_usec = reload % USPS;
new.it_interval.tv_sec = reload / USPS;
new.it_value.tv_usec = usecs % USPS;
new.it_value.tv_sec = usecs / USPS;

View File

@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "From: @(#)uname.c 8.1 (Berkeley) 1/4/94";*/
static const char rcsid[] =
"$Id$";
"$Id: uname.c,v 1.2 1994/10/13 20:31:19 wollman Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -58,7 +58,7 @@ uname(name)
len = sizeof(name->sysname);
oerrno = errno;
if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) {
if(errno == ENOMEM)
if(errno == ENOMEM)
errno = oerrno;
else
rval = -1;
@ -69,7 +69,7 @@ uname(name)
len = sizeof(name->nodename);
oerrno = errno;
if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) {
if(errno == ENOMEM)
if(errno == ENOMEM)
errno = oerrno;
else
rval = -1;
@ -80,7 +80,7 @@ uname(name)
len = sizeof(name->release);
oerrno = errno;
if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) {
if(errno == ENOMEM)
if(errno == ENOMEM)
errno = oerrno;
else
rval = -1;

View File

@ -65,7 +65,7 @@ unvis(cp, c, astate, flag)
if (*astate == S_OCTAL2 || *astate == S_OCTAL3) {
*astate = S_GROUND;
return (UNVIS_VALID);
}
}
return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
}
@ -76,7 +76,7 @@ unvis(cp, c, astate, flag)
if (c == '\\') {
*astate = S_START;
return (0);
}
}
*cp = c;
return (UNVIS_VALID);
@ -149,7 +149,7 @@ unvis(cp, c, astate, flag)
}
*astate = S_GROUND;
return (UNVIS_SYNBAD);
case S_META:
if (c == '-')
*astate = S_META1;
@ -160,12 +160,12 @@ unvis(cp, c, astate, flag)
return (UNVIS_SYNBAD);
}
return (0);
case S_META1:
*astate = S_GROUND;
*cp |= c;
return (UNVIS_VALID);
case S_CTRL:
if (c == '?')
*cp |= 0177;
@ -176,15 +176,15 @@ unvis(cp, c, astate, flag)
case S_OCTAL2: /* second possible octal digit */
if (isoctal(c)) {
/*
* yes - and maybe a third
/*
* yes - and maybe a third
*/
*cp = (*cp << 3) + (c - '0');
*astate = S_OCTAL3;
*astate = S_OCTAL3;
return (0);
}
/*
* no - done with current sequence, push back passed char
}
/*
* no - done with current sequence, push back passed char
*/
*astate = S_GROUND;
return (UNVIS_VALIDPUSH);
@ -199,10 +199,10 @@ unvis(cp, c, astate, flag)
* we were done, push back passed char
*/
return (UNVIS_VALIDPUSH);
default:
/*
* decoder in unknown state - (probably uninitialized)
default:
/*
* decoder in unknown state - (probably uninitialized)
*/
*astate = S_GROUND;
return (UNVIS_SYNBAD);
@ -210,7 +210,7 @@ unvis(cp, c, astate, flag)
}
/*
* strunvis - decode src into dst
* strunvis - decode src into dst
*
* Number of chars decoded into dst is returned, -1 on error.
* Dst is null terminated.

View File

@ -111,7 +111,7 @@ vis(dst, c, flag, nextc)
goto done;
}
}
if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) {
if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) {
*dst++ = '\\';
*dst++ = ((u_char)c >> 6 & 07) + '0';
*dst++ = ((u_char)c >> 3 & 07) + '0';
@ -141,10 +141,10 @@ done:
/*
* strvis, strvisx - visually encode characters from src into dst
*
*
* Dst must be 4 times the size of src to account for possible
* expansion. The length of dst, not including the trailing NULL,
* is returned.
* is returned.
*
* Strvisx encodes exactly len bytes from src into dst.
* This is useful for encoding a block of data.

View File

@ -106,7 +106,7 @@ monstartup(lowpc, highpc)
s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
#else /* avoid floating point */
int quot = o / p->kcountsize;
if (quot >= 0x10000)
s_scale = 1;
else if (quot >= 0x100)
@ -239,7 +239,7 @@ static int
hertz()
{
struct itimerval tim;
tim.it_interval.tv_sec = 0;
tim.it_interval.tv_usec = 1;
tim.it_value.tv_sec = 0;

View File

@ -51,7 +51,7 @@ static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
* _mcount updates data structures that represent traversals of the
* program's call graph edges. frompc and selfpc are the return
* address and function address that represents the given call graph edge.
*
*
* Note: the original BSD code used the same variable (frompcindex) for
* both frompcindex and frompc. Any reasonable, modern compiler will
* perform this optimization.
@ -158,7 +158,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
*frompcindex = toindex;
goto done;
}
}
done:
#ifdef KERNEL

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 1993 John Brezak
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -12,7 +12,7 @@
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -24,12 +24,12 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
* $Id: i386_get_ldt.c,v 1.2 1995/01/23 01:29:50 davidg Exp $
*/
#if defined(LIBC_RCS) && !defined(lint)
static const char rcsid[] = "$Id$";
static const char rcsid[] = "$Id: i386_get_ldt.c,v 1.2 1995/01/23 01:29:50 davidg Exp $";
#endif /* LIBC_RCS and not lint */
#include <sys/cdefs.h>
@ -50,6 +50,6 @@ i386_get_ldt(int start, union descriptor *descs, int num)
p.start = start;
p.descs = descs;
p.num = num;
return sysarch(I386_GET_LDT, (char *)&p);
}

View File

@ -1,7 +1,7 @@
/*
* Copyright (c) 1993 John Brezak
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -12,7 +12,7 @@
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -24,12 +24,12 @@
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
*
* $Id: i386_set_ldt.c,v 1.2 1995/01/23 01:29:53 davidg Exp $
*/
#if defined(LIBC_RCS) && !defined(lint)
static const char rcsid[] = "$Id$";
static const char rcsid[] = "$Id: i386_set_ldt.c,v 1.2 1995/01/23 01:29:53 davidg Exp $";
#endif /* LIBC_RCS and not lint */
#include <sys/cdefs.h>
@ -50,6 +50,6 @@ i386_set_ldt(int start, union descriptor *descs, int num)
p.start = start;
p.descs = descs;
p.num = num;
return sysarch(I386_SET_LDT, (char *)&p);
}

View File

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: collate.c,v 1.2 1995/02/17 16:36:12 ache Exp $
* $Id: collate.c,v 1.3 1995/02/18 01:42:02 ache Exp $
*/
#include <rune.h>
@ -50,7 +50,7 @@ struct __collate_st_chain_pri __collate_chain_pri_table[TABLE_SIZE];
return -1; \
} \
} while(0)
__dead void __collate_err(int ex, const char *f) __dead2;
int

View File

@ -128,7 +128,7 @@ _Read_RuneMagi(fp)
if (!rl->mapupper_ext.nranges)
rl->mapupper_ext.ranges = 0;
return(rl);
}

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: gethostbydns.c,v 1.2 1994/09/25 17:45:37 pst Exp $";
static char rcsid[] = "$Id: gethostbydns.c,v 1.3 1994/12/01 22:25:38 wollman Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -123,7 +123,7 @@ addrsort(ap, num)
p = ap;
for (i = 0; i < num; i++, p++) {
for (j = 0 ; j < _res.nsort; j++)
if (_res.sort_list[j].addr.s_addr ==
if (_res.sort_list[j].addr.s_addr ==
(((struct in_addr *)(*p))->s_addr & _res.sort_list[j].mask))
break;
aval[i] = j;
@ -410,7 +410,7 @@ _gethostbydnsname(name)
host.h_addr_list = h_addr_ptrs;
return (&host);
}
if (!isdigit(*cp) && *cp != '.')
if (!isdigit(*cp) && *cp != '.')
break;
}
@ -432,7 +432,7 @@ _gethostbydnsaddr(addr, len, type)
register struct hostent *hp;
char qbuf[MAXDNAME+1];
int o_res_options = _res.options;
if (type != AF_INET)
return (NULL);
(void)sprintf(qbuf, "%u.%u.%u.%u.in-addr.arpa",

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: gethostnamadr.c,v 1.1 1994/05/27 04:57:16 rgrimes Exp $";
static char rcsid[] = "$Id: gethostbyht.c,v 1.1 1994/09/25 02:12:11 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -129,7 +129,7 @@ again:
host.h_name = cp;
q = host.h_aliases = host_aliases;
cp = strpbrk(cp, " \t");
if (cp != NULL)
if (cp != NULL)
*cp++ = '\0';
while (cp && *cp) {
if (*cp == ' ' || *cp == '\t') {
@ -152,7 +152,7 @@ _gethostbyhtname(name)
{
register struct hostent *p;
register char **cp;
sethostent(0);
while ((p = gethostent())) {
if (strcasecmp(p->h_name, name) == 0)

View File

@ -24,8 +24,8 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)$Id: gethostnamadr.c,v 1.5 1994/09/25 02:12:18 pst Exp $";
static char rcsid[] = "$Id: gethostnamadr.c,v 1.5 1994/09/25 02:12:18 pst Exp $";
static char sccsid[] = "@(#)$Id: gethostnamadr.c,v 1.6 1995/03/24 15:38:54 ache Exp $";
static char rcsid[] = "$Id: gethostnamadr.c,v 1.6 1995/03/24 15:38:54 ache Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -47,7 +47,7 @@ extern struct hostent * _gethostbynisaddr __P((const char *, int, int));
#define _PATH_HOSTCONF "/etc/host.conf"
enum service_type {
enum service_type {
SERVICE_NONE = 0,
SERVICE_BIND,
SERVICE_HOSTS,

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)gethostnamadr.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: getnetbydns.c,v 1.1 1994/09/25 02:12:20 pst Exp $";
static char rcsid[] = "$Id: getnetbydns.c,v 1.2 1994/09/25 17:45:38 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -168,7 +168,7 @@ static char *net_aliases[MAXALIASES],
cp += n;
return (NULL);
}
cp += n;
cp += n;
*ap++ = bp;
bp += (strlen(bp) + 1);
net_entry.n_addrtype = (class == C_IN)
@ -204,7 +204,7 @@ static char *net_aliases[MAXALIASES],
paux1 = pauxt;
}
in = ++st;
}
}
net_entry.n_net = inet_network(paux2);
}
net_entry.n_aliases++;
@ -277,7 +277,7 @@ _getnetbydnsname(net)
int anslen;
querybuf buf;
char qbuf[MAXDNAME];
(void)strcpy(&qbuf[0],net);
anslen = res_search(qbuf, C_IN, T_PTR, buf.buf, sizeof buf.buf);
if (anslen < 0) {

View File

@ -103,7 +103,7 @@ again:
net.n_net = inet_network(cp);
net.n_addrtype = AF_INET;
q = net.n_aliases = net_aliases;
if (p != NULL)
if (p != NULL)
cp = p;
while (cp && *cp) {
if (*cp == ' ' || *cp == '\t') {

View File

@ -24,8 +24,8 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)$Id: getnetbynis.c,v 1.1 1994/09/25 02:12:26 pst Exp $";
static char rcsid[] = "$Id: getnetbynis.c,v 1.1 1994/09/25 02:12:26 pst Exp $";
static char sccsid[] = "@(#)$Id: getnetbynis.c,v 1.2 1994/09/26 02:50:43 wollman Exp $";
static char rcsid[] = "$Id: getnetbynis.c,v 1.2 1994/09/26 02:50:43 wollman Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -122,13 +122,13 @@ _getnetbynisaddr(addr, type)
if (type != AF_INET)
return (NULL);
in.s_addr = addr;
in.s_addr = addr;
str = inet_ntoa(in);
cp = str + strlen(str) - 2;
while(!strcmp(cp, ".0")) {
*cp = '\0';
cp = str + strlen(str) - 2;
}
return _getnetbynis(str, "networks.byaddr");
}

View File

@ -24,8 +24,8 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)$Id: getnetnamadr.c,v 1.2 1994/09/26 22:45:10 wollman Exp $";
static char rcsid[] = "$Id: getnetnamadr.c,v 1.2 1994/09/26 22:45:10 wollman Exp $";
static char sccsid[] = "@(#)$Id: getnetnamadr.c,v 1.3 1995/03/24 15:51:30 ache Exp $";
static char rcsid[] = "$Id: getnetnamadr.c,v 1.3 1995/03/24 15:51:30 ache Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -49,7 +49,7 @@ extern struct netent * _getnetbynisaddr __P((long, int));
#define _PATH_NETCONF "/etc/host.conf"
#endif
enum service_type {
enum service_type {
SERVICE_NONE = 0,
SERVICE_BIND,
SERVICE_TABLE,

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)herror.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: herror.c,v 4.9.1.1 1993/05/02 23:14:35 vixie Rel $";
static char rcsid[] = "$Id: herror.c,v 1.1.1.1 1994/05/27 04:57:15 rgrimes Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -55,7 +55,7 @@ inet_addr(cp)
return (INADDR_NONE);
}
/*
/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
@ -93,7 +93,7 @@ inet_aton(cp, addr)
continue;
}
if (base == 16 && isascii(c) && isxdigit(c)) {
val = (val << 4) +
val = (val << 4) +
(c + 10 - (islower(c) ? 'a' : 'A'));
cp++;
continue;

View File

@ -65,7 +65,7 @@ iso_addr(addr)
new = *addr - 'a' + 10;
} else if ((*addr >= 'A') && (*addr <= 'F')) {
new = *addr - 'A' + 10;
} else if (*addr == 0)
} else if (*addr == 0)
state |= END;
else
state |= DELIM;
@ -86,7 +86,7 @@ iso_addr(addr)
break;
}
break;
} while (cp < cplim);
} while (cp < cplim);
out_addr.isoa_len = cp - out_addr.isoa_genaddr;
return (&out_addr);
}

View File

@ -112,7 +112,7 @@ link_addr(addr, sdl)
break;
}
break;
} while (cp < cplim);
} while (cp < cplim);
sdl->sdl_alen = cp - LLADDR(sdl);
new = cp - (char *)sdl;
if (new > sizeof(*sdl))
@ -127,7 +127,7 @@ link_ntoa(sdl)
register const struct sockaddr_dl *sdl;
{
static char obuf[64];
register char *out = obuf;
register char *out = obuf;
register int i;
register u_char *in = (u_char *)LLADDR(sdl);
u_char *inlim = in + sdl->sdl_alen;

View File

@ -47,7 +47,7 @@ static struct ns_addr addr, zero_addr;
static void Field(), cvtbase();
struct ns_addr
struct ns_addr
ns_addr(name)
const char *name;
{
@ -157,7 +157,7 @@ Field(buf, out, len)
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
base16 = 1;
break;
case 'x': case 'X':
*--bp = '0';
base16 = 1;

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: res_comp.c,v 4.9.1.11 1994/07/23 23:24:11 vixie Exp $";
static char rcsid[] = "$Id: res_comp.c,v 1.2 1994/09/25 02:12:32 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: res_debug.c,v 4.9.1.16 1994/07/11 07:41:13 vixie Exp $";
static char rcsid[] = "$Id: res_debug.c,v 1.2 1994/09/25 02:12:34 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -291,7 +291,7 @@ __fp_nquery(msg, len, file)
fprintf(file, ", Auth: %d", ntohs(hp->nscount));
fprintf(file, ", Addit: %d", ntohs(hp->arcount));
}
if ((!_res.pfcode) || (_res.pfcode &
if ((!_res.pfcode) || (_res.pfcode &
(RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
putc('\n',file);
}

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
static char rcsid[] = "$Id: res_init.c,v 1.2 1994/09/25 02:12:36 pst Exp $";
static char rcsid[] = "$Id: res_init.c,v 1.3 1994/09/25 17:45:39 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -91,7 +91,7 @@ struct __res_state _res;
* since it was noted that INADDR_ANY actually meant ``the first interface
* you "ifconfig"'d at boot time'' and if this was a SLIP or PPP interface,
* it had to be "up" in order for you to reach your own name server. It
* was later decided that since the recommended practice is to always
* was later decided that since the recommended practice is to always
* install local static routes through 127.0.0.1 for all your network
* interfaces, that we could solve this problem without a code change.
*
@ -287,11 +287,11 @@ res_init()
if (inet_aton(net, &a)) {
_res.sort_list[nsort].mask = a.s_addr;
} else {
_res.sort_list[nsort].mask =
_res.sort_list[nsort].mask =
net_mask(_res.sort_list[nsort].addr);
}
} else {
_res.sort_list[nsort].mask =
_res.sort_list[nsort].mask =
net_mask(_res.sort_list[nsort].addr);
}
nsort++;
@ -306,7 +306,7 @@ res_init()
continue;
}
}
if (nserv > 1)
if (nserv > 1)
_res.nscount = nserv;
#ifdef RESOLVSORT
_res.nsort = nsort;

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: res_mkquery.c,v 1.2 1994/09/25 02:12:38 pst Exp $";
static char rcsid[] = "$Id: res_mkquery.c,v 1.3 1994/09/25 17:45:39 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: res_query.c,v 1.2 1994/09/25 02:12:41 pst Exp $";
static char rcsid[] = "$Id: res_query.c,v 1.3 1994/09/25 17:45:40 pst Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>

View File

@ -31,14 +31,14 @@
* SUCH DAMAGE.
* -
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
*
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies, and that
* the name of Digital Equipment Corporation not be used in advertising or
* publicity pertaining to distribution of the document or software without
* specific, written prior permission.
*
*
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
@ -53,7 +53,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$Id: res_send.c,v 1.2 1994/09/25 02:12:49 pst Exp $";
static char rcsid[] = "$Id: res_send.c,v 1.3 1994/09/25 17:45:41 pst Exp $";
#endif /* LIBC_SCCS and not lint */
/* change this to "0"

View File

@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: msgcat.c,v 1.1 1995/03/30 12:47:26 jkh Exp $ */
/***********************************************************
Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
@ -29,7 +29,7 @@ up-to-date. Many thanks.
267 Allston St., #3
Cambridge, MA 02139 USA
nazgul@alfalfa.com
******************************************************************/
#if defined(LIBC_SCCS) && !defined(lint)
@ -92,7 +92,7 @@ int type;
long len;
char *base, *cptr, *pathP;
struct stat sbuf;
if (!name || !*name) return(NLERR);
if (strchr(name, '/')) {
@ -103,14 +103,14 @@ int type;
if ((nlspath = (char *) getenv("NLSPATH")) == NULL) {
nlspath = "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L";
}
len = strlen(nlspath);
base = cptr = (char *) malloc(len + 2);
if (!base) return(NLERR);
strcpy(cptr, nlspath);
cptr[len] = ':';
cptr[len+1] = '\0';
for (nlspath = cptr; *cptr; ++cptr) {
if (*cptr == ':') {
*cptr = '\0';
@ -181,7 +181,7 @@ int setId;
hi = cat->numSets;
cur = (hi - lo) / 2;
}
while (True) {
set = cat->sets + cur;
if (set->setId == setId) break;
@ -201,16 +201,16 @@ int setId;
return(set);
}
static MCMsgT *MCGetMsg( set, msgId)
MCSetT *set;
int msgId;
{
MCMsgT *msg;
long lo, hi, cur, dir;
if (!set || set->invalid || msgId <= 0) return(NULL);
lo = 0;
if (msgId - 1 < set->numMsgs) {
cur = msgId - 1;
@ -219,7 +219,7 @@ int msgId;
hi = set->numMsgs;
cur = (hi - lo) / 2;
}
while (True) {
msg = set->u.msgs + cur;
if (msg->msgId == msgId) break;
@ -264,7 +264,7 @@ nl_catd catd;
int i, j;
if (!cat) return -1;
if (cat->loadType != MCLoadAll) close(cat->fd);
for (i = 0; i < cat->numSets; ++i) {
set = cat->sets + i;
@ -312,13 +312,13 @@ int type;
if (read(cat->fd, &header, sizeof(header)) != sizeof(header)) CORRUPT();
if (strncmp(header.magic, MCMagic, MCMagicLen) != 0) CORRUPT();
if (header.majorVer != MCMajorVer) {
fprintf(stderr, "%s: %s is version %d, we need %d.\n", ERRNAME,
catpath, header.majorVer, MCMajorVer);
return(0);
}
if (header.numSets <= 0) {
fprintf(stderr, "%s: %s has %d sets!\n", ERRNAME, catpath,
header.numSets);
@ -338,7 +338,7 @@ int type;
if (read(cat->fd, set, sizeof(*set)) != sizeof(*set)) CORRUPT();
/* if it's invalid, skip over it (and backup 'i') */
if (set->invalid) {
--i;
nextSet = set->nextSet;
@ -376,7 +376,7 @@ MCSetT *set;
/* Get the messages */
if (lseek(cat->fd, set->u.firstMsg, 0) == -1) return(0);
if ((set->u.msgs = (MCMsgT *) malloc(sizeof(MCMsgT) * set->numMsgs)) == NULL) return(-1);
for (i = 0; i < set->numMsgs; ++i) {
msg = set->u.msgs + i;
if (read(cat->fd, msg, sizeof(*msg)) != sizeof(*msg)) return(0);
@ -389,8 +389,8 @@ MCSetT *set;
set->invalid = False;
return(1);
}

View File

@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: msgcat.h,v 1.1 1995/03/30 12:47:27 jkh Exp $ */
/* -*-c++-*- */
@ -34,7 +34,7 @@ up-to-date. Many thanks.
267 Allston St., #3
Cambridge, MA 02139 USA
nazgul@alfalfa.com
******************************************************************/

View File

@ -49,7 +49,7 @@ static char sccsid[] = "@(#)muldi3.c 8.1 (Berkeley) 6/4/93";
*
* u = 2^n u1 * u0 (n = number of bits in `u_long', usu. 32)
*
* and
* and
*
* v = 2^n v1 * v0
*

View File

@ -198,7 +198,7 @@ __qdivrem(uq, vq, arq)
v2 = v[2]; /* for D3 */
do {
register digit uj0, uj1, uj2;
/*
* D3: Calculate qhat (\^q, in TeX notation).
* Let qhat = min((u[j]*B + u[j+1])/v[1], B-1), and

View File

@ -1028,7 +1028,7 @@ FILE *d;
fprintf(d, "\n");
}
/*
/*
- at - print current situation
== #ifdef REDEBUG
== static void at(struct match *m, char *title, char *start, char *stop, \

View File

@ -131,7 +131,7 @@ size_t errbuf_size;
for (r = rerrs; r->code != 0; r++)
if (r->code == target)
break;
if (errcode&REG_ITOA) {
if (r->code != 0)
(void) strcpy(convbuf, r->name);

View File

@ -7,7 +7,7 @@ SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
pmap_clnt.c pmap_getmaps.c pmap_getport.c pmap_prot.c \
pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c rpc_callmsg.c \
svc.c svc_auth.c svc_auth_unix.c svc_raw.c svc_run.c svc_simple.c \
svc_tcp.c svc_udp.c
svc_tcp.c svc_udp.c
#
# XXX -- rstat.1 and rstat_svc.8 shouldn't really be here
@ -16,7 +16,7 @@ SRCS+= auth_none.c auth_unix.c authunix_prot.c bindresvport.c \
# Paul.
#
# MAN1+= rpc/rstat.1
# MAN1+= rpc/rstat.1
MAN3+= rpc/bindresvport.3 rpc/getrpcent.3 rpc/getrpcport.3 rpc/rpc.3
MAN5+= rpc/rpc.5
MAN8+= rpc/rstat_svc.8

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,15 +30,15 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)auth_none.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)auth_none.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: auth_none.c,v 1.1 1993/10/27 05:40:10 paul Exp $";
static char *rcsid = "$Id: auth_none.c,v 1.1 1994/08/07 18:35:38 wollman Exp $";
#endif
/*
* auth_none.c
* Creates a client authentication handle for passing "null"
* credentials and verifiers to remote systems.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
* Creates a client authentication handle for passing "null"
* credentials and verifiers to remote systems.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*/
#include <rpc/types.h>
@ -110,7 +110,7 @@ authnone_marshal(client, xdrs)
ap->marshalled_client, ap->mcnt));
}
static void
static void
authnone_verf()
{
}

View File

@ -5,11 +5,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@ -17,11 +17,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,12 +30,12 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)auth_unix.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: auth_unix.c,v 1.2 1994/08/10 02:25:22 wollman Exp $";
static char *rcsid = "$Id: auth_unix.c,v 1.3 1995/03/18 17:55:03 ache Exp $";
#endif
/*
* auth_unix.c, Implements UNIX style authentication parameters.
*
* auth_unix.c, Implements UNIX style authentication parameters.
*
* Copyright (C) 1984, Sun Microsystems, Inc.
*
* The system is very weak. The client uses no encryption for it's
@ -160,7 +160,7 @@ authunix_create(machname, uid, gid, len, aup_gids)
* Serialize the parameters into origcred
*/
xdrmem_create(&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
if (! xdr_authunix_parms(&xdrs, &aup))
if (! xdr_authunix_parms(&xdrs, &aup))
abort();
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
au->au_origcred.oa_flavor = AUTH_UNIX;
@ -205,7 +205,7 @@ authunix_create_default()
if ((len = getgroups(NGROUPS, real_gids)) < 0)
abort();
if(len > NGRPS) len = NGRPS; /* GW: turn `gid_t's into `int's */
for(i = 0; i < len; i++) {
for(i = 0; i < len; i++) {
gids[i] = real_gids[i];
}
return (authunix_create(machname, uid, gid, len, gids));
@ -284,7 +284,7 @@ authunix_refresh(auth)
xdrmem_create(&xdrs, au->au_origcred.oa_base,
au->au_origcred.oa_length, XDR_DECODE);
stat = xdr_authunix_parms(&xdrs, &aup);
if (! stat)
if (! stat)
goto done;
/* update the time and serialize in place */

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)authunix_prot.c 1.15 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)authunix_prot.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: authunix_prot.c,v 1.1 1993/10/27 05:40:15 paul Exp $";
static char *rcsid = "$Id: authunix_prot.c,v 1.1 1994/08/07 18:35:40 wollman Exp $";
#endif
/*

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)bindresvport.c 1.8 88/02/08 SMI";*/
/*static char *sccsid = "from: @(#)bindresvport.c 2.2 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: bindresvport.c,v 1.1 1993/10/27 05:40:17 paul Exp $";
static char *rcsid = "$Id: bindresvport.c,v 1.1 1994/08/07 18:35:42 wollman Exp $";
#endif
/*

View File

@ -5,11 +5,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@ -17,11 +17,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";*/
/*static char *sccsid = "from: @(#)clnt_generic.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_generic.c,v 1.1 1993/10/27 05:40:19 paul Exp $";
static char *rcsid = "$Id: clnt_generic.c,v 1.1 1994/08/07 18:35:43 wollman Exp $";
#endif
/*
@ -43,7 +43,7 @@ static char *rcsid = "$Id: clnt_generic.c,v 1.1 1993/10/27 05:40:19 paul Exp $";
/*
* Generic client creation: takes (hostname, program-number, protocol) and
* returns client handle. Default options are set, which the user can
* returns client handle. Default options are set, which the user can
* change using the rpc equivalent of ioctl()'s.
*/
CLIENT *
@ -70,7 +70,7 @@ clnt_create(hostname, prog, vers, proto)
* Only support INET for now
*/
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
rpc_createerr.cf_error.re_errno = EAFNOSUPPORT;
return (NULL);
}
sin.sin_family = h->h_addrtype;
@ -80,7 +80,7 @@ clnt_create(hostname, prog, vers, proto)
p = getprotobyname(proto);
if (p == NULL) {
rpc_createerr.cf_stat = RPC_UNKNOWNPROTO;
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
return (NULL);
}
sock = RPC_ANYSOCK;
@ -106,7 +106,7 @@ clnt_create(hostname, prog, vers, proto)
break;
default:
rpc_createerr.cf_stat = RPC_SYSTEMERROR;
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
rpc_createerr.cf_error.re_errno = EPFNOSUPPORT;
return (NULL);
}
return (client);

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_perror.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_perror.c,v 1.1 1993/10/27 05:40:20 paul Exp $";
static char *rcsid = "$Id: clnt_perror.c,v 1.1 1994/08/07 18:35:44 wollman Exp $";
#endif
/*
@ -77,17 +77,17 @@ clnt_sperror(rpch, s)
return (0);
CLNT_GETERR(rpch, &e);
(void) sprintf(str, "%s: ", s);
(void) sprintf(str, "%s: ", s);
str += strlen(str);
(void) strcpy(str, clnt_sperrno(e.re_status));
(void) strcpy(str, clnt_sperrno(e.re_status));
str += strlen(str);
switch (e.re_status) {
case RPC_SUCCESS:
case RPC_CANTENCODEARGS:
case RPC_CANTDECODERES:
case RPC_TIMEDOUT:
case RPC_TIMEDOUT:
case RPC_PROGUNAVAIL:
case RPC_PROCUNAVAIL:
case RPC_CANTDECODEARGS:
@ -102,13 +102,13 @@ clnt_sperror(rpch, s)
case RPC_CANTSEND:
case RPC_CANTRECV:
(void) sprintf(str, "; errno = %s",
strerror(e.re_errno));
strerror(e.re_errno));
str += strlen(str);
break;
case RPC_VERSMISMATCH:
(void) sprintf(str,
"; low version = %lu, high version = %lu",
"; low version = %lu, high version = %lu",
e.re_vers.low, e.re_vers.high);
str += strlen(str);
break;
@ -128,15 +128,15 @@ clnt_sperror(rpch, s)
break;
case RPC_PROGVERSMISMATCH:
(void) sprintf(str,
"; low version = %lu, high version = %lu",
(void) sprintf(str,
"; low version = %lu, high version = %lu",
e.re_vers.low, e.re_vers.high);
str += strlen(str);
break;
default: /* unknown */
(void) sprintf(str,
"; s1 = %lu, s2 = %lu",
(void) sprintf(str,
"; s1 = %lu, s2 = %lu",
e.re_lb.s1, e.re_lb.s2);
str += strlen(str);
break;
@ -160,41 +160,41 @@ struct rpc_errtab {
};
static struct rpc_errtab rpc_errlist[] = {
{ RPC_SUCCESS,
"RPC: Success" },
{ RPC_CANTENCODEARGS,
{ RPC_SUCCESS,
"RPC: Success" },
{ RPC_CANTENCODEARGS,
"RPC: Can't encode arguments" },
{ RPC_CANTDECODERES,
{ RPC_CANTDECODERES,
"RPC: Can't decode result" },
{ RPC_CANTSEND,
{ RPC_CANTSEND,
"RPC: Unable to send" },
{ RPC_CANTRECV,
{ RPC_CANTRECV,
"RPC: Unable to receive" },
{ RPC_TIMEDOUT,
{ RPC_TIMEDOUT,
"RPC: Timed out" },
{ RPC_VERSMISMATCH,
{ RPC_VERSMISMATCH,
"RPC: Incompatible versions of RPC" },
{ RPC_AUTHERROR,
{ RPC_AUTHERROR,
"RPC: Authentication error" },
{ RPC_PROGUNAVAIL,
{ RPC_PROGUNAVAIL,
"RPC: Program unavailable" },
{ RPC_PROGVERSMISMATCH,
{ RPC_PROGVERSMISMATCH,
"RPC: Program/version mismatch" },
{ RPC_PROCUNAVAIL,
{ RPC_PROCUNAVAIL,
"RPC: Procedure unavailable" },
{ RPC_CANTDECODEARGS,
{ RPC_CANTDECODEARGS,
"RPC: Server can't decode arguments" },
{ RPC_SYSTEMERROR,
{ RPC_SYSTEMERROR,
"RPC: Remote system error" },
{ RPC_UNKNOWNHOST,
{ RPC_UNKNOWNHOST,
"RPC: Unknown host" },
{ RPC_UNKNOWNPROTO,
"RPC: Unknown protocol" },
{ RPC_PMAPFAILURE,
{ RPC_PMAPFAILURE,
"RPC: Port mapper failure" },
{ RPC_PROGNOTREGISTERED,
{ RPC_PROGNOTREGISTERED,
"RPC: Program not registered"},
{ RPC_FAILED,
{ RPC_FAILED,
"RPC: Failed (unspecified error)"}
};
@ -265,7 +265,7 @@ clnt_pcreateerror(s)
}
struct auth_errtab {
enum auth_stat status;
enum auth_stat status;
char *message;
};

View File

@ -5,11 +5,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@ -17,11 +17,11 @@
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_raw.c 1.22 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_raw.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_raw.c,v 1.1 1993/10/27 05:40:22 paul Exp $";
static char *rcsid = "$Id: clnt_raw.c,v 1.1 1994/08/07 18:35:45 wollman Exp $";
#endif
/*
@ -103,7 +103,7 @@ clntraw_create(prog, vers)
call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
call_msg.rm_call.cb_prog = prog;
call_msg.rm_call.cb_vers = vers;
xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
xdrmem_create(xdrs, clp->mashl_callmsg, MCALL_MSG_SIZE, XDR_ENCODE);
if (! xdr_callhdr(xdrs, &call_msg)) {
perror("clnt_raw.c - Fatal header serialization error.");
}
@ -123,7 +123,7 @@ clntraw_create(prog, vers)
return (client);
}
static enum clnt_stat
static enum clnt_stat
clntraw_call(h, proc, xargs, argsp, xresults, resultsp, timeout)
CLIENT *h;
u_long proc;

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,10 +30,10 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_simple.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_simple.c,v 1.1 1993/10/27 05:40:23 paul Exp $";
static char *rcsid = "$Id: clnt_simple.c,v 1.1 1994/08/07 18:35:46 wollman Exp $";
#endif
/*
/*
* clnt_simple.c
* Simplified front end to rpc.
*
@ -78,7 +78,7 @@ callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
}
if (crp->valid && crp->oldprognum == prognum && crp->oldversnum == versnum
&& strcmp(crp->oldhost, host) == 0) {
/* reuse old client */
/* reuse old client */
} else {
crp->valid = 0;
(void)close(crp->socket);
@ -106,7 +106,7 @@ callrpc(host, prognum, versnum, procnum, inproc, in, outproc, out)
tottimeout.tv_usec = 0;
clnt_stat = clnt_call(crp->client, procnum, inproc, in,
outproc, out, tottimeout);
/*
/*
* if call failed, empty cache
*/
if (clnt_stat != RPC_SUCCESS)

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,9 +30,9 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_tcp.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_tcp.c,v 1.1 1993/10/27 05:40:24 paul Exp $";
static char *rcsid = "$Id: clnt_tcp.c,v 1.1 1994/08/07 18:35:47 wollman Exp $";
#endif
/*
* clnt_tcp.c, Implements a TCP/IP based, client side RPC.
*
@ -87,7 +87,7 @@ struct ct_data {
bool_t ct_closeit;
struct timeval ct_wait;
bool_t ct_waitset; /* wait set by clnt_control? */
struct sockaddr_in ct_addr;
struct sockaddr_in ct_addr;
struct rpc_err ct_error;
char ct_mcall[MCALL_MSG_SIZE]; /* marshalled callmsg */
u_int ct_mpos; /* pos after marshal */

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)clnt_udp.c 1.39 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)clnt_udp.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: clnt_udp.c,v 1.1 1994/08/07 18:35:48 wollman Exp $";
static char *rcsid = "$Id: clnt_udp.c,v 1.2 1995/04/02 20:05:20 wpaul Exp $";
#endif
/*
@ -68,7 +68,7 @@ static struct clnt_ops udp_ops = {
clntudp_control
};
/*
/*
* Private data kept per client handle
*/
struct cu_data {
@ -206,7 +206,7 @@ clntudp_create(raddr, program, version, wait, sockp)
UDPMSGSIZE, UDPMSGSIZE));
}
static enum clnt_stat
static enum clnt_stat
clntudp_call(cl, proc, xargs, argsp, xresults, resultsp, utimeout)
register CLIENT *cl; /* client handle */
u_long proc; /* procedure number */
@ -298,7 +298,7 @@ send_again:
#endif /* def FD_SETSIZE */
for (;;) {
readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
(int *)NULL, &(cu->cu_wait))) {
case 0:
@ -311,7 +311,7 @@ send_again:
if ((time_waited.tv_sec < timeout.tv_sec) ||
((time_waited.tv_sec == timeout.tv_sec) &&
(time_waited.tv_usec < timeout.tv_usec)))
goto send_again;
goto send_again;
return (cu->cu_error.re_status = RPC_TIMEDOUT);
/*
@ -320,27 +320,27 @@ send_again:
*/
case -1:
if (errno == EINTR)
continue;
continue;
cu->cu_error.re_errno = errno;
return (cu->cu_error.re_status = RPC_CANTRECV);
}
do {
fromlen = sizeof(struct sockaddr);
inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
inlen = recvfrom(cu->cu_sock, cu->cu_inbuf,
(int) cu->cu_recvsz, 0,
(struct sockaddr *)&from, &fromlen);
} while (inlen < 0 && errno == EINTR);
if (inlen < 0) {
if (errno == EWOULDBLOCK)
continue;
continue;
cu->cu_error.re_errno = errno;
return (cu->cu_error.re_status = RPC_CANTRECV);
}
if (inlen < sizeof(u_long))
continue;
continue;
/* see if reply transaction id matches sent id */
if (*((u_long *)(cu->cu_inbuf)) != *((u_long *)(cu->cu_outbuf)))
continue;
continue;
/* we now assume we have the proper reply */
break;
}
@ -363,7 +363,7 @@ send_again:
xdrs->x_op = XDR_FREE;
(void)xdr_opaque_auth(xdrs,
&(reply_msg.acpted_rply.ar_verf));
}
}
} /* end successful completion */
else {
/* maybe our credentials need to be refreshed ... */
@ -403,7 +403,7 @@ clntudp_freeres(cl, xdr_res, res_ptr)
return ((*xdr_res)(xdrs, res_ptr));
}
static void
static void
clntudp_abort(/*h*/)
/*CLIENT *h;*/
{
@ -438,7 +438,7 @@ clntudp_control(cl, request, info)
}
return (TRUE);
}
static void
clntudp_destroy(cl)
CLIENT *cl;

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)get_myaddress.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: get_myaddress.c,v 1.1 1993/10/27 05:40:27 paul Exp $";
static char *rcsid = "$Id: get_myaddress.c,v 1.1 1994/08/07 18:35:49 wollman Exp $";
#endif
/*
@ -50,7 +50,7 @@ static char *rcsid = "$Id: get_myaddress.c,v 1.1 1993/10/27 05:40:27 paul Exp $"
#include <netinet/in.h>
#include <arpa/inet.h>
/*
/*
* don't use gethostbyname, which would invoke yellow pages
*/
get_myaddress(addr)

View File

@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getrpcent.c 1.14 91/03/11 Copyr 1984 Sun Micro";*/
static char *rcsid = "$Id: getrpcent.c,v 1.1 1993/10/27 05:40:29 paul Exp $";
static char *rcsid = "$Id: getrpcent.c,v 1.1 1994/08/07 18:35:51 wollman Exp $";
#endif
/*
@ -279,7 +279,7 @@ interpret(val, len)
d->rpc.r_number = atoi(cp);
q = d->rpc.r_aliases = d->rpc_aliases;
cp = strpbrk(cp, " \t");
if (cp != NULL)
if (cp != NULL)
*cp++ = '\0';
while (cp && *cp) {
if (*cp == ' ' || *cp == '\t') {

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)getrpcport.c 1.3 87/08/11 SMI";*/
/*static char *sccsid = "from: @(#)getrpcport.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: getrpcport.c,v 1.1 1993/10/27 05:40:31 paul Exp $";
static char *rcsid = "$Id: getrpcport.c,v 1.1 1994/08/07 18:35:52 wollman Exp $";
#endif
/*

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_clnt.c 1.37 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_clnt.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_clnt.c,v 1.1 1993/10/27 05:40:32 paul Exp $";
static char *rcsid = "$Id: pmap_clnt.c,v 1.1 1994/08/07 18:35:53 wollman Exp $";
#endif
/*

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_getmaps.c 1.10 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_getmaps.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_getmaps.c,v 1.1 1993/10/27 05:40:35 paul Exp $";
static char *rcsid = "$Id: pmap_getmaps.c,v 1.1 1994/08/07 18:35:54 wollman Exp $";
#endif
/*

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_getport.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_getport.c,v 1.1 1993/10/27 05:40:36 paul Exp $";
static char *rcsid = "$Id: pmap_getport.c,v 1.1 1994/08/07 18:35:55 wollman Exp $";
#endif
/*

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_prot.c 1.17 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_prot.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_prot.c,v 1.1 1993/10/27 05:40:37 paul Exp $";
static char *rcsid = "$Id: pmap_prot.c,v 1.1 1994/08/07 18:35:56 wollman Exp $";
#endif
/*
@ -51,8 +51,8 @@ xdr_pmap(xdrs, regs)
struct pmap *regs;
{
if (xdr_u_long(xdrs, &regs->pm_prog) &&
xdr_u_long(xdrs, &regs->pm_vers) &&
if (xdr_u_long(xdrs, &regs->pm_prog) &&
xdr_u_long(xdrs, &regs->pm_vers) &&
xdr_u_long(xdrs, &regs->pm_prot))
return (xdr_u_long(xdrs, &regs->pm_port));
return (FALSE);

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_prot2.c 1.3 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_prot2.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_prot2.c,v 1.1 1993/10/27 05:40:39 paul Exp $";
static char *rcsid = "$Id: pmap_prot2.c,v 1.1 1994/08/07 18:35:57 wollman Exp $";
#endif
/*
@ -45,7 +45,7 @@ static char *rcsid = "$Id: pmap_prot2.c,v 1.1 1993/10/27 05:40:39 paul Exp $";
#include <rpc/pmap_prot.h>
/*
/*
* What is going on with linked lists? (!)
* First recall the link list declaration from pmap_prot.h:
*
@ -54,11 +54,11 @@ static char *rcsid = "$Id: pmap_prot2.c,v 1.1 1993/10/27 05:40:39 paul Exp $";
* struct pmaplist *pml_map;
* };
*
* Compare that declaration with a corresponding xdr declaration that
* Compare that declaration with a corresponding xdr declaration that
* is (a) pointer-less, and (b) recursive:
*
* typedef union switch (bool_t) {
*
*
* case TRUE: struct {
* struct pmap;
* pmaplist_t foo;
@ -71,8 +71,8 @@ static char *rcsid = "$Id: pmap_prot2.c,v 1.1 1993/10/27 05:40:39 paul Exp $";
* the C declaration has no bool_t variable. The bool_t can be
* interpreted as ``more data follows me''; if FALSE then nothing
* follows this bool_t; if TRUE then the bool_t is followed by
* an actual struct pmap, and then (recursively) by the
* xdr union, pamplist_t.
* an actual struct pmap, and then (recursively) by the
* xdr union, pamplist_t.
*
* This could be implemented via the xdr_union primitive, though this
* would cause a one recursive call per element in the list. Rather than do
@ -109,7 +109,7 @@ xdr_pmaplist(xdrs, rp)
* before we free the current object ...
*/
if (freeing)
next = &((*rp)->pml_next);
next = &((*rp)->pml_next);
if (! xdr_reference(xdrs, (caddr_t *)rp,
(u_int)sizeof(struct pmaplist), xdr_pmap))
return (FALSE);

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)pmap_rmt.c 2.2 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: pmap_rmt.c,v 1.1 1993/10/27 05:40:40 paul Exp $";
static char *rcsid = "$Id: pmap_rmt.c,v 1.1 1994/08/07 18:35:57 wollman Exp $";
#endif
/*
@ -156,7 +156,7 @@ xdr_rmtcallres(xdrs, crp)
/*
* The following is kludged-up support for simple rpc broadcasts.
* Someday a large, complicated system will replace these trivial
* Someday a large, complicated system will replace these trivial
* routines which only support udp/ip .
*/
@ -214,7 +214,7 @@ getbroadcastnets(addrs, sock, buf)
typedef bool_t (*resultproc_t)();
enum clnt_stat
enum clnt_stat
clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
u_long prog; /* program number */
u_long vers; /* version number */
@ -248,7 +248,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
struct rmtcallargs a;
struct rmtcallres r;
struct rpc_msg msg;
struct timeval t;
struct timeval t;
char outbuf[MAX_BROADCAST_SIZE], inbuf[UDPMSGSIZE];
/*
@ -328,7 +328,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
msg.acpted_rply.ar_results.where = (caddr_t)&r;
msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
readfds = mask;
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
switch (select(_rpc_dtablesize(), &readfds, (int *)NULL,
(int *)NULL, &t)) {
case 0: /* timed out */

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_callmsg.c 1.4 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)rpc_callmsg.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: rpc_callmsg.c,v 1.1 1993/10/27 05:40:46 paul Exp $";
static char *rcsid = "$Id: rpc_callmsg.c,v 1.1 1994/08/07 18:36:00 wollman Exp $";
#endif
/*

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -29,13 +29,13 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_commondata.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: rpc_commondata.c,v 1.1 1993/10/27 05:40:47 paul Exp $";
static char *rcsid = "$Id: rpc_commondata.c,v 1.1 1994/08/07 18:36:01 wollman Exp $";
#endif
#include <rpc/rpc.h>
/*
* This file should only contain common data (global data) that is exported
* by public interfaces
* by public interfaces
*/
struct opaque_auth _null_auth;
#ifdef FD_SETSIZE

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -53,7 +53,7 @@ static char *rcsid = "rpc_dtablesize.c,v 1.1 1994/08/07 18:36:02 wollman Exp";
_rpc_dtablesize()
{
static int size;
if (size == 0) {
size = getdtablesize();
if (size > FD_SETSIZE)

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)rpc_prot.c 1.36 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)rpc_prot.c 2.3 88/08/07 4.0 RPCSRC";*/
static char *rcsid = "$Id: rpc_prot.c,v 1.1 1993/10/27 05:40:50 paul Exp $";
static char *rcsid = "$Id: rpc_prot.c,v 1.1 1994/08/07 18:36:03 wollman Exp $";
#endif
/*
@ -86,9 +86,9 @@ xdr_des_block(xdrs, blkp)
/*
* XDR the MSG_ACCEPTED part of a reply message union
*/
bool_t
bool_t
xdr_accepted_reply(xdrs, ar)
register XDR *xdrs;
register XDR *xdrs;
register struct accepted_reply *ar;
{
@ -113,7 +113,7 @@ xdr_accepted_reply(xdrs, ar)
/*
* XDR the MSG_DENIED part of a reply message union
*/
bool_t
bool_t
xdr_rejected_reply(xdrs, rr)
register XDR *xdrs;
register struct rejected_reply *rr;
@ -149,7 +149,7 @@ xdr_replymsg(xdrs, rmsg)
register struct rpc_msg *rmsg;
{
if (
xdr_u_long(xdrs, &(rmsg->rm_xid)) &&
xdr_u_long(xdrs, &(rmsg->rm_xid)) &&
xdr_enum(xdrs, (enum_t *)&(rmsg->rm_direction)) &&
(rmsg->rm_direction == REPLY) )
return (xdr_union(xdrs, (enum_t *)&(rmsg->rm_reply.rp_stat),
@ -221,7 +221,7 @@ accepted(acpt_stat, error)
error->re_lb.s2 = (long)acpt_stat;
}
static void
static void
rejected(rjct_stat, error)
register enum reject_stat rjct_stat;
register struct rpc_err *error;

View File

@ -5,32 +5,32 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
*/
#if defined(LIBC_SCCS) && !defined(lint)
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc.c 1.44 88/02/08 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc.c 2.4 88/08/11 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc.c,v 1.1 1993/10/27 05:40:54 paul Exp $";
static char *rcsid = "$Id: svc.c,v 1.1 1994/08/07 18:36:06 wollman Exp $";
#endif
/*
@ -105,12 +105,12 @@ xprt_register(xprt)
}
/*
* De-activate a transport handle.
* De-activate a transport handle.
*/
void
xprt_unregister(xprt)
xprt_unregister(xprt)
SVCXPRT *xprt;
{
{
register int sock = xprt->xp_sock;
#ifdef FD_SETSIZE
@ -225,15 +225,15 @@ svc_sendreply(xprt, xdr_results, xdr_location)
xdrproc_t xdr_results;
caddr_t xdr_location;
{
struct rpc_msg rply;
struct rpc_msg rply;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = SUCCESS;
rply.acpted_rply.ar_results.where = xdr_location;
rply.acpted_rply.ar_results.proc = xdr_results;
return (SVC_REPLY(xprt, &rply));
return (SVC_REPLY(xprt, &rply));
}
/*
@ -259,13 +259,13 @@ void
svcerr_decode(xprt)
register SVCXPRT *xprt;
{
struct rpc_msg rply;
struct rpc_msg rply;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = GARBAGE_ARGS;
SVC_REPLY(xprt, &rply);
SVC_REPLY(xprt, &rply);
}
/*
@ -275,13 +275,13 @@ void
svcerr_systemerr(xprt)
register SVCXPRT *xprt;
{
struct rpc_msg rply;
struct rpc_msg rply;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = SYSTEM_ERR;
SVC_REPLY(xprt, &rply);
SVC_REPLY(xprt, &rply);
}
/*
@ -315,15 +315,15 @@ svcerr_weakauth(xprt)
/*
* Program unavailable error reply
*/
void
void
svcerr_noprog(xprt)
register SVCXPRT *xprt;
{
struct rpc_msg rply;
struct rpc_msg rply;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.rm_direction = REPLY;
rply.rm_reply.rp_stat = MSG_ACCEPTED;
rply.acpted_rply.ar_verf = xprt->xp_verf;
rply.acpted_rply.ar_stat = PROG_UNAVAIL;
SVC_REPLY(xprt, &rply);
}
@ -331,9 +331,9 @@ svcerr_noprog(xprt)
/*
* Program version mismatch error reply
*/
void
void
svcerr_progvers(xprt, low_vers, high_vers)
register SVCXPRT *xprt;
register SVCXPRT *xprt;
u_long low_vers;
u_long high_vers;
{
@ -358,9 +358,9 @@ svcerr_progvers(xprt, low_vers, high_vers)
* the "raw" parameters (msg.rm_call.cb_cred and msg.rm_call.cb_verf) and
* the "cooked" credentials (rqst->rq_clntcred).
* However, this function does not know the structure of the cooked
* credentials, so it make the following assumptions:
* credentials, so it make the following assumptions:
* a) the structure is contiguous (no pointers), and
* b) the cred structure size does not exceed RQCRED_SIZE bytes.
* b) the cred structure size does not exceed RQCRED_SIZE bytes.
* In all events, all three parameters are freed upon exit from this routine.
* The storage is trivially management on the call stack in user land, but
* is mallocated in kernel land.
@ -412,7 +412,7 @@ svc_getreqset(readfds)
#ifdef FD_SETSIZE
setsize = _rpc_dtablesize();
setsize = _rpc_dtablesize();
maskp = (u_long *)readfds->fds_bits;
for (sock = 0; sock < setsize; sock += NFDBITS) {
for (mask = *maskp++; bit = ffs(mask); mask ^= (1 << (bit - 1))) {

View File

@ -5,11 +5,11 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_auth.c 1.19 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_auth.c 2.1 88/08/07 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc_auth.c,v 1.1 1993/10/27 05:40:56 paul Exp $";
static char *rcsid = "$Id: svc_auth.c,v 1.1 1994/08/07 18:36:07 wollman Exp $";
#endif
/*
@ -43,16 +43,16 @@ static char *rcsid = "$Id: svc_auth.c,v 1.1 1993/10/27 05:40:56 paul Exp $";
#include <rpc/rpc.h>
/*
* svcauthsw is the bdevsw of server side authentication.
*
* svcauthsw is the bdevsw of server side authentication.
*
* Server side authenticators are called from authenticate by
* using the client auth struct flavor field to index into svcauthsw.
* The server auth flavors must implement a routine that looks
* like:
*
* The server auth flavors must implement a routine that looks
* like:
*
* enum auth_stat
* flavorx_auth(rqst, msg)
* register struct svc_req *rqst;
* register struct svc_req *rqst;
* register struct rpc_msg *msg;
*
*/

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_auth_unix.c 1.28 88/02/08 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_auth_unix.c 2.3 88/08/01 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc_auth_unix.c,v 1.1 1993/10/27 05:40:58 paul Exp $";
static char *rcsid = "$Id: svc_auth_unix.c,v 1.1 1994/08/07 18:36:08 wollman Exp $";
#endif
/*
@ -127,7 +127,7 @@ done:
* Looks up longhand in a cache.
*/
/*ARGSUSED*/
enum auth_stat
enum auth_stat
_svcauth_short(rqst, msg)
struct svc_req *rqst;
struct rpc_msg *msg;

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_raw.c 1.15 87/08/11 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_raw.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc_raw.c,v 1.1 1993/10/27 05:40:59 paul Exp $";
static char *rcsid = "$Id: svc_raw.c,v 1.1 1994/08/07 18:36:08 wollman Exp $";
#endif
/*
@ -151,7 +151,7 @@ svcraw_freeargs(xprt, xdr_args, args_ptr)
SVCXPRT *xprt;
xdrproc_t xdr_args;
caddr_t args_ptr;
{
{
register struct svcraw_private *srp = svcraw_private;
register XDR *xdrs;
@ -160,7 +160,7 @@ svcraw_freeargs(xprt, xdr_args, args_ptr)
xdrs = &srp->xdr_stream;
xdrs->x_op = XDR_FREE;
return ((*xdr_args)(xdrs, args_ptr));
}
}
static void
svcraw_destroy()

View File

@ -5,23 +5,23 @@
* may copy or modify Sun RPC without charge, but are not authorized
* to license or distribute it to anyone else except as part of a product or
* program developed by the user.
*
*
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
*
*
* Sun RPC is provided with no support and without any obligation on the
* part of Sun Microsystems, Inc. to assist in its use, correction,
* modification or enhancement.
*
*
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
* OR ANY PART THEREOF.
*
*
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
*
*
* Sun Microsystems, Inc.
* 2550 Garcia Avenue
* Mountain View, California 94043
@ -30,7 +30,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)svc_run.c 1.1 87/10/13 Copyr 1984 Sun Micro";*/
/*static char *sccsid = "from: @(#)svc_run.c 2.1 88/07/29 4.0 RPCSRC";*/
static char *rcsid = "$Id: svc_run.c,v 1.1 1993/10/27 05:41:00 paul Exp $";
static char *rcsid = "$Id: svc_run.c,v 1.1 1994/08/07 18:36:09 wollman Exp $";
#endif
/*

Some files were not shown because too many files have changed in this diff Show More