Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 9620 → Rev 9766

/programs/develop/ktcc/trunk/libc.obj/samples/whois.c
4,14 → 4,14
https://www.binarytides.com/whois-client-code-in-c-with-linux-sockets/
*/
 
#include "sys/ksys.h"
#include <clayer/network.h>
#include <conio.h>
#include <errno.h>
#include "sys/ksys.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <clayer/network.h>
#include <conio.h>
 
FILE *out=stdout;
 
38,7 → 38,6
char *str_replace(char *search , char *replace , char *subject );
char* str_copy(char*);
 
 
int main(int argc , char *argv[])
{
char *domain , *data = NULL;
231,7 → 230,8
int hostname_to_ip(char *hostname , char *ip)
{
struct addrinfo *addr_info;
char port_str[16]; sprintf(port_str, "%d", 80);
char port_str[16];
sprintf(port_str, "%d", 80);
struct addrinfo hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; // IPv4 or IPv6 doesnt matter