Search:

Type: Posts; User: Nominal Animal

Search: Search took 0.02 seconds.

  1. Replies
    18
    Views
    2,375

    Oh. Forgot to mention. The csv_field() function...

    Oh. Forgot to mention. The csv_field() function above handles even embedded NUL bytes correctly. (You could easily amend the function to replace them with another value, or skip them altogether.)
    ...
  2. Replies
    18
    Views
    2,375

    I'm personally way too paranoid for that :) ...

    I'm personally way too paranoid for that :)

    Hm. I fully concur.

    And, you have an even stronger point that I do. Most of the readers of this thread are newbies, especially if they're having...
  3. Replies
    18
    Views
    2,375

    Assuming there are no bugs lurking in it, it...

    Assuming there are no bugs lurking in it, it does. For example, given input


    First, Second, Third
    """Bah,"" she said.", pretty"robust, "multiple
    lines
    are not a problem"
    foo" bar "baz

    the...
  4. Replies
    18
    Views
    2,375

    I understand your point, and agree with your...

    I understand your point, and agree with your reasoning.

    I just don't think you are considering the full picture here.

    First, it was just a coincidence that the three cases happened to coalesce...
  5. Replies
    18
    Views
    2,375

    Since reading CSV in C seems to be such a...

    Since reading CSV in C seems to be such a frequent question, I thought I'd post a simple and robust implementation:


    #include <stdlib.h>
    #include <string.h>
    #include <stdio.h>
    #include...
  6. Replies
    18
    Views
    2,375

    Right; fixed. It's defined in POSIX.1-2008...

    Right; fixed. It's defined in POSIX.1-2008 instead.
  7. Replies
    18
    Views
    2,375

    Or, if you have a C library that supports...

    Or, if you have a C library that supports POSIX.1-2008, use getline():


    #define _POSIX_C_SOURCE 200809L
    #include <stdio.h>

    int scan(FILE *const input, const char *const substring[], const...
Results 1 to 7 of 7