<?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/cccsvparser/wiki/Home/</link><description>Recent changes to Home</description><atom:link href="https://sourceforge.net/p/cccsvparser/wiki/Home/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 05 Jul 2020 15:54:55 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cccsvparser/wiki/Home/feed" rel="self" type="application/rss+xml"/><item><title>Discussion for Home page</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/?limit=25#e950</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.  I don't understand why my csv file is not being found.  I'm getting:&lt;br/&gt;
"Error opening CSV file for reading: datafile : No such file or directory"&lt;/p&gt;
&lt;p&gt;I print out "datafile" before it is used by CsvParser; see attached.  The XXX line prints out&lt;br/&gt;
"XXX AGT/GAMEEMO/S15/PreprocessedEEGData/csvformat/S15G3AllChannels.csv"&lt;/p&gt;
&lt;p&gt;I have checked the that the file can be found just fine:&lt;br/&gt;
% ls -l AGT/GAMEEMO/S15/PreprocessedEEGData/csvformat/S15G3AllChannels.csv&lt;br/&gt;
-rwx------ 1 lingber lir101 4311933 May 16 11:16 AGT/GAMEEMO/S15/PreprocessedEEGData/csvformat/S15G3AllChannels.csv&lt;/p&gt;
&lt;p&gt;I'm using your&lt;br/&gt;
"CsvParser/examples/usage_example_with_header.c"&lt;br/&gt;
for my use.  I have not modified csvparser.&lt;span&gt;[ch]&lt;/span&gt; .&lt;/p&gt;
&lt;p&gt;Thanks for the software, which I got from sourceforge.net .&lt;/p&gt;
&lt;p&gt;Lester&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lester Ingber</dc:creator><pubDate>Sun, 05 Jul 2020 15:54:55 -0000</pubDate><guid>https://sourceforge.net9e217374fdb13f4848900287ff9180d0d0a7c6d5</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v14
+++ v15
@@ -74,7 +74,7 @@

     csvParser - an instance of CsvParser
     */
-    CsvRow *CsvParser_getHeader(CsvParser *csvParser);
+    const CsvRow *CsvParser_getHeader(CsvParser *csvParser);

     /*
     Get number of fields in given row
@@ -82,7 +82,7 @@

     csvRow - an instance of CsvRow
     */
-    int CsvParser_getNumFields(CsvRow *csvRow);
+    int CsvParser_getNumFields(const CsvRow *csvRow);

     /*
     Get array of all fields in given row
@@ -90,7 +90,7 @@

     csvRow - an instance of CsvRow
     */
-    const char **CsvParser_getFields(CsvRow *csvRow);
+    const char **CsvParser_getFields(const CsvRow *csvRow);

     /*
     Get the error message, for the last occurred error
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Wed, 07 Dec 2016 09:40:12 -0000</pubDate><guid>https://sourceforge.net141eb1c02cd6b33c2b729409857022f7444a86ad</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v13
+++ v14
@@ -15,10 +15,9 @@
         int i =  0;
         //                                   file, delimiter, first_line_is_header?
         CsvParser *csvparser = CsvParser_new("Book1.csv", ",", 1);
-        CsvRow *header;
         CsvRow *row;
+        const CsvRow *header = CsvParser_getHeader(csvparser);

-        header = CsvParser_getHeader(csvparser);
         if (header == NULL) {
             printf("%s\n", CsvParser_getErrorMessage(csvparser));
             return 1;
@@ -27,7 +26,6 @@
         for (i = 0 ; i &amp;lt; CsvParser_getNumFields(header) ; i++) {
             printf("TITLE: %s\n", headerFields[i]);
         }
-        CsvParser_destroy_row(header);
         while ((row = CsvParser_getRow(csvparser)) ) {
             printf("NEW LINE:\n");
             const char **rowFields = CsvParser_getFields(row);
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Tue, 06 Dec 2016 14:05:59 -0000</pubDate><guid>https://sourceforge.netb8f1c940a65b0cbc23d9a4e66dfec6f722ec9bf9</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v12
+++ v13
@@ -23,14 +23,14 @@
             printf("%s\n", CsvParser_getErrorMessage(csvparser));
             return 1;
         }
-        char **headerFields = CsvParser_getFields(header);
+        const char **headerFields = CsvParser_getFields(header);
         for (i = 0 ; i &amp;lt; CsvParser_getNumFields(header) ; i++) {
             printf("TITLE: %s\n", headerFields[i]);
         }
         CsvParser_destroy_row(header);
         while ((row = CsvParser_getRow(csvparser)) ) {
             printf("NEW LINE:\n");
-            char **rowFields = CsvParser_getFields(row);
+            const char **rowFields = CsvParser_getFields(row);
             for (i = 0 ; i &amp;lt; CsvParser_getNumFields(row) ; i++) {
                 printf("FIELD: %s\n", rowFields[i]);
             }
@@ -92,7 +92,7 @@

     csvRow - an instance of CsvRow
     */
