66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
# define HOSTS_PATH @"AmiTCP:db/hosts"
# define RESOLV_CONF_PATH @"AmiTCP:db/resolv.conf"
#else
# define HOSTS_PATH @"/etc/hosts"
# define RESOLV_CONF_PATH @"/etc/resolv.conf"
#endif
static OFString *
domainFromHostname(OFString *hostname)
{
if (hostname == nil)
return nil;
@try {
|
>
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# define HOSTS_PATH @"AmiTCP:db/hosts"
# define RESOLV_CONF_PATH @"AmiTCP:db/resolv.conf"
#else
# define HOSTS_PATH @"/etc/hosts"
# define RESOLV_CONF_PATH @"/etc/resolv.conf"
#endif
#ifndef OF_WII
static OFString *
domainFromHostname(OFString *hostname)
{
if (hostname == nil)
return nil;
@try {
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
if (pos == OF_NOT_FOUND)
return nil;
return [hostname substringFromIndex: pos + 1];
}
}
#if !defined(OF_WII) && !defined(OF_MORPHOS)
static OFString *
obtainHostname(void)
{
char hostname[256];
|
>
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
if (pos == OF_NOT_FOUND)
return nil;
return [hostname substringFromIndex: pos + 1];
}
}
#endif
#if !defined(OF_WII) && !defined(OF_MORPHOS)
static OFString *
obtainHostname(void)
{
char hostname[256];
|