if (*p == '/') {
q = ++p;
if (!(p = parseTime(&time, p, &dstend))) return NULL;
- while(*buf++ = *q++);
+ while((*buf++ = *q++));
}
if (*p) return NULL;
return p;
errno = EINVAL;
return(SIG_ERR);
}
- sigemptyset(&sa.sa_mask);
+ (void) sigemptyset(&sa.sa_mask);
#ifdef WANT_UNRELIABLE_SIGNALS
/* Allow the signal being handled to interrupt the signal handler. */
register struct netent *p;
setnetent(_net_stayopen);
- while (p = getnetent())
+ while ((p = getnetent()))
if (p->n_addrtype == type && p->n_net == net)
break;
if (!_net_stayopen)
register char **cp;
setnetent(_net_stayopen);
- while (p = getnetent()) {
+ while ((p = getnetent())) {
if (strcmp(p->n_name, name) == 0)
break;
for (cp = p->n_aliases; *cp != 0; cp++)
register struct protoent *p;
setprotoent(_proto_stayopen);
- while (p = getprotoent())
+ while ((p = getprotoent()))
if (p->p_proto == proto)
break;
if (!_proto_stayopen)
{
register char *mp, c;
- while (c = *cp) {
+ while ((c = *cp)) {
for (mp = match; *mp; mp++)
if (*mp == c)
return (cp);
{
register char *mp, c;
- while (c = *cp) {
+ while ((c = *cp)) {
for (mp = match; *mp; mp++)
if (*mp == c)
return (cp);
register char **cp;
setservent(_serv_stayopen);
- while (p = getservent()) {
+ while ((p = getservent())) {
if (strcmp(name, p->s_name) == 0)
goto gotname;
for (cp = p->s_aliases; *cp; cp++)
register struct servent *p;
setservent(_serv_stayopen);
- while (p = getservent()) {
+ while ((p = getservent())) {
if (p->s_port != port)
continue;
if (proto == 0 || strcmp(p->s_proto, proto) == 0)
base = 8, cp++;
if (*cp == 'x' || *cp == 'X')
base = 16, cp++;
- while (c = *cp) {
+ while ((c = *cp)) {
if (isdigit(c)) {
val = (val * base) + (c - '0');
cp++;
* 'exp_dn' is a pointer to a buffer of size 'length' for the result.
* Return size of compressed name or -1 if there was an error.
*/
+int
dn_expand(msg, eomorig, comp_dn, exp_dn, length)
CONST u_char *msg, *eomorig, *comp_dn;
u_char *exp_dn;
/*
* fetch next label in domain name
*/
- while (n = *cp++) {
+ while ((n = *cp++)) {
/*
* Check for indirection
*/
/*
* Skip over a compressed domain name. Return the size or -1.
*/
+int
dn_skipname(comp_dn, eom)
CONST u_char *comp_dn, *eom;
{
for (cpp = dnptrs; cpp < lastdnptr; cpp++) {
dn = exp_dn;
sp = cp = *cpp;
- while (n = *cp++) {
+ while ((n = *cp++)) {
/*
* check for indirection
*/
* Form all types of queries.
* Returns the size of the result or -1.
*/
+int
res_mkquery(op, dname, class, type, data, datalen, newrr, buf, buflen)
int op; /* opcode of query */
_CONST char *dname; /* domain name */
* Only useful for queries in the same name hierarchy as the local host
* (not, for example, for host address-to-name lookups in domain in-addr.arpa).
*/
+int
res_search(name, class, type, answer, anslen)
char *name; /* domain name */
int class, type; /* class and type of query */
#endif /* FD_SET */
#endif /* _MINIX */
+int
res_send(buf, buflen, answer, anslen)
const char *buf;
int buflen;
#define lc(c, d) ((((c)= (d)) - 'A') <= ('Z' - 'A') ? (c)+= ('a' - 'A') : 0)
for (;;) {
- lc(cw, *word);
- lc(cp, *pattern);
+ (void) lc(cw, *word);
+ (void) lc(cp, *pattern);
if (cp == '*') {
do pattern++; while (*pattern == '*');
- lc(cp, *pattern);
+ (void) lc(cp, *pattern);
if (cp == 0) return 1;
while (cw != 0) {
if (cw == cp && match(word+1, pattern+1)) return 1;
word++;
- lc(cw, *word);
+ (void) lc(cw, *word);
}
return 0;
} else
#define lc(c, d) ((((c)= (d)) - 'A') <= ('Z' - 'A') ? (c)+= ('a' - 'A') : 0)
for (;;) {
- lc(cw, *word);
- lc(cp, *pattern);
+ (void) lc(cw, *word);
+ (void) lc(cp, *pattern);
if (cp == '*') {
do pattern++; while (*pattern == '*');
- lc(cp, *pattern);
+ (void) lc(cp, *pattern);
if (cp == 0) return 1;
while (cw != 0) {
if (cw == cp && match(word+1, pattern+1)) return 1;
word++;
- lc(cw, *word);
+ (void) lc(cw, *word);
}
return 0;
} else
#include <minix/type.h>
#include <minix/const.h>
#include <stdio.h>
+#include <stdlib.h>
#include <machine/archtypes.h>
#include "../../../kernel/proc.h"
sprintf(label, "fs_%.12s", p);
} else {
if (stat(name, &statbuf) < 0) return -1;
- sprintf(label, "fs_%04x%x", statbuf.st_dev, statbuf.st_ino);
+ sprintf(label, "fs_%04x%lx", statbuf.st_dev, statbuf.st_ino);
}
/* Tell VFS that we are passing in a 16-byte label. */
};
_PROTOTYPE(double hypot, (double x, double y ));
-_PROTOTYPE(double cabs, (struct complex p_compl ));
/* $Header$ */
return y*sqrt(x*x+1.0);
}
+#if 0
+
+_PROTOTYPE(double cabs, (struct complex p_compl ));
+
double
cabs(p_compl)
struct complex p_compl;
{
return hypot(p_compl.r, p_compl.i);
}
+#endif
if (!name) return 0;
if (*_penviron == NULL) return 1;
- if (r = strchr(name, '=')) {
+ if ((r = strchr(name, '='))) {
register _CONST char *p, *q;
*r = '\0';
size = i;
p = *_penviron;
*_penviron = v;
- while (*v++ = *p++); /* copy the environment */
+ while ((*v++ = *p++)); /* copy the environment */
v = *_penviron;
} else if (!(size % ENTRY_INC)) {
if (!(v = realloc(*_penviron, rounded(size) * sizeof(char **))))
register char *p = (char *) &w;
while (cnt--) {
- putc(*p++, stream);
+ (void) putc(*p++, stream);
}
if (ferror(stream)) return EOF;
return w;
* Set the value of the environmental variable "name" to be
* "value". If rewrite is set, replace any current value.
*/
+int
setenv(name, value, rewrite)
register const char *name;
register const char *value;
if (!rewrite)
return (0);
if (strlen(c) >= l_value) { /* old larger; copy over */
- while (*c++ = *value++);
+ while ((*c++ = *value++));
return (0);
}
} else { /* create new slot */
malloc((size_t)((int)(c - name) + l_value + 2))))
return (-1);
for (c = environ[offset]; (*c = *name++) && *c != '='; ++c);
- for (*c++ = '='; *c++ = *value++;);
+ for (*c++ = '='; (*c++ = *value++););
return (0);
}
/* "can't happen" */
assert(nope);
/* NOTREACHED */
+ _exit(1);
}
/*
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#include <unistd.h>
#ifdef __minix_vmd
#include <bsd/asciictype.h>
#else
const char *oldfmt;
char *s1, buf[1025];
- while (c = *fmt++) {
+ while ((c = *fmt++)) {
if (c != '%') {
#ifdef CPM
if (c == '\n') {
static int _gettemp(char*,int*);
+int
mkstemp(path)
char *path;
{
return(_gettemp(path, (int *)NULL) ? path : (char *)NULL);
}
-static
+static int
_gettemp(path, doopen)
char *path;
register int *doopen;
retval = _doprnt(format, arg, &tmp_stream);
tmp_stream._count = 1;
- putc('\0',&tmp_stream);
+ (void) putc('\0',&tmp_stream);
return retval;
}
void outc(c)
int c;
{
- putchar(c);
+ (void) putchar(c);
}
/* Move cursor to r,c */
{
if ((_cursvar.cursrow < LINES) || (_cursvar.curscol < COLS)) {
newattr(ch);
- putchar(ch);
+ (void) putchar(ch);
}
}
}
inp = getchar();
if (_cursvar.echoit) {
- mvwaddch(curscr, win->_cury + win->_begy,
+ (void) mvwaddch(curscr, win->_cury + win->_begy,
win->_curx + win->_begx, inp);
waddch(win, inp);
}
#include <signal.h>
#include <errno.h>
#include <ctype.h>
+#include <termcap.h>
+#include <unistd.h>
/*
** Manifest constants.
endpoint_t me = NONE;
char name[20];
void (*suicide)(void);
- static int panicing= 0;
va_list args;
- if(panicing) return;
- panicing= 1;
-
if(sys_whoami(&me, name, sizeof(name)) == OK && me != NONE)
printf("%s(%d): panic: ", name, me);
else
{
/* Make exit() an alias for sef_exit() for system services. */
sef_exit(status);
+ panic("sef_exit failed");
}
/*===========================================================================*
{
/* Make exit() an alias for sef_exit() for system services. */
sef_exit(status);
+ panic("sef_exit failed");
}
/*===========================================================================*
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
+
#include "gzguts.h"
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
+
#include "gzguts.h"
/* Local functions */
gz_error(state, Z_DATA_ERROR, "unknown header flags set");
return -1;
}
- NEXT(); /* modification time */
- NEXT();
- NEXT();
- NEXT();
- NEXT(); /* extra flags */
- NEXT(); /* operating system */
+ (void) NEXT(); /* modification time */
+ (void) NEXT();
+ (void) NEXT();
+ (void) NEXT();
+ (void) NEXT(); /* extra flags */
+ (void) NEXT(); /* operating system */
if (flags & 4) { /* extra field */
len = (unsigned)NEXT();
len += (unsigned)NEXT() << 8;
while (NEXT() > 0)
;
if (flags & 2) { /* header crc */
- NEXT();
- NEXT();
+ (void) NEXT();
+ (void) NEXT();
}
/* an unexpected end of file is not checked for here -- it will be
noticed on the first request for uncompressed data */
#include "gzguts.h"
+#include <unistd.h>
+
/* Local functions */
local int gz_init OF((gz_statep));
local int gz_comp OF((gz_statep, int));