-    char **CsvParser_getFields(CsvRow *csvRow);
+    const char **CsvParser_getFields(CsvRow *csvRow);

     /*
     Get the error message, for the last occurred error
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sun, 27 Mar 2016 21:45:55 -0000</pubDate><guid>https://sourceforge.netaaa5558539f3eb8e519ff301873133d9a12e23ff</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v11
+++ v12
@@ -30,7 +30,6 @@
         CsvParser_destroy_row(header);
         while ((row = CsvParser_getRow(csvparser)) ) {
             printf("NEW LINE:\n");
-            printf("NEW ROW\n");
             char **rowFields = CsvParser_getFields(row);
             for (i = 0 ; i &amp;lt; CsvParser_getNumFields(row) ; i++) {
                 printf("FIELD: %s\n", rowFields[i]);
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Fri, 28 Nov 2014 10:43:58 -0000</pubDate><guid>https://sourceforge.net29bebdeddcea4ef4b46889af90cefa2524814d54</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -27,7 +27,9 @@
         for (i = 0 ; i &amp;lt; CsvParser_getNumFields(header) ; i++) {
             printf("TITLE: %s\n", headerFields[i]);
         }
+        CsvParser_destroy_row(header);
         while ((row = CsvParser_getRow(csvparser)) ) {
+            printf("NEW LINE:\n");
             printf("NEW ROW\n");
             char **rowFields = CsvParser_getFields(row);
             for (i = 0 ; i &amp;lt; CsvParser_getNumFields(row) ; i++) {
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Fri, 28 Nov 2014 10:43:24 -0000</pubDate><guid>https://sourceforge.net9f89eb82f76502fcd45dfa623789bd035fda7473</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v9
+++ v10
@@ -42,7 +42,7 @@
 ***API***

     /*
-    Create a new instance of CsvParser
+    Create a new instance of CsvParser, that parses a file
     Returns an instance of CsvParser

     filePath -  relative/absolute path to CSV file
@@ -52,7 +52,7 @@
     CsvParser *CsvParser_new(const char *filePath, const char *delimiter, int firstLineIsHeader);

     /*
-    Create a new instance of CsvParser
+    Create a new instance of CsvParser, that parses a given string
     Returns an instance of CsvParser

     csvString - String that contains CSV formatted text, to be parsed
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sun, 24 Aug 2014 15:39:08 -0000</pubDate><guid>https://sourceforge.net482f452ab3815647b415d6735bcec44a5855977f</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v8
+++ v9
@@ -51,52 +51,69 @@
     */
     CsvParser *CsvParser_new(const char *filePath, const char *delimiter, int firstLineIsHeader);

-    // Create a new instance of CsvParser
-    // Returns an instance of CsvParser
-    //
-    // csvString - String that contains CSV formatted text, to be parsed
-    // delimiter - pointer to a single char to be considered as delimiter. If NULL is passed, using default, which is a comma (,) char
-    // firstLineIsHeader - Use 0 for start reading rows from the first line. Use non-zero value for starting to read rows from the second line
+    /*
+    Create a new instance of CsvParser
+    Returns an instance of CsvParser
+    
+    csvString - String that contains CSV formatted text, to be parsed
+    delimiter - pointer to a single char to be considered as delimiter. If NULL is passed, using default, which is a comma (,) char
+    firstLineIsHeader - Use 0 for start reading rows from the first line. Use non-zero value for starting to read rows from the second line
+    */
     CsvParser *CsvParser_new_from_string(const char *csvString, const char *delimiter, int firstLineIsHeader);

-    // Get the next row from the CSV
-    // Returns an instance of CsvRow, or NULL in case of EOF or error
-    //
-    // csvParser - an instance of CsvParser
+    /*
+    Get the next row from the CSV
+    Returns an instance of CsvRow, or NULL in case of EOF or error
+    
+    csvParser - an instance of CsvParser
+    */
     CsvRow *CsvParser_getRow(CsvParser *csvParser);

