Smaller
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1879 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
25459dcb70
commit
53d954e00b
7 changed files with 160 additions and 259 deletions
|
@ -10,31 +10,6 @@
|
|||
|
||||
#include "util.h"
|
||||
|
||||
int JNL::open_socketlib()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
WSADATA wsaData;
|
||||
if (WSAStartup(MAKEWORD(1, 1), &wsaData)) return 1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
void JNL::close_socketlib()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
WSACleanup();
|
||||
#endif
|
||||
}
|
||||
unsigned long JNL::ipstr_to_addr(const char *cp)
|
||||
{
|
||||
return ::inet_addr(cp);
|
||||
}
|
||||
|
||||
void JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen)
|
||||
{
|
||||
struct in_addr a; a.s_addr=addr;
|
||||
char *p=::inet_ntoa(a); strncpy(host,p?p:"",maxhostlen);
|
||||
}
|
||||
|
||||
int my_atoi(char *s)
|
||||
{
|
||||
int sign=0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue