Subversion Repositories Kolibri OS

Rev

Rev 8746 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8746 Rev 9658
Line 3... Line 3...
3
The main code is taken from the site:
3
The main code is taken from the site:
4
https://www.binarytides.com/whois-client-code-in-c-with-linux-sockets/
4
https://www.binarytides.com/whois-client-code-in-c-with-linux-sockets/
5
*/
5
*/
Line 6... Line 6...
6
 
6
 
7
#include 
-
 
8
int errno;
-
 
9
 
7
#include 
10
#include 
8
#include 
11
#include 
9
#include 
12
#include 	
10
#include 	
13
#include 	
11
#include 	
Line 39... Line 37...
39
char* str_copy(char*);
37
char* str_copy(char*);
Line 40... Line 38...
40
 
38
 
41
 
39
 
42
int main(int argc , char *argv[])
-
 
43
{	
40
int main(int argc , char *argv[])
44
	networklib_init();
41
{	
Line 45... Line 42...
45
	char *domain , *data = NULL;
42
	char *domain , *data = NULL;
46
	int f_flag=0;
43
	int f_flag=0;
Line 58... Line 55...
58
	}else{
55
	}else{
59
		show_help();
56
		show_help();
60
		exit(0);
57
		exit(0);
61
	}
58
	}
62
	if(out==stdout){
59
	if(out==stdout){
63
		con_init_opt(-1,-1,-1,-1, "Whois");
60
		(*con_init_opt)(-1,-1,-1,-1, "Whois");
64
	}
61
	}
65
	get_whois_data(domain , &data);
62
	get_whois_data(domain , &data);
66
	exit(0);
63
	exit(0);
67
}
64
}