Search:

Type: Posts; User: Andy_PBC

Search: Search took 0.01 seconds.

  1. Yes, agree, very strange. It's the first time I...

    Yes, agree, very strange. It's the first time I ever checked for an error after using realpath(), and it was purely by accident; I was adding code to check for fopen() and fclose() for errors, then...
  2. @algorism: file says "/home/andy/temp/a: empty"....

    @algorism: file says "/home/andy/temp/a: empty".

    It's a zero-byte file created with touch.

    This is my current solution:


    char real_path[PATH_MAX];
    real_path[0] = '\0';
  3. realpath() resolves path, but errno is set to 2

    cur_file is an argument from the command line. I've used the absolute path for testing, though it works the same way if I gave it the basename (a) for an argument - the path still resolves to the...
  4. You set up two arrays, the first one is...

    You set up two arrays, the first one is unchanged. Search that, add each char to the second array, unless it's a comment (or /* or */). If it encounters the sequence */\n, don't add any of those...
  5. Replies
    13
    Views
    3,390

    If you need it in PDF format, maybe searching...

    If you need it in PDF format, maybe searching Google, or this site, for C tutorial will give you the info you're looking for. Digital format both ways.
  6. This suggestion is on page 34 of The C...

    This suggestion is on page 34 of The C Programming Language (ANSI C Version), 2nd Ed. by Brian W. Kernighan & Dennis M. Ritchie.



    I just did this last week, shortly after purchasing the book....
  7. Replies
    8
    Views
    8,125

    On some systems, "." might be included in the...

    On some systems, "." might be included in the path, "." being your present working directory.

    You can append it to your current search path by using


    export PATH=$PATH:.

    And insert it into...
Results 1 to 7 of 7