<commit_before>
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/tchar.h>
#include <winpr/environment.h>

int TestEnvironmentGetSetEB(int argc, char* argv[])
{
#ifndef _WIN32
	char test[1024];
	TCHAR* p;
	int length;
	LPTCH lpszEnvironmentBlock = "SHELL=123\0test=1\0test1=2\0DISPLAY=WINPR_TEST_VALUE\0\0";
	LPTCH lpszEnvironmentBlockNew = NULL;

	/* Get length of an variable */
	length = GetEnvironmentVariableEBA(lpszEnvironmentBlock,"DISPLAY", NULL, 0);
	if (0 == length)
		return -1;

	/* Get the variable itself */
	p = (LPSTR) malloc(length);
	if (!p)
		return -1;

	if (GetEnvironmentVariableEBA(lpszEnvironmentBlock,"DISPLAY", p, length) != length - 1)
		return -1;

	printf("GetEnvironmentVariableA(WINPR_TEST_VARIABLE) = %s\n" , p);

	if (strcmp(p, "WINPR_TEST_VALUE") != 0)
	{
		free(p);
		return -1;
	}

	free(p);

	/* Get length of an non-existing variable */
	length = GetEnvironmentVariableEBA(lpszEnvironmentBlock,"BLA", NULL, 0);
	if (0 != length)
	{
		printf("Unset variable returned\n");<commit_msg>Fixed sign-compare warnings<commit_after>
#include <stdio.h>
#include <winpr/crt.h>
#include <winpr/tchar.h>
#include <winpr/environment.h>

int TestEnvironmentGetSetEB(int argc, char* argv[])
{
#ifndef _WIN32
	char test[1024];
	TCHAR* p;
	DWORD length;
	LPTCH lpszEnvironmentBlock = "SHELL=123\0test=1\0test1=2\0DISPLAY=WINPR_TEST_VALUE\0\0";
	LPTCH lpszEnvironmentBlockNew = NULL;

	/* Get length of an variable */
	length = GetEnvironmentVariableEBA(lpszEnvironmentBlock,"DISPLAY", NULL, 0);
	if (0 == length)
		return -1;

	/* Get the variable itself */
	p = (LPSTR) malloc(length);
	if (!p)
		return -1;

	if (GetEnvironmentVariableEBA(lpszEnvironmentBlock,"DISPLAY", p, length) != length - 1)
		return -1;

	printf("GetEnvironmentVariableA(WINPR_TEST_VARIABLE) = %s\n" , p);

	if (strcmp(p, "WINPR_TEST_VALUE") != 0)
	{
		free(p);
		return -1;
	}

	free(p);

	/* Get length of an non-existing variable */
	length = GetEnvironmentVariableEBA(lpszEnvironmentBlock,"BLA", NULL, 0);
	if (0 != length)
	{
		printf("Unset variable returned\n");
{'fraction_non_alphanumeric': 0.14913127413127414, 'fraction_numerical': 0.026061776061776062, 'mean_word_length': 4.823033707865169, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2400995', 'n_tokens_mistral': 828, 'n_tokens_neox': 789, 'n_words': 177}