"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "miscutil.c" between
leafnode-1.11.12.tar.bz2 and leafnode-1.12.0.tar.xz

About: Leafnode is a store & forward NNTP proxy for small (dialup) sites.

miscutil.c  (leafnode-1.11.12.tar.bz2):miscutil.c  (leafnode-1.12.0.tar.xz)
skipping to change at line 16 skipping to change at line 16
22646949. 22646949.
Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de> Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>
and Randolf Skerka <Randolf.Skerka@gmx.de>. and Randolf Skerka <Randolf.Skerka@gmx.de>.
Copyright of the modifications 1997. Copyright of the modifications 1997.
Modified by Kent Robotti <robotti@erols.com>. Copyright of the Modified by Kent Robotti <robotti@erols.com>. Copyright of the
modifications 1998. modifications 1998.
Modified by Markus Enzenberger <enz@cip.physik.uni-muenchen.de>. Modified by Markus Enzenberger <enz@cip.physik.uni-muenchen.de>.
Copyright of the modifications 1998. Copyright of the modifications 1998.
Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>. Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>.
Copyright of the modifications 1998, 1999. Copyright of the modifications 1998, 1999.
Modified by Matthias Andree <matthias.andree@gmx.de>.
Copyright of the modifications 1999 - 2002.
Modified and copyright of the modifications 2002 by Ralf Wildenhues Modified and copyright of the modifications 2002 by Ralf Wildenhues
<ralf.wildenhues@gmx.de>. <ralf.wildenhues@gmx.de>.
Modified by Matthias Andree <matthias.andree@gmx.de>.
Copyright of the modifications 1999 - 2021.
See file COPYING for restrictions on the use of this software. See file COPYING for restrictions on the use of this software.
*/ */
#include "leafnode.h" #include "leafnode.h"
#include "validatefqdn.h" #include "validatefqdn.h"
#include "strlcpy.h" #include "strlcpy.h"
#include "mastring.h" #include "mastring.h"
#include "ln_log.h" #include "ln_log.h"
skipping to change at line 581 skipping to change at line 581
/* /*
* find a string in a stringlist * find a string in a stringlist
* return pointer to string if found, NULL otherwise * return pointer to string if found, NULL otherwise
*/ */
char * char *
findinlist(struct stringlist *haystack, char *needle) findinlist(struct stringlist *haystack, char *needle)
{ {
struct stringlist *a; struct stringlist *a;
a = haystack; a = haystack;
while (a && a->string) { while (a && *a->string) {
if (strncmp(needle, a->string, strlen(needle)) == 0) if (strncmp(needle, a->string, strlen(needle)) == 0)
return a->string; return a->string;
a = a->next; a = a->next;
} }
return NULL; return NULL;
} }
/* /*
* find a string in a stringlist * find a string in a stringlist
* return pointer to string if found, NULL otherwise * return pointer to string if found, NULL otherwise
*/ */
struct stringlist ** struct stringlist **
lfindinlist(struct stringlist **haystack, char *needle, size_t len) lfindinlist(struct stringlist **haystack, char *needle, size_t len)
{ {
struct stringlist **a; struct stringlist **a;
a = haystack; a = haystack;
while (a && *a && (*a)->string) { while (a && *a && *(*a)->string) {
if (strncmp(needle, (*a)->string, len) == 0) if (strncmp(needle, (*a)->string, len) == 0)
return a; return a;
a = &(*a)->next; a = &(*a)->next;
} }
return NULL; return NULL;
} }
void replaceinlist(struct stringlist **haystack, char *needle, size_t len) void replaceinlist(struct stringlist **haystack, char *needle, size_t len)
{ {
struct stringlist **f = lfindinlist(haystack, needle, len); struct stringlist **f = lfindinlist(haystack, needle, len);
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)