-    // Get the first row of the file. Works only if CsvParser was initialized with firstLineIsHeader != 0
-    // Returns an instance of CsvRow, or NULL in case of EOF or error
-    //
-    // csvParser - an instance of CsvParser
+    /*
+    Get the first row of the file. Works only if CsvParser was initialized with firstLineIsHeader != 0
+    Returns an instance of CsvRow, or NULL in case of EOF or error
+    
+    csvParser - an instance of CsvParser
+    */
     CsvRow *CsvParser_getHeader(CsvParser *csvParser);

-    // Get number of fields in given row
-    // Returns an integer than indicates number of fields in the row
-    //
-    // csvRow - an instance of CsvRow
+    /*
+    Get number of fields in given row
+    Returns an integer than indicates number of fields in the row
+    
+    csvRow - an instance of CsvRow
+    */
     int CsvParser_getNumFields(CsvRow *csvRow);

-    // Get array of all fields in given row
-    // Returns an array of c-strings
-    //
-    // csvRow - an instance of CsvRow
+    /*
+    Get array of all fields in given row
+    Returns an array of c-strings
+    
+    csvRow - an instance of CsvRow
+    */
     char **CsvParser_getFields(CsvRow *csvRow);

-    // Get the error message, for the last occurred error
-    // Returns an c-string
-    //
-    // csvParser - an instance of CsvParser
+    /*
+    Get the error message, for the last occurred error
+    Returns an c-string
+    
+    csvParser - an instance of CsvParser
+    */
     const char* CsvParser_getErrorMessage(CsvParser *csvParser);

-    // Destroy and release memory of a CsvParser instance
-    //
-    // csvParser - an instance of CsvParser
+    /*
+    Destroy and release memory of a CsvParser instance
+    
+    csvParser - an instance of CsvParser
+    */
     void CsvParser_destroy(CsvParser *csvParser);

-    // Destroy and release memory of a CsvRow instance
-    //
-    // csvRow - an instance of CsvRow
+    /*
+    Destroy and release memory of a CsvRow instance
+    
+    csvRow - an instance of CsvRow
+    */
     void CsvParser_destroy_row(CsvRow *csvRow);
+

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sun, 24 Aug 2014 15:38:20 -0000</pubDate><guid>https://sourceforge.net9bc30292c6e7c5909d01cab85140adacb6706199</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -41,12 +41,14 @@

 ***API***

-    // Create a new instance of CsvParser
-    // Returns an instance of CsvParser
-    //
-    // filePath -  relative/absolute 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
-    // firstLineIsHeader - Use 0 for start reading rows from the first line. Use non-zero value for starting to read rows from the second line
+    /*
+    Create a new instance of CsvParser
+    Returns an instance of CsvParser
+    
+    filePath -  relative/absolute 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
+    firstLineIsHeader - Use 0 for start reading rows from the first line. Use non-zero value for starting to read rows from the second line
+    */
     CsvParser *CsvParser_new(const char *filePath, const char *delimiter, int firstLineIsHeader);

     // Create a new instance of CsvParser
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sun, 24 Aug 2014 15:36:00 -0000</pubDate><guid>https://sourceforge.net7afe45edb84900d7745f4a49c118b07277953c88</guid></item><item><title>Home modified by Tal H</title><link>https://sourceforge.net/p/cccsvparser/wiki/Home/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -49,6 +49,14 @@
     // firstLineIsHeader - Use 0 for start reading rows from the first line. Use non-zero value for starting to read rows from the second line
     CsvParser *CsvParser_new(const char *filePath, const char *delimiter, int firstLineIsHeader);

+    // Create a new instance of CsvParser
+    // Returns an instance of CsvParser
+    //
+    // csvString - String that contains CSV formatted text, to be parsed
+    // delimiter - pointer to a single char to be considered as delimiter. If NULL is passed, using default, which is a comma (,) char
+    // firstLineIsHeader - Use 0 for start reading rows from the first line. Use non-zero value for starting to read rows from the second line
+    CsvParser *CsvParser_new_from_string(const char *csvString, const char *delimiter, int firstLineIsHeader);
+
     // Get the next row from the CSV
     // Returns an instance of CsvRow, or NULL in case of EOF or error
     //
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tal H</dc:creator><pubDate>Sun, 24 Aug 2014 14:21:14 -0000</pubDate><guid>https://sourceforge.net392ec7821338fc7e230038f373df35f9eda4dd0d</guid></item></channel></rss>