<commit_before>#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv)
{
	if(argc < 2) 
	{
		fprintf(stderr, "%s\n", "No hostname specified!");
		return EXIT_FAILURE;
	}

	return EXIT_SUCCESS;      // Declared in <stdlib.h>
}
<commit_msg>Parametrized - can be used as dns_lookup "seznam.cz"<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <string.h>    // strcpy
#include <netdb.h>     // gethostbyname
#include <arpa/inet.h>

int main(int argc, char** argv)
{
	if(argc < 2) 
	{
		fprintf(stderr, "%s\n", "No hostname specified!");
		return EXIT_FAILURE;
	}

	// First argument is hostname to look for
	const char* arg_host = argv[1];

	struct hostent *h = gethostbyname(arg_host);
	if(0 == h)
	{
		fprintf(stderr, "Unable to resolve host '%s'\n", arg_host);
		return EXIT_FAILURE;
	}

	struct in_addr **addr_list = (struct in_addr **) h->h_addr_list;
     
    char ip[INET6_ADDRSTRLEN + 1];
    ip[INET6_ADDRSTRLEN] = '\0';

    for(int i = 0; addr_list[i] != NULL; i++) 
    {
        //Return the first one;
        strcpy(ip, inet_ntoa(*addr_list[i]));
        fprintf(stdout, "%s\n", ip);
        return 0;
    }

	return EXIT_SUCCESS;      // Declared in <stdlib.h>
}

{'fraction_non_alphanumeric': 0.15863787375415284, 'fraction_numerical': 0.008305647840531562, 'mean_word_length': 3.1986062717770034, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3268331', 'n_tokens_mistral': 491, 'n_tokens_neox': 479, 'n_words': 114}