-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-#include <stdio.h>\r
-#include <string.h>\r
-#include "fastlz_write.h"\r
-\r
-#define SIZE 500000\r
-\r
-int main(int argn, char** args) {\r
-\r
- /*FILE* handle = fopen("d:/testi.flz", "rb");\r
- int i;\r
-\r
- printf("A\n");\r
-\r
- initRead(handle);\r
- printf("B\n");\r
- char* array = (char*)malloc(SIZE);\r
-\r
- read(array, 0, SIZE);\r
- printf("C\n");\r
- deinitRead();\r
- printf("D\n");\r
- \r
- printf("Hello:\n");\r
- for(i=0;i<SIZE;++i)\r
- printf("%c", array[i]);\r
-\r
- free(array);\r
- fclose(handle);*/\r
-\r
- FILE* handle = fopen("testi.flz", "wb");\r
-\r
- char temp[10];\r
- int i;\r
-\r
- initWrite(handle);\r
- for(i=0;i<100000;++i) {\r
- sprintf(temp, "%d\n", i);\r
- write(temp, 0, strlen(temp));\r
- }\r
- deinitWrite();\r
-\r
- fclose(handle);\r
- \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+#include <stdio.h>
+#include <string.h>
+#include "fastlz_write.h"
+
+#define SIZE 500000
+
+int main(int argn, char** args) {
+
+ /*FILE* handle = fopen("d:/testi.flz", "rb");
+ int i;
+
+ printf("A\n");
+
+ initRead(handle);
+ printf("B\n");
+ char* array = (char*)malloc(SIZE);
+
+ read(array, 0, SIZE);
+ printf("C\n");
+ deinitRead();
+ printf("D\n");
+
+ printf("Hello:\n");
+ for(i=0;i<SIZE;++i)
+ printf("%c", array[i]);
+
+ free(array);
+ fclose(handle);*/
+
+ FILE* handle = fopen("testi.flz", "wb");
+
+ char temp[10];
+ int i;
+
+ initWrite(handle);
+ for(i=0;i<100000;++i) {
+ sprintf(temp, "%d\n", i);
+ write(temp, 0, strlen(temp));
+ }
+ deinitWrite();
+
+ fclose(handle);
+
+}