"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "regress/hcommon.c.m4" between
adns-1.5.0.tar.gz and adns-1.5.1.tar.gz

About: adns is an advanced, easy to use, asynchronous-capable DNS client library for C (and C++) programs and a collection of DNS resolver utilities.

hcommon.c.m4  (adns-1.5.0):hcommon.c.m4  (adns-1.5.1)
m4_dnl hcommon.c m4_dnl hcommon.c
m4_dnl (part of complex test harness, not of the library) m4_dnl (part of complex test harness, not of the library)
m4_dnl - routines used for both record and playback m4_dnl - routines used for both record and playback
m4_dnl This file is part of adns, which is m4_dnl This file is part of adns, which is
m4_dnl Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson m4_dnl Copyright (C) 1997-2000,2003,2006,2014-2016 Ian Jackson
m4_dnl Copyright (C) 2014 Mark Wooding m4_dnl Copyright (C) 2014 Mark Wooding
m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch m4_dnl Copyright (C) 1999-2000,2003,2006 Tony Finch
m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology m4_dnl Copyright (C) 1991 Massachusetts Institute of Technology
m4_dnl (See the file INSTALL for full details.) m4_dnl (See the file INSTALL for full details.)
m4_dnl m4_dnl
m4_dnl This program is free software; you can redistribute it and/or modify m4_dnl This program is free software; you can redistribute it and/or modify
m4_dnl it under the terms of the GNU General Public License as published by m4_dnl it under the terms of the GNU General Public License as published by
m4_dnl the Free Software Foundation; either version 3, or (at your option) m4_dnl the Free Software Foundation; either version 3, or (at your option)
m4_dnl any later version. m4_dnl any later version.
m4_dnl m4_dnl
skipping to change at line 163 skipping to change at line 163
else if (!(i&3)) Tvba(" "); else if (!(i&3)) Tvba(" ");
Tvbf("%02x",*bp); Tvbf("%02x",*bp);
} }
Tvba("."); Tvba(".");
} }
void Tvbfdset(int max, const fd_set *fds) { void Tvbfdset(int max, const fd_set *fds) {
int i; int i;
const char *comma= ""; const char *comma= "";
if (!fds) {
Tvba("null");
return;
}
Tvba("["); Tvba("[");
for (i=0; i<max; i++) { for (i=0; i<max; i++) {
if (!FD_ISSET(i,fds)) continue; if (!FD_ISSET(i,fds)) continue;
Tvba(comma); Tvba(comma);
Tvbf("%d",i); Tvbf("%d",i);
comma= ","; comma= ",";
} }
Tvba("]"); Tvba("]");
} }
skipping to change at line 303 skipping to change at line 308
free(oldnode); free(oldnode);
} }
void *Hrealloc(void *op, size_t nsz) { void *Hrealloc(void *op, size_t nsz) {
struct malloced *oldnode; struct malloced *oldnode;
void *np; void *np;
size_t osz; size_t osz;
if (op) { oldnode= (void*)((char*)op - MALLOCHSZ); osz= oldnode->sz; } else { osz= 0; } if (op) { oldnode= (void*)((char*)op - MALLOCHSZ); osz= oldnode->sz; } else { osz= 0; }
np= Hmalloc(nsz); np= Hmalloc(nsz);
memcpy(np,op, osz>nsz ? nsz : osz); if (osz) memcpy(np,op, osz>nsz ? nsz : osz);
Hfree(op); Hfree(op);
return np; return np;
} }
void Hexit(int rv) { void Texit(int rv) {
struct malloced *loopnode; struct malloced *loopnode;
Tshutdown(); Tshutdown();
adns__vbuf_free(&vb); adns__vbuf_free(&vb);
adns__vbuf_free(&vbw); adns__vbuf_free(&vbw);
if (mallocedlist.head) { if (mallocedlist.head) {
fprintf(stderr,"adns test harness: memory leaked:"); fprintf(stderr,"adns test harness: memory leaked:");
for (loopnode=mallocedlist.head; loopnode; loopnode=loopnode->next) for (loopnode=mallocedlist.head; loopnode; loopnode=loopnode->next)
fprintf(stderr," %lu",loopnode->count); fprintf(stderr," %lu",loopnode->count);
putc('\n',stderr); putc('\n',stderr);
if (ferror(stderr)) exit(-1); if (ferror(stderr)) exit(-1);
} }
exit(rv); exit(rv);
} }
void Hexit(int rv) {
vb.used= 0;
Tvbf("exit %d", rv);
Q_vb();
Texit(0);
}
pid_t Hgetpid(void) { pid_t Hgetpid(void) {
return 2264; /* just some number */ return 2264; /* just some number */
} }
 End of changes. 5 change blocks. 
3 lines changed or deleted 15 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS