<commit_before>#include <stdio.h>

#include <pacutils.h>

/*********************************************
 * Displays installed package info ala pacman -Qi
 *********************************************/

int main(int argc, char **argv) {
	struct pu_config_t *config = pu_config_new_from_file("/etc/pacman.conf");
	alpm_handle_t *handle = pu_initialize_handle_from_config(config);

	for(++argv; *argv; ++argv) {
		alpm_pkg_t *pkg = pu_find_pkgspec(handle, *argv);
		if(!pkg) {
			fprintf(stderr, "Unable to load package '%s'\n", *argv);
			continue;
		}

		printf("Name:					%s\n", alpm_pkg_get_name(pkg));
		printf("Version:			%s\n", alpm_pkg_get_version(pkg));
		printf("Description:	%s\n", alpm_pkg_get_desc(pkg));
		printf("Architecture: %s\n", alpm_pkg_get_arch(pkg));
		printf("URL:					%s\n", alpm_pkg_get_url(pkg));
		printf("Packager:			%s\n", alpm_pkg_get_packager(pkg));

		if(*(argv+1)) {
			putchar('\n');
		}
	}

	/* cleanup */
	alpm_release(handle);
	pu_config_free(config);

	return 0;
}

/* vim: set ts=2 sw=2 noet: */<commit_msg>pacinfo: convert tabs in output to spaces<commit_after>#include <stdio.h>

#include <pacutils.h>

/*********************************************
 * Displays installed package info ala pacman -Qi
 *********************************************/

int main(int argc, char **argv) {
	struct pu_config_t *config = pu_config_new_from_file("/etc/pacman.conf");
	alpm_handle_t *handle = pu_initialize_handle_from_config(config);

	for(++argv; *argv; ++argv) {
		alpm_pkg_t *pkg = pu_find_pkgspec(handle, *argv);
		if(!pkg) {
			fprintf(stderr, "Unable to load package '%s'\n", *argv);
			continue;
		}

		printf("Name:         %s\n", alpm_pkg_get_name(pkg));
		printf("Version:      %s\n", alpm_pkg_get_version(pkg));
		printf("Description:  %s\n", alpm_pkg_get_desc(pkg));
		printf("Architecture: %s\n", alpm_pkg_get_arch(pkg));
		printf("URL:          %s\n", alpm_pkg_get_url(pkg));
		printf("Packager:     %s\n", alpm_pkg_get_packager(pkg));

		if(*(argv+1)) {
			putchar('\n');
		}
	}

	/* cleanup */
	alpm_release(handle);
	pu_config_free(config);

	return 0;
}

/* vim: set ts=2 sw=2 noet: */
{'fraction_non_alphanumeric': 0.2459016393442623, 'fraction_numerical': 0.003747072599531616, 'mean_word_length': 4.966480446927374, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '305689', 'n_tokens_mistral': 875, 'n_tokens_neox': 806, 'n_words': 144}