Commit 2d3683e1 authored by Per Cederqvist's avatar Per Cederqvist

Release 0.98

parent b31c15e9
This diff is collapsed.
......@@ -26,7 +26,44 @@ isc_initialize(IscConfig * cfg)
IscMaster * mcb;
IscMasterConfig * mcfg;
IscSessionConfig * scfg;
/* Handle user specified defaults */
if (cfg)
switch (cfg->version)
{
case 0:
break;
case 1005:
mcfg = &cfg->master;
switch (mcfg->version)
{
case 0:
break;
case 1001:
if (mcfg->memfn.alloc &&
mcfg->memfn.realloc &&
mcfg->memfn.free)
isc_setallocfn(mcfg->memfn.alloc,
mcfg->memfn.realloc,
mcfg->memfn.free);
if (mcfg->abortfn)
isc_setabortfn(mcfg->abortfn);
break;
default:
errno = EINVAL;
return NULL;
}
break;
default:
errno = EINVAL;
return NULL;
}
ISC_XNEW(mcb);
......@@ -46,7 +83,6 @@ isc_initialize(IscConfig * cfg)
{
case 1005:
scfg = &cfg->session;
mcfg = &cfg->master;
switch (scfg->version)
{
......@@ -72,27 +108,6 @@ isc_initialize(IscConfig * cfg)
return NULL;
}
switch (mcfg->version)
{
case 0:
break;
case 1001:
if (mcfg->memfn.alloc &&
mcfg->memfn.realloc &&
mcfg->memfn.free)
isc_setallocfn(mcfg->memfn.alloc,
mcfg->memfn.realloc,
mcfg->memfn.free);
if (mcfg->abortfn)
isc_setabortfn(mcfg->abortfn);
break;
default:
isc_free(mcb);
errno = EINVAL;
return NULL;
}
break;
default:
......
......@@ -15,7 +15,7 @@
#include "isc.h"
#include "intern.h"
extern void *memcpy(void *, void *, int);
extern void *memcpy(void *, const void *, int);
IscMessage *
......
......@@ -22,7 +22,7 @@
/*
* External function declarations
*/
extern void *memcpy(void *, void *, int);
extern void *memcpy(void *, const void *, int);
extern char *strerror(int);
......
......@@ -55,7 +55,7 @@ extern int accept(int fd, struct sockaddr *sock, int *len);
#undef inet_ntoa
#endif
static char *inet_ntoa(ad)
char *inet_ntoa(ad)
struct in_addr ad;
{
u_long s_ad;
......
......@@ -240,9 +240,10 @@ rflag: switch (*++fmt)
* zeroes later, so buffer size stays rational.
*/
if (prec > MAXFRACT) {
if (*fmt != 'g' && *fmt != 'G' || (flags&ALT))
fpprec = prec - MAXFRACT;
prec = MAXFRACT;
if ((*fmt != 'g' && *fmt != 'G') ||
(flags&ALT))
fpprec = prec - MAXFRACT;
prec = MAXFRACT;
}
else if (prec == -1)
prec = DEFPREC;
......@@ -556,7 +557,7 @@ eformat: if (expcnt) {
* conversion is less than -4 or greater than the precision.''
* -- ANSI X3J11
*/
if (expcnt > prec || !expcnt && fract && fract < .0001) {
if (expcnt > prec || (!expcnt && fract && fract < .0001)) {
/*
* g/G format counts "significant digits, not digits of
* precision; for the e/E format, this just causes an
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment