projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
-fix no-dot-in-path issue on FreeBSD bot
[oweals/gnunet.git]
/
src
/
gns
/
w32nsp-resolve.c
diff --git
a/src/gns/w32nsp-resolve.c
b/src/gns/w32nsp-resolve.c
index 4a116f5948d496aa90f76a77b89bf1892fa82741..3234a1ee5228962b753327cdac1034df62e97120 100644
(file)
--- a/
src/gns/w32nsp-resolve.c
+++ b/
src/gns/w32nsp-resolve.c
@@
-57,7
+57,8
@@
DEFINE_GUID(SVCID_INET_HOSTADDRBYNAME, 0x0002a803, 0x0000, 0x0000, 0xc0, 0x00, 0
// to convert structures returned as BLOBs.
//
// to convert structures returned as BLOBs.
//
-VOID FixList(PCHAR ** List, PCHAR Base)
+VOID
+FixList(PCHAR ** List, PCHAR Base)
{
if(*List)
{
{
if(*List)
{
@@
-77,7
+78,8
@@
VOID FixList(PCHAR ** List, PCHAR Base)
// Routine to convert a hostent returned in a BLOB to one with
// usable pointers. The structure is converted in-place.
//
// Routine to convert a hostent returned in a BLOB to one with
// usable pointers. The structure is converted in-place.
//
-VOID UnpackHostEnt(struct hostent * hostent)
+VOID
+UnpackHostEnt(struct hostent * hostent)
{
PCHAR pch;
{
PCHAR pch;
@@
-91,13
+93,15
@@
VOID UnpackHostEnt(struct hostent * hostent)
FixList(&hostent->h_addr_list, pch);
}
FixList(&hostent->h_addr_list, pch);
}
-void
+
+static void
print_hostent (struct hostent *he)
{
int i;
char **pAlias;
print_hostent (struct hostent *he)
{
int i;
char **pAlias;
+
printf("\tOfficial name: %s\n", he->h_name);
printf("\tOfficial name: %s\n", he->h_name);
- for (pAlias = he->h_aliases; *pAlias != 0; pAlias++) {
+ for (
i=0,
pAlias = he->h_aliases; *pAlias != 0; pAlias++) {
printf("\tAlternate name #%d: %s\n", ++i, *pAlias);
}
printf("\tAddress type: ");
printf("\tAlternate name #%d: %s\n", ++i, *pAlias);
}
printf("\tAddress type: ");
@@
-150,6
+154,7
@@
print_hostent (struct hostent *he)
}
}
}
}
+
int
main (int argc, char **argv)
{
int
main (int argc, char **argv)
{