<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Home</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/cccsvwriter/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 17 Oct 2014 14:59:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cccsvwriter/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -17,6 +17,7 @@
         char *thirdLine[] = {"this line is crazy", "12345\"\"sdgdsag,adad\"\"\"\nabcdefg", "\","};
         char **data[] = {firstLine, secLine, thirdLine};

+                                             // If you like to output to STDOUT, use NULL as filename
         CsvWriter *csvWriter = CsvWriter_new("Book1.csv", ",", 0);
         int i, j;
         for (i = 0 ; i &amp;lt; 3 ; i++) {
@@ -43,7 +44,7 @@
     // Create a new instance of CsvWriter
     // Returns an instance of CsvWriter
     //
-    // filePath - path to CSV file
+    // filePath - path to CSV file - pass NULL to print the output to STDOUT
     // delimiter - pointer to a single char to be considered as delimiter. If NULL is passed, using default, which is a comma (,) char
     // append - If file is already existing, append to it, instead of overriding
     CsvWriter *CsvWriter_new(const char *filePath, const char *delimiter, int append);
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Fri, 17 Oct 2014 14:59:23 -0000</pubDate><guid>https://sourceforge.net6338d58012a772a7978398c8a66756e1a6951acd</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -36,3 +36,38 @@

 The result in Excel:
 ![](http://oi59.tinypic.com/2ic0ig0.jpg)
+
+
+***API***
+
+    // Create a new instance of CsvWriter
+    // Returns an instance of CsvWriter
+    //
+    // filePath - path to CSV file
+    // delimiter - pointer to a single char to be considered as delimiter. If NULL is passed, using default, which is a comma (,) char
+    // append - If file is already existing, append to it, instead of overriding
+    CsvWriter *CsvWriter_new(const char *filePath, const char *delimiter, int append);
+
+    // Add a field to the current row
+    // Returns 0 in case of success. Non-zero in case of failure
+    //
+    // csvWriter - an instance of CsvWriter
+    // field - a c-string that contains the text to be written
+    int CsvWriter_writeField(CsvWriter *csvWriter, char *field);
+
+    // Start a new CSV row (should not be called for the first row)
+    // Returns 0 in case of success. Non-zero in case of failure
+    //
+    // csvWriter - an instance of CsvWriter
+    int CsvWriter_nextRow(CsvWriter *csvWriter);
+
+    // Get the error message, for the last occurred error
+    // Returns an c-string
+    //
+    // csvWriter - an instance of CsvWriter
+    const char *CsvWriter_getErrorMessage(CsvWriter *csvWriter);
+
+    // Destroy and release memory of a CsvWriter instance
+    //
+    // csvWriter - an instance of CsvWriter
+    void CsvWriter_destroy(CsvWriter *csvWriter);
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 21:13:55 -0000</pubDate><guid>https://sourceforge.netf1f736825c436a17f0a9257d69e8df62819c8ff6</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -9,29 +9,30 @@

     #include &amp;lt;stdio.h&amp;gt;

-    #include "csvwriter.h"    
+    #include "csvwriter.h"

-    int main() {    
-        char *firstLine[] = {"this", "is the first line", "that ends here"};    
-        char *secLine[] = {"this field, contains a comma", "this field, \" contains a quote", "this field\ncontains a newline"};    
-        char *thirdLine[] = {"this line is crazy", "12345\"\"sdgdsag,adad\"\"\"\nabcdefg", "\","};    
-        char **data[] = {firstLine, secLine, thirdLine};    
-        CsvWriter *csvWriter = CsvWriter_new("Book1.csv", ",", 0);    
-    
-        int i, j;    
-        for (i = 0 ; i &amp;lt; 3 ; i++) {    
-            for (j = 0 ; j &amp;lt; 3 ; j++) {    
-                if (CsvWriter_writeField(csvWriter, data[i][j])) {    
-                    printf("Error: %s\n", CsvWriter_getErrorMessage(csvWriter));    
-                    return 1;    
-                }    
-            }    
-            CsvWriter_nextRow(csvWriter);    
-        }    
-        CsvWriter_destroy(csvWriter);    
-    
-        return 0;    
+    int main() {
+        char *firstLine[] = {"this", "is the first line", "that ends here"};
+        char *secLine[] = {"this field, contains a comma", "this field, \" contains a quote", "this field\ncontains a newline"};
+        char *thirdLine[] = {"this line is crazy", "12345\"\"sdgdsag,adad\"\"\"\nabcdefg", "\","};
+        char **data[] = {firstLine, secLine, thirdLine};
+
+        CsvWriter *csvWriter = CsvWriter_new("Book1.csv", ",", 0);
+        int i, j;
+        for (i = 0 ; i &amp;lt; 3 ; i++) {
+            for (j = 0 ; j &amp;lt; 3 ; j++) {
+                if (CsvWriter_writeField(csvWriter, data[i][j])) {
+                    printf("Error: %s\n", CsvWriter_getErrorMessage(csvWriter));
+                    return 1;
+                }
+            }
+            CsvWriter_nextRow(csvWriter);
+        }
+        CsvWriter_destroy(csvWriter);
+
+        return 0;
     }
+

 The result in Excel:
 ![](http://oi59.tinypic.com/2ic0ig0.jpg)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 15:07:08 -0000</pubDate><guid>https://sourceforge.net4250b2a9625247d8de682d1c8596ce6c0dffd195</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -33,4 +33,5 @@
         return 0;    
     }

-![the result in Excel:](http://oi59.tinypic.com/2ic0ig0.jpg)
+The result in Excel:
+![](http://oi59.tinypic.com/2ic0ig0.jpg)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 15:04:54 -0000</pubDate><guid>https://sourceforge.net05b4e84b06d0be84329fe9a640cde0a34e36014e</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -32,3 +32,5 @@

         return 0;    
     }
+
+![the result in Excel:](http://oi59.tinypic.com/2ic0ig0.jpg)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 15:03:42 -0000</pubDate><guid>https://sourceforge.netb552e1c5808aab24c59eb45d71497ca92ed0e270</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,4 +1,4 @@
-**C/C++ CSV Parser**
+**C/C++ CSV Writer**
 ***Introduction***
 This project was created in order to enable a CSV writing API for C programmers.
 The CSV format is commonly easy to parse/write, but there are special cases which are less-trivial, and that makes it recommended to use a standard tested writer
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 14:52:20 -0000</pubDate><guid>https://sourceforge.net8ecde0f82fff7d0ee7f773f3660ce3502983835b</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,8 +1,34 @@
-Welcome to your wiki!
+**C/C++ CSV Parser**
+***Introduction***
+This project was created in order to enable a CSV writing API for C programmers.
+The CSV format is commonly easy to parse/write, but there are special cases which are less-trivial, and that makes it recommended to use a standard tested writer

-This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: [SamplePage].
+***API &amp;amp; Usage Example***

-The wiki uses [Markdown](/p/cccsvwriter/wiki/markdown_syntax/) syntax.
+***Usage Example***

-[[members limit=20]]
-[[download_button]]
+    #include &amp;lt;stdio.h&amp;gt;
+    
+    #include "csvwriter.h"    
+    
+    int main() {    
+        char *firstLine[] = {"this", "is the first line", "that ends here"};    
+        char *secLine[] = {"this field, contains a comma", "this field, \" contains a quote", "this field\ncontains a newline"};    
+        char *thirdLine[] = {"this line is crazy", "12345\"\"sdgdsag,adad\"\"\"\nabcdefg", "\","};    
+        char **data[] = {firstLine, secLine, thirdLine};    
+        CsvWriter *csvWriter = CsvWriter_new("Book1.csv", ",", 0);    
+    
+        int i, j;    
+        for (i = 0 ; i &amp;lt; 3 ; i++) {    
+            for (j = 0 ; j &amp;lt; 3 ; j++) {    
+                if (CsvWriter_writeField(csvWriter, data[i][j])) {    
+                    printf("Error: %s\n", CsvWriter_getErrorMessage(csvWriter));    
+                    return 1;    
+                }    
+            }    
+            CsvWriter_nextRow(csvWriter);    
+        }    
+        CsvWriter_destroy(csvWriter);    
+    
+        return 0;    
+    }
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 14:51:41 -0000</pubDate><guid>https://sourceforge.neta81c1a6d88d5a78209ff6d16bbf60ce11d7a76f7</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvwriter/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Welcome to your wiki!&lt;/p&gt;
&lt;p&gt;This is the default page, edit it as you see fit. To add a new page simply reference it within brackets, e.g.: &lt;span&gt;[SamplePage]&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The wiki uses &lt;a class="" href="/p/cccsvwriter/wiki/markdown_syntax"&gt;Markdown&lt;/a&gt; syntax.&lt;/p&gt;
&lt;p&gt;&lt;h6&gt;Project Members:&lt;/h6&gt;
&lt;ul class="md-users-list"&gt;
&lt;li&gt;&lt;a href="/u/talh123"&gt;Tal H&lt;/a&gt; (admin)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;span class="download-button-53f8a47124b0d93aaa8882cb" style="margin-bottom: 1em; display: block;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sat, 23 Aug 2014 14:25:54 -0000</pubDate><guid>https://sourceforge.net7effc0eaabddb18e9d10411f2928c35a518392f0</guid></item></channel></rss>