#define log_dec_references __log_dec_references
#define log_get_channel_type __log_get_channel_type
#define log_free_channel __log_free_channel
+#define log_close_debug_channels __log_close_debug_channels
FILE * log_open_stream(log_channel);
int log_close_stream(log_channel);
int log_dec_references(log_channel);
log_channel_type log_get_channel_type(log_channel);
int log_free_channel(log_channel);
+void log_close_debug_channels(log_context);
#endif /* !LOGGING_H */
#endif /*MEMCLUSTER_RECORD*/
#endif /*MEMCLUSTER_DEBUG*/
#define memstats __memstats
+#define memactive __memactive
int meminit(size_t, size_t);
void * __memget(size_t);
void * __memget_record(size_t, const char *, int);
void __memput_record(void *, size_t, const char *, int);
void memstats(FILE *);
+int memactive(void);
#endif /* MEMCLUSTER_H */
/*
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.4 2001/05/22 22:51:31 marka Exp $
+ * $Id: resolv.h,v 1.5 2001/05/28 08:38:20 marka Exp $
*/
#ifndef _RESOLV_H_
#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
struct __res_state; /* forward */
+__BEGIN_DECLS
void __h_errno_set(struct __res_state *res, int err);
+__END_DECLS
/*
* Resolver configuration file.
/* Things involving an internal (static) resolver context. */
#ifdef _REENTRANT
+__BEGIN_DECLS
extern struct __res_state *__res_state(void);
+__END_DECLS
#define _res (*__res_state())
#else
#ifndef __BIND_NOSTATIC
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: nsap_addr.c,v 1.1 2001/03/29 06:31:41 marka Exp $";
+static const char rcsid[] = "$Id: nsap_addr.c,v 1.2 2001/05/28 08:38:24 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
u_char c, nib;
u_int len = 0;
+ if (ascii[0] != '0' || (ascii[1] != 'x' && ascii[1] != 'X'))
+ return (0);
+ ascii += 2;
+
while ((c = *ascii++) != '\0' && len < (u_int)maxlen) {
if (c == '.' || c == '+' || c == '/')
continue;
inet_nsap_ntoa(int binlen, const u_char *binary, char *ascii) {
int nib;
int i;
- static char tmpbuf[255*3];
+ static char tmpbuf[2+255*3];
char *start;
if (ascii)
start = tmpbuf;
}
+ *ascii++ = '0';
+ *ascii++ = 'x';
+
if (binlen > 255)
binlen = 255;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: getgrent_r.c,v 1.3 2001/04/05 06:19:32 marka Exp $";
+static const char rcsid[] = "$Id: getgrent_r.c,v 1.4 2001/05/28 08:38:25 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
if (ge == NULL) {
*result = NULL;
- return (-1);
+ return (0);
}
res = copy_group(ge, gptr, buf, buflen);
if (ge == NULL) {
*result = NULL;
- return (-1);
+ return (0);
}
res = copy_group(ge, gptr, buf, buflen);
if (len > buflen) {
errno = ERANGE;
- return (-1);
+ return (ERANGE);
}
/* copy group id */
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: getpwent_r.c,v 1.2 2001/04/09 04:53:22 marka Exp $";
+static const char rcsid[] = "$Id: getpwent_r.c,v 1.3 2001/05/28 08:38:26 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <port_before.h>
if (pw == NULL) {
*result = NULL;
- return (-1);
+ return (0);
}
res = copy_passwd(pw, pwptr, buf, buflen);
if (pw == NULL) {
*result = NULL;
- return (-1);
+ return (0);
}
res = copy_passwd(pw, pwptr, buf, buflen);
if (len > buflen) {
errno = ERANGE;
- return (-1);
+ return (ERANGE);
}
/* copy fixed atomic values*/
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: logging.c,v 1.1 2001/03/29 06:31:55 marka Exp $";
+static const char rcsid[] = "$Id: logging.c,v 1.2 2001/05/28 08:38:28 marka Exp $";
#endif /* not lint */
#include "port_before.h"
return (0);
}
+void
+log_close_debug_channels(log_context lc) {
+ log_channel_list lcl;
+ int i;
+
+ for (i = 0; i < lc->num_categories; i++)
+ for (lcl = lc->categories[i]; lcl != NULL; lcl = lcl->next)
+ if (lcl->channel->type == log_file &&
+ lcl->channel->out.file.stream != NULL &&
+ lcl->channel->flags & LOG_REQUIRE_DEBUG)
+ (void)log_close_stream(lcl->channel);
+}
+
FILE *
log_get_stream(log_channel chan) {
if (chan == NULL || chan->type != log_file) {
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: memcluster.c,v 1.1 2001/03/29 06:31:55 marka Exp $";
+static const char rcsid[] = "$Id: memcluster.c,v 1.2 2001/05/28 08:38:29 marka Exp $";
#endif /* not lint */
#include "port_before.h"
size_t new_size = quantize(size);
#if defined (DEBUGGING_MEMCLUSTER)
memcluster_element *e;
+ memcluster_element *el;
#ifdef MEMCLUSTER_RECORD
- memcluster_element *prev, *el;
+ memcluster_element *prev;
#endif
int fp;
char *p;
#endif
}
+int
+memactive(void) {
+ size_t i;
+
+ if (stats == NULL)
+ return (0);
+ for (i = 1; i <= max_size; i++)
+ if (stats[i].gets != 0)
+ return (1);
+ return (0);
+}
+
/* Private. */
/*
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_print.c,v 1.1 2001/03/29 06:31:57 marka Exp $";
+static const char rcsid[] = "$Id: ns_print.c,v 1.2 2001/05/28 08:38:30 marka Exp $";
#endif
/* Import. */
break;
case ns_t_nsap: {
- char t[255*3];
+ char t[2+255*3];
(void) inet_nsap_ntoa(rdlen, rdata, t);
T(addstr(t, strlen(t), &buf, &buflen));
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.5 2001/05/28 06:36:15 marka Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.6 2001/05/28 08:38:32 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
continue;
}
}
- if (nserv > 1)
+
+ if (nserv > 1)
statp->nscount = nserv;
#ifdef RESOLVSORT
statp->nsort = nsort;