<commit_before>#include "PrintGLExt.h"
#include "utility.h"

#include <gl/glew.h>

namespace edb
{

std::string PrintGLExt::Command() const
{
	return "gl-ext";
}

std::string PrintGLExt::Description() const
{
	return "print opengl extension";
}

std::string PrintGLExt::Usage() const
{
	return Command();
}

int PrintGLExt::Run(int argc, char *argv[])
{
	int ret = init_gl();
	if (ret < 0) {
		return ret;
	}

	const char* extensions = (char*)glGetString(GL_EXTENSIONS);
	printf("%s\n", extensions);

	return 0;
}

}<commit_msg>[FIXED] glGetString(GL_EXTENSIONS) returns NULL, GL_EXTENSIONS is deprecated as an argument to glGetString in GL3.0<commit_after>#include "PrintGLExt.h"
#include "utility.h"

#include <gl/glew.h>

namespace edb
{

std::string PrintGLExt::Command() const
{
	return "gl-ext";
}

std::string PrintGLExt::Description() const
{
	return "print opengl extension";
}

std::string PrintGLExt::Usage() const
{
	return Command();
}

int PrintGLExt::Run(int argc, char *argv[])
{
	int ret = init_gl();
	if (ret < 0) {
		return ret;
	}

	GLint n;
	glGetIntegerv(GL_NUM_EXTENSIONS, &n);
	for (GLint i = 0; i < n; ++i) {
		printf("%s\n", (const char*)(glGetStringi(GL_EXTENSIONS, i)));
	}

	return 0;
}

}
{'fraction_non_alphanumeric': 0.16420361247947454, 'fraction_numerical': 0.005747126436781609, 'mean_word_length': 5.004926108374384, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, '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': '4204531', 'n_tokens_mistral': 503, 'n_tokens_neox': 475, 'n_words': 114}