sync with OpenBSD -current

This commit is contained in:
purplerain 2023-12-02 11:08:21 +00:00
parent 8873eac723
commit 02d83d01a6
Signed by: purplerain
GPG Key ID: F42C07F07E2E35B7
275 changed files with 1129 additions and 1124 deletions

View File

@ -1 +1 @@
# SecBSD 1.4-8cd59e6: Fri Nov 24 03:25:50 UTC 2023 (Mictlantecuhtli)
# SecBSD 1.4-a5839ef: Fri Dec 1 14:35:24 UTC 2023 (Mictlantecuhtli)

View File

@ -142,7 +142,7 @@ __bt_stkacq(BTREE *t, PAGE **hp, CURSOR *c)
pgno_t pgno;
recno_t nextpg, prevpg;
int exact, level;
/*
* Find the first occurrence of the key in the tree. Toss the
* currently locked page so we don't hit an already-locked page.
@ -258,7 +258,7 @@ __bt_stkacq(BTREE *t, PAGE **hp, CURSOR *c)
if ((h = mpool_get(t->bt_mp, prevpg, 0)) == NULL)
return (1);
}
ret: mpool_put(t->bt_mp, h, 0);
return ((*hp = mpool_get(t->bt_mp, c->pg.pgno, 0)) == NULL);
@ -386,7 +386,7 @@ __bt_pdelete(BTREE *t, PAGE *h)
/* Get the parent page. */
if ((pg = mpool_get(t->bt_mp, parent->pgno, 0)) == NULL)
return (RET_ERROR);
idx = parent->index;
bi = GETBINTERNAL(pg, idx);
@ -547,7 +547,7 @@ __bt_curdel(BTREE *t, const DBT *key, PAGE *h, u_int idx)
key = &c->key;
}
/* Check previous key, if not at the beginning of the page. */
if (idx > 0) {
if (idx > 0) {
e.page = h;
e.index = idx - 1;
if (__bt_cmp(t, key, &e) == 0) {

View File

@ -189,7 +189,7 @@ __bt_open(const char *fname, int flags, int mode, const BTREEINFO *openinfo,
default:
goto einval;
}
if ((t->bt_fd = open(fname, flags | O_CLOEXEC, mode)) < 0)
goto err;

View File

@ -344,7 +344,7 @@ __bt_first(BTREE *t, const DBT *key, EPG *erval, int *exactp)
*erval = *ep;
return (RET_SUCCESS);
}
/*
* Walk backwards, as long as the entry matches and there are
* keys left in the tree. Save a copy of each match in case

View File

@ -6,17 +6,17 @@ Test Programs:
All test programs which need key/data pairs expect them entered
with key and data on separate lines
tcreat3.c
Takes
bucketsize (bsize),
tcreat3.c
Takes
bucketsize (bsize),
fill factor (ffactor), and
initial number of elements (nelem).
Creates a hash table named hashtest containing the
initial number of elements (nelem).
Creates a hash table named hashtest containing the
keys/data pairs entered from standard in.
thash4.c
Takes
bucketsize (bsize),
fill factor (ffactor),
bucketsize (bsize),
fill factor (ffactor),
initial number of elements (nelem)
bytes of cache (ncached), and
file from which to read data (fname)
@ -59,7 +59,7 @@ file, you may lose updates since the package buffers all writes. Also,
the db interface only creates a single database file. To avoid overwriting
the user's original file, the suffix ".db" is appended to the file name
passed to dbm_open. Additionally, if your code "knows" about the historic
.dir and .pag files, it will break.
.dir and .pag files, it will break.
There is a fundamental difference between this package and the old hsearch.
Hsearch requires the user to maintain the keys and data in the application's

View File

@ -69,28 +69,28 @@ typedef struct hashhdr { /* Disk resident portion */
int32_t dsize; /* Directory Size */
int32_t ssize; /* Segment Size */
int32_t sshift; /* Segment shift */
int32_t ovfl_point; /* Where overflow pages are being
int32_t ovfl_point; /* Where overflow pages are being
* allocated */
int32_t last_freed; /* Last overflow page freed */
int32_t max_bucket; /* ID of Maximum bucket in use */
int32_t high_mask; /* Mask to modulo into entire table */
int32_t low_mask; /* Mask to modulo into lower half of
int32_t low_mask; /* Mask to modulo into lower half of
* table */
int32_t ffactor; /* Fill factor */
int32_t nkeys; /* Number of keys in hash table */
int32_t hdrpages; /* Size of table header */
int32_t h_charkey; /* value of hash(CHARKEY) */
#define NCACHED 32 /* number of bit maps and spare
#define NCACHED 32 /* number of bit maps and spare
* points */
int32_t spares[NCACHED];/* spare pages for overflow */
u_int16_t bitmaps[NCACHED]; /* address of overflow page
u_int16_t bitmaps[NCACHED]; /* address of overflow page
* bitmaps */
} HASHHDR;
typedef struct htab { /* Memory resident data structure */
HASHHDR hdr; /* Header */
int nsegs; /* Number of allocated segments */
int exsegs; /* Number of extra allocated
int exsegs; /* Number of extra allocated
* segments */
u_int32_t /* Hash function */
(*hash)(const void *, size_t);
@ -101,16 +101,16 @@ typedef struct htab { /* Memory resident data structure */
BUFHEAD *cpage; /* Current page */
int cbucket; /* Current bucket */
int cndx; /* Index of next item on cpage */
int err; /* Error Number -- for DBM
int err; /* Error Number -- for DBM
* compatibility */
int new_file; /* Indicates if fd is backing store
int new_file; /* Indicates if fd is backing store
* or no */
int save_file; /* Indicates whether we need to flush
int save_file; /* Indicates whether we need to flush
* file at
* exit */
u_int32_t *mapp[NCACHED]; /* Pointers to page maps */
int nmaps; /* Initial number of bitmaps */
int nbufs; /* Number of buffers left to
int nbufs; /* Number of buffers left to
* allocate */
BUFHEAD bufhead; /* Header of buffer lru list */
SEGMENT *dir; /* Hash Bucket directory */
@ -192,7 +192,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
@ -227,7 +227,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

@ -96,7 +96,7 @@ mpool_filter(MPOOL *mp, void (*pgin) (void *, pgno_t, void *),
mp->pgout = pgout;
mp->pgcookie = pgcookie;
}
/*
* mpool_new --
* Get a new page of memory.
@ -159,8 +159,8 @@ mpool_delete(MPOOL *mp, void *page)
free(bp);
mp->curcache--;
return (RET_SUCCESS);
}
}
/*
* mpool_get
* Get a page.
@ -457,7 +457,7 @@ mpool_stat(MPOOL *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",
@ -476,7 +476,7 @@ mpool_stat(MPOOL *mp)
cnt = 0;
} else
sep = ", ";
}
(void)fprintf(stderr, "\n");
}

View File

@ -160,7 +160,7 @@ einval: errno = EINVAL;
if (flags == R_SETCURSOR)
t->bt_cursor.rcursor = nrec;
F_SET(t, R_MODIFIED);
return (__rec_ret(t, NULL, nrec, key, NULL));
}

View File

@ -83,7 +83,7 @@ __rec_search(BTREE *t, recno_t recno, enum SRCHOP op)
}
BT_PUSH(t, pg, idx - 1);
pg = r->pgno;
switch (op) {
case SDELETE:

View File

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

View File

@ -2,7 +2,7 @@
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:

View File

@ -102,7 +102,7 @@ struct auth_session_t {
int state; /* authenticated state */
struct rmfiles *rmlist; /* list of files to remove on failure */
struct authopts *optlist; /* list of options to scripts */
struct authopts *optlist; /* list of options to scripts */
struct authdata *data; /* additional data to send to scripts */
char spool[MAXSPOOLSIZE]; /* data returned from login script */

View File

@ -115,7 +115,7 @@ confstr(int name, char *buf, size_t len)
case _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS:
return (strlcpy(buf, v6_width_restricted_envs, len) + 1);
case _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS:
return (strlcpy(buf, v7_width_restricted_envs, len) + 1);

View File

@ -153,5 +153,5 @@ DEF_WEAK(sys_errlist);
DEF_WEAK(sys_nerr);
#endif
__strong_alias(_sys_errlist, sys_errlist);
__strong_alias(_sys_nerr, sys_nerr);
__strong_alias(_sys_errlist, sys_errlist);
__strong_alias(_sys_nerr, sys_nerr);

View File

@ -56,7 +56,7 @@ static int _read_netid(const char *, uid_t, gid_t*, int*, int);
/*
* Parse one string of the form "uid:gid[,gid[,...]]".
* If the uid matches, add the groups to the group list.
* If the groups fit, return 1, otherwise return -1.
* If the groups fit, return 1, otherwise return -1.
* If the uid does not match, return 0.
*/
static int
@ -116,7 +116,7 @@ _read_netid(const char *key, uid_t uid, gid_t *groups, int *ngroups,
int found = 0;
fp = fopen(_PATH_NETID, "re");
if (!fp)
if (!fp)
return (0);
while (!found && fgets(line, sizeof(line), fp)) {
p = strchr(line, '\n');

View File

@ -40,7 +40,7 @@ __isfinitef(float f)
__strong_alias(__isfinitel, __isfinite);
#endif /* LDBL_MANT_DIG == DBL_MANT_DIG */
/*
/*
* 3BSD compatibility aliases.
*/
__strong_alias(finite, __isfinite);

View File

@ -33,7 +33,7 @@ int
__isinff(float f)
{
struct ieee_single *p = (struct ieee_single *)&f;
return (p->sng_exp == SNG_EXP_INFNAN && p->sng_frac == 0);
}

View File

@ -33,7 +33,7 @@ int
__isnanf(float f)
{
struct ieee_single *p = (struct ieee_single *)&f;
return (p->sng_exp == SNG_EXP_INFNAN && p->sng_frac != 0);
}

View File

@ -112,7 +112,7 @@ login_getclass(char *class)
if ((res = cgetent(&lc->lc_cap, classfiles, lc->lc_class)) != 0) {
lc->lc_cap = 0;
switch (res) {
case 1:
case 1:
syslog(LOG_ERR, "%s: couldn't resolve 'tc'",
lc->lc_class);
break;
@ -198,7 +198,7 @@ login_getstyle(login_cap_t *lc, char *style, char *atype)
if (!style)
style = authtypes[0];
while (*authtypes && strcmp(style, *authtypes))
++authtypes;
@ -272,7 +272,7 @@ login_getcaptime(login_cap_t *lc, char *cap, quad_t def, quad_t e)
errno = ERANGE;
return (e);
default:
if (stat >= 0)
if (stat >= 0)
break;
free(res);
syslog(LOG_ERR, "%s: unexpected error with capability %s",
@ -357,7 +357,7 @@ login_getcapnum(login_cap_t *lc, char *cap, quad_t def, quad_t e)
errno = ERANGE;
return (e);
default:
if (stat >= 0)
if (stat >= 0)
break;
free(res);
syslog(LOG_ERR, "%s: unexpected error with capability %s",
@ -411,7 +411,7 @@ login_getcapsize(login_cap_t *lc, char *cap, quad_t def, quad_t e)
errno = ERANGE;
return (e);
default:
if (stat >= 0)
if (stat >= 0)
break;
free(res);
syslog(LOG_ERR, "%s: unexpected error with capability %s",
@ -619,7 +619,7 @@ setusercontext(login_cap_t *lc, struct passwd *pwd, uid_t uid, u_int flags)
}
if (flags & LOGIN_SETRESOURCES)
for (i = 0; r_list[i].name; ++i)
for (i = 0; r_list[i].name; ++i)
if (gsetrl(lc, r_list[i].what, r_list[i].name,
r_list[i].type))
/* XXX - call syslog()? */;
@ -744,7 +744,7 @@ setuserpath(login_cap_t *lc, const struct passwd *pwd)
*np++ = *op++;
break;
}
}
*np = '\0';
setit:
@ -952,9 +952,9 @@ multiply(u_quad_t n1, u_quad_t n2)
* is not done then the first multiply below may overflow.)
*/
for (b1 = bpw; (((u_quad_t)1 << (b1-1)) & n1) == 0; --b1)
;
;
for (b2 = bpw; (((u_quad_t)1 << (b2-1)) & n2) == 0; --b2)
;
;
if (b1 + b2 - 2 > bpw) {
errno = ERANGE;
return (UQUAD_MAX);

View File

@ -6,17 +6,17 @@
* All rights reserved.
*
* Author: Chris G. Demetriou
*
*
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and this permission notice appear in all copies of the
* software, derivative works or modified versions, and any portions
* thereof, and that both notices appear in supporting documentation.
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
*
* CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
* CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
* FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
*
*
* Carnegie Mellon requests users of this software to return to
*
* Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU

View File

@ -187,7 +187,7 @@ process_file_actions(const posix_spawn_file_actions_t fa)
if (error)
return (error);
}
return (0);
return (0);
}
static int
@ -197,7 +197,7 @@ do_posix_spawn(pid_t *pid, const char *path,
char *const argv[], char *const envp[], int use_env_path)
{
pid_t p;
p = fork();
switch (p) {
case -1:

View File

@ -75,7 +75,7 @@ scandir(const char *dirname, struct dirent ***namelist,
/*
* 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 = MAXIMUM(stb.st_size / 24, 16);
if (arraysz > SIZE_MAX / sizeof(struct dirent *)) {
@ -96,7 +96,7 @@ scandir(const char *dirname, struct dirent ***namelist,
*/
if (nitems >= arraysz) {
struct dirent **nnames;
if (fstat(dirp->dd_fd, &stb) == -1)
goto fail;

View File

@ -186,7 +186,7 @@ setmode(const char *p)
(void)sigprocmask(SIG_SETMASK, &sigoset, NULL);
setlen = SET_LEN + 2;
if ((set = calloc((u_int)sizeof(BITCMD), setlen)) == NULL)
return (NULL);
saveset = set;
@ -366,7 +366,7 @@ addcmd(BITCMD *set, int op, int who, int oparg, u_int mask)
set->cmd2 = CMD2_UBITS | CMD2_GBITS | CMD2_OBITS;
set->bits = mask;
}
if (oparg == '+')
set->cmd2 |= CMD2_SET;
else if (oparg == '-')

View File

@ -46,7 +46,7 @@ setproctitle(const char *fmt, ...)
{
static struct ps_strings *ps;
va_list ap;
static char buf[MAX_PROCTITLE], *bufp = buf;
int used;

View File

@ -473,6 +473,6 @@ sysconf(int name)
errno = EINVAL;
return (-1);
}
return (sysctl(mib, namelen, &value, &len, NULL, 0) == -1 ? -1 : value);
return (sysctl(mib, namelen, &value, &len, NULL, 0) == -1 ? -1 : value);
}
DEF_WEAK(sysconf);

View File

@ -46,7 +46,7 @@ ualarm(useconds_t usecs, useconds_t 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

@ -56,7 +56,7 @@ unvis(char *cp, char c, int *astate, int flag)
if (*astate == S_OCTAL2 || *astate == S_OCTAL3) {
*astate = S_GROUND;
return (UNVIS_VALID);
}
}
return (*astate == S_GROUND ? UNVIS_NOCHAR : UNVIS_SYNBAD);
}
@ -67,7 +67,7 @@ unvis(char *cp, char c, int *astate, int flag)
if (c == '\\') {
*astate = S_START;
return (0);
}
}
*cp = c;
return (UNVIS_VALID);
@ -145,7 +145,7 @@ unvis(char *cp, char c, int *astate, int flag)
}
*astate = S_GROUND;
return (UNVIS_SYNBAD);
case S_META:
if (c == '-')
*astate = S_META1;
@ -156,12 +156,12 @@ unvis(char *cp, char c, int *astate, int flag)
return (UNVIS_SYNBAD);
}
return (0);
case S_META1:
*astate = S_GROUND;
*cp |= c;
return (UNVIS_VALID);
case S_CTRL:
if (c == '?')
*cp |= 0177;
@ -172,15 +172,15 @@ unvis(char *cp, char c, int *astate, int 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);
@ -196,9 +196,9 @@ unvis(char *cp, char c, int *astate, int flag)
*/
return (UNVIS_VALIDPUSH);
default:
/*
* decoder in unknown state - (probably uninitialized)
default:
/*
* decoder in unknown state - (probably uninitialized)
*/
*astate = S_GROUND;
return (UNVIS_SYNBAD);
@ -207,7 +207,7 @@ unvis(char *cp, char c, int *astate, int flag)
DEF_WEAK(unvis);
/*
* 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

@ -169,10 +169,10 @@ DEF_WEAK(vis);
/*
* strvis, strnvis, 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.
*
* Strnvis will write no more than siz-1 bytes (and will NULL terminate).
* The number of bytes needed to fully encode the string is returned.

View File

@ -3,7 +3,7 @@
/*
* FILE: sha2.c
* AUTHOR: Aaron D. Gifford <me@aarongifford.com>
*
*
* Copyright (c) 2000-2001, Aaron D. Gifford
* All rights reserved.
*
@ -18,7 +18,7 @@
* 3. Neither the name of the copyright holder nor the names of contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTOR(S) ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -75,7 +75,7 @@
*
* And for little-endian machines, add:
*
* #define BYTE_ORDER LITTLE_ENDIAN
* #define BYTE_ORDER LITTLE_ENDIAN
*
* Or for big-endian machines:
*
@ -471,11 +471,11 @@ SHA256Transform(u_int32_t state[8], const u_int8_t data[SHA256_BLOCK_LENGTH])
/* Part of the message block expansion: */
s0 = W256[(j+1)&0x0f];
s0 = sigma0_256(s0);
s1 = W256[(j+14)&0x0f];
s1 = W256[(j+14)&0x0f];
s1 = sigma1_256(s1);
/* Apply the SHA-256 compression function to update a..h */
T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
(W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
T2 = Sigma0_256(a) + Maj(a, b, c);
h = g;

View File

@ -33,5 +33,5 @@ extern PROTO_NORMAL(optreset);
PROTO_DEPRECATED(getopt);
PROTO_DEPRECATED(getopt_long);
PROTO_DEPRECATED(getopt_long_only);
#endif /* !_LIBC_GETOPT_H_ */

View File

@ -1,6 +1,6 @@
/* $OpenBSD: tree.h,v 1.1 2017/06/19 03:06:26 dlg Exp $ */
/*
/*
* Copyright (c) 2016 David Gwynne <dlg@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any

View File

@ -32,7 +32,7 @@
* @(#)mpool.h 8.4 (Berkeley) 11/2/95
*/
#ifndef _MPOOL_H_
#ifndef _MPOOL_H_
#define _MPOOL_H_
#include <sys/queue.h>

View File

@ -39,7 +39,7 @@ dupgl(char **oldgl)
char **newgl;
int ic;
if ((newgl = calloc(_LC_LAST, sizeof(*newgl))) == NULL)
if ((newgl = calloc(_LC_LAST, sizeof(*newgl))) == NULL)
return NULL;
for (ic = LC_ALL; ic < _LC_LAST; ic++) {
if ((newgl[ic] = strdup(ic == LC_ALL ? "" :

View File

@ -32,7 +32,7 @@
#include <wchar.h>
size_t
size_t
wcsxfrm(wchar_t *dest, const wchar_t *src, size_t n)
{
if (n == 0)

View File

@ -6,7 +6,7 @@
#include <wchar.h>
size_t
size_t
wcsxfrm_l(wchar_t *dest, const wchar_t *src, size_t n,
locale_t locale __attribute__((__unused__)))
{

View File

@ -16,7 +16,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*
/*
* ethers(3) a la Sun.
* Originally Written by Roland McGrath <roland@frob.com> 10/14/93.
* Substantially modified by Todd C. Miller <millert@openbsd.org>
@ -92,7 +92,7 @@ ether_aton(const char *s)
int
ether_ntohost(char *hostname, struct ether_addr *e)
{
FILE *f;
FILE *f;
char buf[BUFSIZ+1], *p;
size_t len;
struct ether_addr try;
@ -115,7 +115,7 @@ ether_ntohost(char *hostname, struct ether_addr *e)
memcmp(&try, e, sizeof(try)) == 0) {
(void)fclose(f);
return (0);
}
}
}
(void)fclose(f);
errno = ENOENT;

View File

@ -5,7 +5,7 @@
* -
* Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -17,7 +17,7 @@
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -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

View File

@ -5,7 +5,7 @@
* -
* Copyright (c) 1983, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -17,7 +17,7 @@
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -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
@ -70,7 +70,7 @@ inet_addr(const char *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.

View File

@ -153,7 +153,7 @@ inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
ret = snprintf(dst, size, "%s/%d", buf, bits);
if (ret < 0 || ret >= size) {
errno = EMSGSIZE;
return (NULL);
return (NULL);
}
return (dst);

View File

@ -4,7 +4,7 @@
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -16,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -1,20 +1,20 @@
/* $OpenBSD: rcmdsh.c,v 1.20 2019/06/28 13:32:42 deraadt Exp $ */
/* $OpenBSD: rcmdsh.c,v 1.20 2019/06/28 13:32:42 deraadt Exp $ */
/*
* Copyright (c) 2001, MagniComp
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the distribution.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the distribution.
* 3. Neither the name of the MagniComp nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@ -29,7 +29,7 @@
*/
/*
* This is an rcmd() replacement originally by
* This is an rcmd() replacement originally by
* Chris Siebenmann <cks@utcc.utoronto.ca>.
*/

View File

@ -5,7 +5,7 @@
* -
* Copyright (c) 1985, 1993
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -17,7 +17,7 @@
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -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

View File

@ -5,7 +5,7 @@
* -
* Copyright (c) 1995
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -17,7 +17,7 @@
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -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

View File

@ -5,7 +5,7 @@
* -
* Copyright (c) 1985, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -17,7 +17,7 @@
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -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

View File

@ -36,7 +36,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
/*
* seed = random 15bit
* n = prime, g0 = generator to n,
* j = random so that gcd(j,n-1) == 1
@ -44,7 +44,7 @@
*
* X[0] = random seed.
* X[n] = a*X[n-1]+b mod m is a Linear Congruential Generator
* with a = 7^(even random) mod m,
* with a = 7^(even random) mod m,
* b = random with gcd(b,m) == 1
* m = 31104 and a maximal period of m-1.
*
@ -88,7 +88,7 @@ struct prf_ctx {
#define PFAC_N 3
static const u_int16_t pfacts[PFAC_N] = {
2,
2,
3,
2729
};
@ -161,15 +161,15 @@ permute15(u_int in)
return (right << 8) | left;
}
/*
* Initializes the seed and chooses a suitable generator. Also toggles
/*
* Initializes the seed and chooses a suitable generator. Also toggles
* the msb flag. The msb flag is used to generate two distinct
* cycles of random numbers and thus avoiding reuse of ids.
*
* This function is called from res_randomid() when needed, an
* This function is called from res_randomid() when needed, an
* application does not have to worry about it.
*/
static void
static void
res_initid(void)
{
u_int16_t j, i;
@ -190,10 +190,10 @@ res_initid(void)
ru_a = pmod(RU_AGEN, (tmp >> 16) & 0xfffe, RU_M);
while (ru_b % 3 == 0)
ru_b += 2;
j = arc4random_uniform(RU_N);
/*
/*
* Do a fast gcd(j,RU_N-1), so we can find a j with
* gcd(j, RU_N-1) == 1, giving a new generator for
* RU_GEN^j mod RU_N
@ -206,7 +206,7 @@ res_initid(void)
if (i >= PFAC_N)
noprime = 0;
else
else
j = (j + 1) % RU_N;
}
@ -221,7 +221,7 @@ res_initid(void)
WRAP(clock_gettime)(CLOCK_MONOTONIC, &ts);
ru_reseed = ts.tv_sec + RU_OUT;
ru_msb = ru_msb == 0x8000 ? 0 : 0x8000;
ru_msb = ru_msb == 0x8000 ? 0 : 0x8000;
}
u_int

View File

@ -80,7 +80,7 @@ rresvport_af(int *alport, int af)
return (-1);
}
sa->sa_family = af;
s = socket(af, SOCK_STREAM, 0);
if (s == -1)
return (-1);

View File

@ -4,7 +4,7 @@
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -16,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@ -134,7 +134,7 @@ inet6_rth_reverse(const void *in, void *out)
*addr1 = *addr2;
*addr2 = addr_tmp;
}
break;
default:
return (-1); /* type not supported */
@ -178,7 +178,7 @@ inet6_rth_getaddr(const void *bp, int idx)
switch (rh->ip6r_type) {
case IPV6_RTHDR_TYPE_0:
rh0 = (struct ip6_rthdr0 *)bp;
/*
* Validation for a type-0 routing header.
* Is this too strict?

View File

@ -3,7 +3,7 @@
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -15,7 +15,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
*
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

View File

@ -2,5 +2,5 @@
.PATH: ${LIBCSRCDIR}/nls
SRCS+= catclose.c catgets.c catopen.c
SRCS+= catclose.c catgets.c catopen.c
MAN+= catclose.3 catgets.3 catopen.3

View File

@ -43,7 +43,7 @@ catclose(nl_catd catd)
errno = EBADF;
return -1;
}
if (catd) {
munmap(catd->__data, catd->__size);
free (catd);

View File

@ -48,7 +48,7 @@ catgets(nl_catd catd, int set_id, int msg_id, const char *s)
return (char *) s;
}
cat_hdr = (struct _nls_cat_hdr *) catd->__data;
cat_hdr = (struct _nls_cat_hdr *) catd->__data;
set_hdr = (struct _nls_set_hdr *) ((char *)catd->__data
+ sizeof(struct _nls_cat_hdr));
@ -70,7 +70,7 @@ catgets(nl_catd catd, int set_id, int msg_id, const char *s)
i = (l + u) / 2;
r = msg_id - ntohl(msg_hdr[i].__msgno);
if (r == 0) {
return (char *) catd->__data
return (char *) catd->__data
+ sizeof(struct _nls_cat_hdr)
+ ntohl(cat_hdr->__msg_txt_offset)
+ ntohl(msg_hdr[i].__offset);

View File

@ -57,7 +57,7 @@ catopen(const char *name, int oflag)
char *s, *t, *sep, *dot;
const char *u;
nl_catd catd;
if (name == NULL || *name == '\0')
return (nl_catd) -1;

View File

@ -42,7 +42,7 @@
*
* u = 2^n u1 * u0 (n = number of bits in `u_int', usu. 32)
*
* and
* and
*
* v = 2^n v1 * v0
*

View File

@ -177,7 +177,7 @@ __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq)
v2 = v[2]; /* for D3 */
do {
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

@ -378,7 +378,7 @@ INLINE float64
{
return FLOAT64_MANGLE( ( ( (bits64) zSign )<<63 ) +
( ( (bits64) zExp )<<52 ) +
( ( (bits64) zExp )<<52 ) +
( ( (bits64) zSig0 )<<32 ) + zSig1 );

View File

@ -2585,7 +2585,7 @@ main( int argc, char **argv )
else {
for ( functionCode = 1;
functionCode < NUM_FUNCTIONS;
++functionCode
++functionCode
) {
if ( strcmp( argPtr, functions[ functionCode ].name ) == 0 ) {
break;

View File

@ -48,7 +48,7 @@ int __sdidinit;
#define std(flags, file) \
{0,0,0,flags,file,{0},0,__sF+file,__sclose,__sread,__sseek,__swrite, \
{(unsigned char *)(__sFext+file), 0}}
/* p r w flags file _bf z cookie close read seek write
/* p r w flags file _bf z cookie close read seek write
ext */
/* the usual - (stdin + stdout + stderr) */
@ -173,6 +173,6 @@ __sinit(void)
/* make sure we clean up on exit */
__atexit_register_cleanup(_cleanup); /* conservative */
__sdidinit = 1;
out:
out:
_MUTEX_UNLOCK(&sinit_mutex);
}

View File

@ -72,7 +72,7 @@ __sflags(const char *mode, int *optr)
return (0);
}
while (*mode != '\0')
while (*mode != '\0')
switch (*mode++) {
case 'b':
break;

View File

@ -41,8 +41,8 @@
#include <stdlib.h>
#include "local.h"
/*
* Re-direct an existing, open (probably) file to some other file.
/*
* Re-direct an existing, open (probably) file to some other file.
* ANSI is written such that the original file gets closed if at
* all possible, no matter what.
*/

View File

@ -37,7 +37,7 @@
* in particular, macros and private variables.
*/
#include <wchar.h>
#include <wchar.h>
#include "wcio.h"
#include "fileext.h"
#include "thread_private.h"

View File

@ -44,7 +44,7 @@ __sread(void *cookie, char *buf, int n)
{
FILE *fp = cookie;
int ret;
ret = read(fp->_file, buf, n);
/* if the read succeeded, update the current offset */
if (ret >= 0)
@ -70,7 +70,7 @@ __sseek(void *cookie, fpos_t offset, int whence)
{
FILE *fp = cookie;
off_t ret;
ret = lseek(fp->_file, offset, whence);
if (ret == -1)
fp->_flags &= ~__SOFF;

View File

@ -1496,7 +1496,7 @@ __grow_type_table(unsigned char **typetable, int *tablesize)
return (0);
}
#ifdef FLOATING_POINT
static int
exponent(char *p0, int exp, int fmtch)

View File

@ -159,7 +159,7 @@ __xfputwc(wchar_t wc, FILE *fp)
* string representation. ``prec'' specifies the maximum number of bytes
* to output. If ``prec'' is greater than or equal to zero, we can't assume
* that the multibyte character string ends in a null character.
*
*
* Returns NULL on failure.
* To find out what happened check errno for ENOMEM, EILSEQ and EINVAL.
*/
@ -1494,7 +1494,7 @@ __grow_type_table(unsigned char **typetable, int *tablesize)
return (0);
}
#ifdef FLOATING_POINT
static int
exponent(wchar_t *p0, int exp, int fmtch)

View File

@ -74,7 +74,7 @@ getsubopt(char **optionp, char * const *tokens, char **valuep)
*p = '\0';
for (*valuep = ++p;
*p && *p != ',' && *p != ' ' && *p != '\t'; ++p);
if (*p)
if (*p)
*p++ = '\0';
} else
*p++ = '\0';

View File

@ -4,7 +4,7 @@
/*
* Copyright (c) 2001 Christopher G. Demetriou
* All rights reserved.
*
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -20,7 +20,7 @@
* information about NetBSD.
* 4. 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 DISCLAIMED.
@ -31,7 +31,7 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, 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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
*/
@ -112,7 +112,7 @@ hcreate(size_t nel)
_DIAGASSERT(p2 <= MAX_BUCKETS_LG2);
nel = 1 << p2;
}
/* Allocate the table. */
htablesize = nel;
htable = calloc(htablesize, sizeof htable[0]);

View File

@ -3,7 +3,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:
@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may 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

View File

@ -23,7 +23,7 @@ l64a(long value)
for (i = 0; value != 0 && i < 6; i++) {
digit = value & 0x3f;
if (digit < 2)
if (digit < 2)
*s = digit + '.';
else if (digit < 12)
*s = digit + '0' - 2;

View File

@ -73,7 +73,7 @@ static void insertionsort(u_char *, size_t, size_t, int (*)());
do \
*dst++ = *src++; \
while (i -= 1)
/*
* Find the next possible pointer head. (Trickery for forcing an array
* to do double duty as a linked list when objects do not align with word
@ -157,7 +157,7 @@ EXPONENTIAL: for (i = size; ; i <<= 1)
} else if ((*cmp)(q, p) <= sense) {
t = p;
if (i == size)
big = 0;
big = 0;
goto FASTCASE;
} else
b = p;

View File

@ -4,7 +4,7 @@
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Peter McIlroy and by Dan Bernstein at New York University,
* Peter McIlroy and by Dan Bernstein at New York University,
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -33,13 +33,13 @@
/*
* Radixsort routines.
*
*
* Program r_sort_a() is unstable but uses O(logN) extra memory for a stack.
* Use radixsort(a, n, trace, endchar) for this case.
*
*
* For stable sorting (using N extra pointers) use sradixsort(), which calls
* r_sort_b().
*
*
* For a description of this code, see D. McIlroy, P. McIlroy, K. Bostic,
* "Engineering Radix Sort".
*/
@ -273,7 +273,7 @@ r_sort_b(const u_char **a, const u_char **ta, int n, int i, const u_char *tr,
*--top[tr[(*ak)[i]]] = *ak;
}
}
static __inline void
simplesort(const u_char **a, int n, int b, const u_char *tr, u_int endch)
/* insertion sort */

View File

@ -58,7 +58,7 @@
* state information, which will allow a degree seven polynomial. (Note:
* the zeroeth word of state information also has some other information
* stored in it -- see setstate() for details).
*
*
* The random number generation technique is a linear feedback shift register
* approach, employing trinomials (since there are fewer terms to sum up that
* way). In this approach, the least significant bit of all the numbers in
@ -132,11 +132,11 @@ static int seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
static int32_t randtbl[DEG_3 + 1] = {
TYPE_3,
0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05,
0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454,
0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471,
0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1,
0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41,
0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05,
0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454,
0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471,
0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1,
0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41,
0xf3bec5da,
};
@ -253,12 +253,12 @@ srandom_deterministic(unsigned int x)
* the break values for the different R.N.G.'s, we choose the best (largest)
* one we can and set things up for it. srandom() is then called to
* initialize the state information.
*
*
* Note that on return from srandom(), we set state[-1] to be the type
* multiplexed with the current value of the rear pointer; this is so
* successive calls to initstate() won't lose this information and will be
* able to restart with setstate().
*
*
* Note: the first thing we do is save the current state, if any, just like
* setstate() so that it doesn't matter when initstate is called.
*

View File

@ -3,7 +3,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:
@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may 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

View File

@ -33,7 +33,7 @@
/*
* Get next token from string *stringp, where tokens are possibly-empty
* strings separated by characters from delim.
* strings separated by characters from delim.
*
* Writes NULs into the string at *stringp to end tokens.
* delim need not remain constant from call to call.

View File

@ -45,7 +45,7 @@
#include <wchar.h>
wchar_t *
wcstok(wchar_t * __restrict s, const wchar_t * __restrict delim,
wcstok(wchar_t * __restrict s, const wchar_t * __restrict delim,
wchar_t ** __restrict last)
{
const wchar_t *spanp;

View File

@ -112,7 +112,7 @@ ASM_NOERR=__get_tcb.o __set_tcb.o __threxit.o __thrsleep.o __thrwakeup.o \
getthrname.o getuid.o \
issetugid.o \
sched_yield.o setthrname.o sync.o \
umask.o
umask.o
PASM_NOERR= ${ASM_NOERR:.o=.po}
SASM_NOERR= ${ASM_NOERR:.o=.so}
DASM_NOERR= ${ASM_NOERR:.o=.do}

View File

@ -265,7 +265,7 @@ _thread_ftrylockfile(FILE * fp)
return (ret);
}
void
void
_thread_funlockfile(FILE * fp)
{
int idx = file_idx(fp);

View File

@ -59,7 +59,7 @@ static const struct lc_time_T C_time_locale = {
L"Jul", L"Aug", L"Sep", L"Oct", L"Nov", L"Dec"
}, {
L"January", L"February", L"March", L"April", L"May", L"June",
L"July", L"August", L"September", L"October", L"November",
L"July", L"August", L"September", L"October", L"November",
L"December"
}, {
L"Sun", L"Mon", L"Tue", L"Wed",
@ -116,7 +116,7 @@ extern char * tzname[];
#define IN_ALL 3
size_t
wcsftime(wchar_t *__restrict s, size_t maxsize,
wcsftime(wchar_t *__restrict s, size_t maxsize,
const wchar_t *__restrict format, const struct tm *__restrict t)
{
wchar_t *p;
@ -135,7 +135,7 @@ wcsftime(wchar_t *__restrict s, size_t maxsize,
}
static wchar_t *
_fmt(const wchar_t *format, const struct tm *t, wchar_t *pt,
_fmt(const wchar_t *format, const struct tm *t, wchar_t *pt,
const wchar_t *ptlim, int *warnp)
{
for ( ; *format; ++format) {
@ -292,7 +292,7 @@ label:
tm = *t;
mkt = mktime(&tm);
(void) swprintf(buf,
(void) swprintf(buf,
sizeof buf/sizeof buf[0],
L"%ld", (long) mkt);
pt = _add(buf, pt, ptlim);
@ -361,7 +361,7 @@ label:
DAYSPERLYEAR :
DAYSPERNYEAR;
/*
** What yday (-3 ... 3) does the ISO year
** What yday (-3 ... 3) does the ISO year
** begin on?
*/
bot = ((yday + 11 - wday) % DAYSPERWEEK) - 3;
@ -394,7 +394,7 @@ label:
else if (*format == 'g') {
*warnp = IN_ALL;
pt = _yconv(year, base, 0, 1, pt, ptlim);
} else
} else
pt = _yconv(year, base, 1, 1, pt, ptlim);
}
continue;
@ -442,7 +442,7 @@ label:
pt = _sadd(t->tm_zone, pt, ptlim);
else
if (t->tm_isdst >= 0)
pt = _sadd(tzname[t->tm_isdst != 0],
pt = _sadd(tzname[t->tm_isdst != 0],
pt, ptlim);
/*
** C99 says that %Z must be replaced by the
@ -461,7 +461,7 @@ label:
if (diff < 0) {
sign = L"-";
diff = -diff;
} else
} else
sign = L"+";
pt = _add(sign, pt, ptlim);
diff /= SECSPERMIN;
@ -521,7 +521,7 @@ _sadd(const char *str, wchar_t *pt, const wchar_t *ptlim)
*/
static wchar_t *
_yconv(int a, int b, int convert_top, int convert_yy, wchar_t *pt,
_yconv(int a, int b, int convert_top, int convert_yy, wchar_t *pt,
const wchar_t *ptlim)
{
int lead;

View File

@ -17,7 +17,7 @@ CDIAGFLAGS+= -Wno-missing-field-initializers
# cbor/
SRCS+= arrays.c bytestrings.c callbacks.c common.c encoding.c floats_ctrls.c
SRCS+= ints.c maps.c serialization.c streaming.c tags.c strings.c
SRCS+= ints.c maps.c serialization.c streaming.c tags.c strings.c
# cbor/internal
SRCS+= builder_callbacks.c encoders.c loaders.c memory_utils.c

View File

@ -9,15 +9,15 @@
# ifndef CBOR_EXPORT
# ifdef cbor_EXPORTS
/* We are building this library */
# define CBOR_EXPORT
# define CBOR_EXPORT
# else
/* We are using this library */
# define CBOR_EXPORT
# define CBOR_EXPORT
# endif
# endif
# ifndef CBOR_NO_EXPORT
# define CBOR_NO_EXPORT
# define CBOR_NO_EXPORT
# endif
#endif

View File

@ -10,6 +10,6 @@
#define CBOR_PRETTY_PRINTER 1
#define CBOR_RESTRICT_SPECIFIER restrict
#define CBOR_INLINE_SPECIFIER
#define CBOR_INLINE_SPECIFIER
#endif //LIBCBOR_CONFIGURATION_H

View File

@ -821,7 +821,7 @@ extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */
extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_printw) /* implemented */
GCC_PRINTFLIKE(2,0);
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *, va_list) /* implemented */
GCC_PRINTFLIKE(2,0);
GCC_PRINTFLIKE(2,0);
extern NCURSES_EXPORT(int) vwscanw (WINDOW *, const char *, va_list) GCC_DEPRECATED(use vw_scanw) /* implemented */
GCC_SCANFLIKE(2,0);
extern NCURSES_EXPORT(int) vw_scanw (WINDOW *, const char *, va_list) /* implemented */

View File

@ -50,13 +50,13 @@ static inline int min_heap_erase(min_heap_t * s, struct event * e);
static inline void min_heap_shift_up_(min_heap_t * s, size_t hole_index, struct event * e);
static inline void min_heap_shift_down_(min_heap_t * s, size_t hole_index, struct event * e);
int
int
min_heap_elem_greater(struct event * a, struct event * b)
{
return timercmp(&a->ev_timeout, &b->ev_timeout, >);
}
void
void
min_heap_ctor(min_heap_t * s)
{
s->p = 0;
@ -67,17 +67,17 @@ void min_heap_dtor(min_heap_t * s) {
if (s->p)
free(s->p);
}
void
void
min_heap_elem_init(struct event * e)
{
e->min_heap_idx = SIZE_MAX;
}
int
int
min_heap_empty(min_heap_t * s)
{
return 0 == s->n;
}
size_t
size_t
min_heap_size(min_heap_t * s)
{
return s->n;
@ -88,7 +88,7 @@ min_heap_top(min_heap_t * s)
return s->n ? *s->p : 0;
}
int
int
min_heap_push(min_heap_t * s, struct event * e)
{
if (min_heap_reserve(s, s->n + 1))
@ -109,7 +109,7 @@ min_heap_pop(min_heap_t * s)
return 0;
}
int
int
min_heap_erase(min_heap_t * s, struct event * e)
{
if (e->min_heap_idx != SIZE_MAX) {
@ -132,7 +132,7 @@ min_heap_erase(min_heap_t * s, struct event * e)
return -1;
}
int
int
min_heap_reserve(min_heap_t * s, size_t n)
{
if (s->a < n) {
@ -148,7 +148,7 @@ min_heap_reserve(min_heap_t * s, size_t n)
return 0;
}
void
void
min_heap_shift_up_(min_heap_t * s, size_t hole_index, struct event * e)
{
size_t parent = (hole_index - 1) / 2;
@ -162,7 +162,7 @@ min_heap_shift_up_(min_heap_t * s, size_t hole_index, struct event * e)
s->p[hole_index] = e;
}
void
void
min_heap_shift_down_(min_heap_t * s, size_t hole_index, struct event * e)
{
size_t min_child = 2 * (hole_index + 1);

View File

@ -75,7 +75,7 @@ RunXmlwfNotWF() {
return 1
else
return 0
fi
fi
}
# RunXmlwfWF file reldir
@ -84,21 +84,21 @@ RunXmlwfWF() {
file="$1"
reldir="$2"
$XMLWF -p -N -d "$OUTPUT$reldir" "$file" > outfile || return $?
read outdata < outfile
if test "$outdata" = "" ; then
if [ -f "out/$file" ] ; then
$DIFF "$OUTPUT$reldir$file" "out/$file" > outfile
if [ -s outfile ] ; then
read outdata < outfile
if test "$outdata" = "" ; then
if [ -f "out/$file" ] ; then
$DIFF "$OUTPUT$reldir$file" "out/$file" > outfile
if [ -s outfile ] ; then
cp outfile "$OUTPUT$reldir$file.diff"
echo "Output differs: $reldir$file"
return 1
fi
fi
fi
fi
return 0
else
else
echo "In $reldir: $outdata"
return 1
fi
fi
}
SUCCESS=0

View File

@ -69,7 +69,7 @@ function retrieves the authenticator's
CBOR array and, on success, returns the first blob
.Pq iterating from array index zero
that can be
decrypted by
decrypted by
.Fa key_ptr ,
where
.Fa key_ptr

View File

@ -91,7 +91,7 @@ typedef int (*fuse_fill_dir_t)(void *, const char *, const struct stat *,
typedef struct fuse_dirhandle *fuse_dirh_t;
typedef int (*fuse_dirfil_t)(fuse_dirh_t, const char *, int, ino_t);
/*
/*
* Fuse operations work in the same way as their UNIX file system
* counterparts. A major exception is that these routines return
* a negated errno value (-errno) on failure.

View File

@ -56,7 +56,7 @@ For an ASCII-encoding algorithm:
- Add an ENCODING_* definition in keynote.h
- Add additional key prefix string definitions in signature.h
- In signature.c:
- In keynote_get_sig_algorithm(), add code for detecting signatures
- In keynote_get_sig_algorithm(), add code for detecting signatures
with this encoding.
- Likewise for keys in keynote_get_key_algorithm()
- In kn_decode_key(), add code in the switch statement for decoding

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO

View File

@ -2,7 +2,7 @@
LIB= keynote
MAN= keynote.3 keynote.4 keynote.5
NOPIC=
NOPIC=
CFLAGS+= -Wall -I. -I${.CURDIR}
LEXFLAGS = -Cr -Pkn -s -i
YACCFLAGS = -d -p kn -b k

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -29,7 +29,7 @@
#define HASHTABLESIZE 37
#define SESSIONTABLESIZE 37
struct keynote_session
struct keynote_session
{
int ks_id;
int ks_assertioncounter;
@ -53,14 +53,14 @@ struct keylist
struct keylist *key_next;
};
struct assertion
struct assertion
{
void *as_authorizer;
char *as_buf;
char *as_signature;
char *as_authorizer_string_s;
char *as_authorizer_string_e;
char *as_keypred_s;
char *as_keypred_s;
char *as_keypred_e;
char *as_conditions_s;
char *as_conditions_e;

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -127,7 +127,7 @@ keynote_in_action_authorizers(void *key, int algorithm)
/*
* Add a key to the keylist. Return RESULT_TRUE on success, -1 (and set
* keynote_errno) otherwise. We are not supposed to make a copy of the
* keynote_errno) otherwise. We are not supposed to make a copy of the
* argument.
*/
int
@ -135,13 +135,13 @@ keynote_keylist_add(struct keylist **keylist, char *key)
{
struct keynote_deckey dc;
struct keylist *kl;
if (keylist == NULL)
{
keynote_errno = ERROR_MEMORY;
return -1;
}
kl = calloc(1, sizeof(struct keylist));
if (kl == NULL)
{
@ -211,7 +211,7 @@ kn_remove_authorizer(int sessid, char *key)
keynote_keylist_free(kl2);
return 0;
}
keynote_errno = ERROR_NOTFOUND;
return -1;
}
@ -359,7 +359,7 @@ keynote_add_htable(struct assertion *as, int which)
}
/*
* Parse and store an assertion in the internal hash table.
* Parse and store an assertion in the internal hash table.
* Return the result of the evaluation, if doing early evaluation.
* If an error was encountered, set keynote_errno.
*/
@ -398,7 +398,7 @@ kn_add_assertion(int sessid, char *asrt, int len, int assertion_flags)
keynote_errno = ERROR_SYNTAX;
return -1;
}
if (keynote_add_htable(as, 0) != RESULT_TRUE)
{
keynote_free_assertion(as);
@ -478,7 +478,7 @@ keynote_sremove_assertion(int sessid, int assertid)
return keynote_remove_assertion(sessid, assertid, 0);
}
/*
/*
* Free an assertion structure.
*/
void
@ -503,7 +503,7 @@ keynote_free_assertion(struct assertion *as)
free(as);
}
unsigned int
unsigned int
keynote_stringhash(char *name, unsigned int size)
{
unsigned int hash_val = 0;
@ -512,7 +512,7 @@ keynote_stringhash(char *name, unsigned int size)
if ((size == 0) || (size == 1))
return 0;
for (; *name; name++)
for (; *name; name++)
{
hash_val = (hash_val << 2) + *name;
if ((i = hash_val & 0x3fff) != 0)

View File

@ -1,5 +1,4 @@
/* $OpenBSD: base64.c,v 1.12 2023/04/13 18:20:21 tb Exp $ */
/* $OpenBSD: base64.c,v 1.12 2023/04/13 18:20:21 tb Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@dsl.cis.upenn.edu)
*
@ -7,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -186,7 +186,7 @@ keynote_env_lookup(char *name, struct environment **table,
{
struct environment *en;
for (en = table[keynote_stringhash(name, hashsize)];
for (en = table[keynote_stringhash(name, hashsize)];
en != NULL;
en = en->env_next)
if (((en->env_flags & ENVIRONMENT_FLAG_REGEX) &&
@ -213,9 +213,9 @@ keynote_env_delete(char *name, struct environment **table,
{
struct environment *en, *en2;
unsigned int h;
h = keynote_stringhash(name, hashsize);
if (table[h] != NULL)
{
if (!strcmp(table[h]->env_name, name))
@ -226,7 +226,7 @@ keynote_env_delete(char *name, struct environment **table,
return RESULT_TRUE;
}
else
for (en = table[h];
for (en = table[h];
en->env_next != NULL;
en = en->env_next)
if (!strcmp(en->env_next->env_name, name))
@ -241,7 +241,7 @@ keynote_env_delete(char *name, struct environment **table,
return RESULT_FALSE;
}
/*
/*
* Add a new variable in hash table. Return RESULT_TRUE on success,
* ERROR_MEMORY on failure. If hashsize is 1, second argument is
* actually a pointer to a list. The arguments are duplicated.
@ -252,7 +252,7 @@ keynote_env_add(char *name, char *value, struct environment **table,
{
struct environment *en;
unsigned int h, i;
en = calloc(1, sizeof(struct environment));
if (en == NULL) {
keynote_errno = ERROR_MEMORY;
@ -301,8 +301,8 @@ keynote_env_add(char *name, char *value, struct environment **table,
}
}
/*
* This means that new assignments of existing variable will override
/*
* This means that new assignments of existing variable will override
* the old ones.
*/
h = keynote_stringhash(name, hashsize);
@ -321,7 +321,7 @@ keynote_env_cleanup(struct environment **table, unsigned int hashsize)
if ((hashsize == 0) || (table == NULL))
return;
while (hashsize > 0)
{
while (table[hashsize - 1] != NULL) {
@ -367,7 +367,7 @@ int
keynote_retindex(char *s)
{
int i;
for (i = 0; i < keynote_current_session->ks_values_num; i++)
if (!strcmp(s, keynote_current_session->ks_values[i]))
return i;
@ -383,7 +383,7 @@ keynote_find_session(int sessid)
{
unsigned int h = sessid % SESSIONTABLESIZE;
struct keynote_session *ks;
for (ks = keynote_sessions[h];
ks != NULL;
ks = ks->ks_next)
@ -506,7 +506,7 @@ kn_close(int sessid)
keynote_sessions[ks->ks_id % SESSIONTABLESIZE] = ks->ks_next;
if (ks->ks_next != NULL)
ks->ks_next->ks_prev = NULL;
}
else
{
@ -514,12 +514,12 @@ kn_close(int sessid)
if (ks->ks_next != NULL)
ks->ks_next->ks_prev = ks->ks_prev;
}
free(ks);
keynote_current_session = NULL;
return 0;
}
/*
* Add an action attribute.
*/
@ -545,7 +545,7 @@ kn_add_action(int sessid, char *name, char *value, int flags)
}
if (flags & ENVIRONMENT_FLAG_REGEX)
i = keynote_env_add(name, value,
i = keynote_env_add(name, value,
&(keynote_current_session->ks_env_regex), 1, flags);
else
i = keynote_env_add(name, value, keynote_current_session->ks_env_table,
@ -621,7 +621,7 @@ kn_do_query(int sessid, char **returnvalues, int numvalues)
return -1;
}
/*
/*
* We may use already set returnvalues, or use new ones,
* but we must have some before we can evaluate.
*/

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -72,7 +72,7 @@ keynote_sign(int argc, char *argv[])
exit(1);
}
}
if (argc > 5 + flg)
{
prlen = atoi(argv[5 + flg]);

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO

View File

@ -7,11 +7,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -220,7 +220,7 @@ read_environment(char *filename)
perror(filename);
return -1;
}
kvfoo = kv_create_buffer(fp, YY_BUF_SIZE);
kv_switch_to_buffer(kvfoo);
BEGIN(FIRSTPART);
@ -231,7 +231,7 @@ read_environment(char *filename)
{
case 0:
return 0;
default:
if (keynote_errno == ERROR_MEMORY)
fprintf(stderr,

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -60,7 +60,7 @@ expr: VSTRING EQ STRING { int i = kn_add_action(sessid, $1, $3, 0);
return i;
free($1);
free($3);
} expr
} expr
%%
void
kverror(char *s)

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -90,10 +90,10 @@ keynote_verify(int argc, char *argv[])
fprintf(stderr, "kn_init() failed (errno %d).\n", keynote_errno);
exit(keynote_errno);
}
while ((ch = getopt(argc, argv, "hqistl:e:k:r:")) != -1)
{
switch (ch)
switch (ch)
{
case 'e':
if (read_environment(optarg) == -1)
@ -184,7 +184,7 @@ keynote_verify(int argc, char *argv[])
foov = calloc(numretv, sizeof(char **));
if (foov == NULL)
{
/*
/*
* If this were a real program, we 'd be freeing
* retv here. Since we're exiting, we can be a
* little sloppy.

View File

@ -6,11 +6,11 @@
* in April-May 1998
*
* Copyright (C) 1998, 1999 by Angelos D. Keromytis.
*
*
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
* modification of this software.
* modification of this software.
*
* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTY. IN PARTICULAR, THE AUTHORS MAKES NO
@ -81,10 +81,10 @@ struct keynote_keylist
#define ENVIRONMENT_FLAG_FUNC 0x0001 /* This is a callback function */
#define ENVIRONMENT_FLAG_REGEX 0x0002 /* Regular expression for name */
#define ASSERT_FLAG_LOCAL 0x0001 /*
#define ASSERT_FLAG_LOCAL 0x0001 /*
* Trusted assertion -- means
* signature is not verified, and
* authorizer field can
* authorizer field can
* include symbolic names.
*/
#define ASSERT_FLAG_SIGGEN 0x0002 /*

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