<commit_before>#include "ExportGML.h"
#include "Point.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define FILENAME "/simplified.txt"

void exportGML_exportGML(struct PointArrayList *pointArrayList, char directoryName[]) {
	FILE * fp;

	char *newFileName;
	strcat(newFileName, directoryName);
	strcat(newFileName, FILENAME);
	fp = fopen(newFileName, "w");
	if (!fp) {
		exit(1);
	}
	int i;
	int j;
	i = 1;
	
	struct PointArrayList *listIterator;
	listIterator = pointArrayList;
	while(listIterator->next != 0) {
		fprintf(fp, "%d:<gml:LineString srsName=\"EPSG:54004\" xmlns:gml=\"http://www.opengis.net/gml\"><gml:coordinates decimal=\".\" cs=\",\" ts=\" \">", i++);
		for (j = 0; j < listIterator->numPoints; j++) {
			fprintf(fp, "%lf,%lf ", listIterator->points[j].x, listIterator->points[j].y);
			printf("%lf,%lf\n ", listIterator->points[j].x, listIterator->points[j].y);
		}
		fprintf(fp, "</gml:coordinates></gml:LineString>\n");
		listIterator = listIterator->next;
	}
	fclose(fp);
}<commit_msg>There's a bug where the last arc isn't simplified...<commit_after>#include "ExportGML.h"
#include "Point.h"
#include "PointArrayList.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#define FILENAME "/simplified.txt"

void exportGML_exportGML(struct PointArrayList *pointArrayList, char directoryName[]) {
	FILE * fp;

	char *newFileName;
	strcat(newFileName, directoryName);
	strcat(newFileName, FILENAME);
	fp = fopen(newFileName, "w");
	if (!fp) {
		exit(1);
	}
	int i;
	int j;
	i = 1;
	
	struct PointArrayList *listIterator;
	listIterator = pointArrayList;
	while (listIterator) {
		fprintf(fp, "%d:<gml:LineString srsName=\"EPSG:54004\" xmlns:gml=\"http://www.opengis.net/gml\"><gml:coordinates decimal=\".\" cs=\",\" ts=\" \">", i++);
		for (j = 0; j < listIterator->numPoints; j++) {
			fprintf(fp, "%lf,%lf ", listIterator->points[j].x, listIterator->points[j].y);
			printf("%lf,%lf\n ", listIterator->points[j].x, listIterator->points[j].y);
		}
		fprintf(fp, "</gml:coordinates></gml:LineString>\n");
		listIterator = listIterator->next;
	}
	fclose(fp);
}
{'fraction_non_alphanumeric': 0.19923918212077985, 'fraction_numerical': 0.008083689966714217, 'mean_word_length': 5.098550724637681, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '1149888', 'n_tokens_mistral': 847, 'n_tokens_neox': 783, 'n_words': 154}