Search:

Type: Posts; User: marshaul

Search: Search took 0.00 seconds.

  1. OK well this probably doesn't surprise most of...

    OK well this probably doesn't surprise most of you, but I appended a null character at the end of the string after using strncpy, and now everything works as expected.

    I just want to say that I...
  2. The thing is, the one time I'm actually using the...

    The thing is, the one time I'm actually using the "n" functionality is with the first strncpy, which only copies up to the beginning of the basename.

    All the strncats can be replaced with strcat,...
  3. Edit: next page...

    Edit: next page...
  4. Got it... So does strcat, I take it, append...

    Got it...

    So does strcat, I take it, append the null character at the end, when strncat does not?

    Thanks.
  5. Should I do that manually? If so, should I do so...

    Should I do that manually? If so, should I do so before both the mkdir and the rename commands, both of which use dest (with different values) as arguments?



    Thanks for the tip, I will probably...
  6. Well, adding the +1 to the other dest didn't...

    Well, adding the +1 to the other dest didn't help, nor did changing the +1s to +2. :P

    The final strncat does begin with a /, as my "baseName" starts with the final slash in the given path (unlike...
  7. Here is a sample output (stdout) of the current...

    Here is a sample output (stdout) of the current build (with the first of two printf statements in that if-statement commented out):



    /tmp/test
    /tmp/test&
    /tmp/test&
    /tmp/test&
    /tmp/test&...
  8. Here is the rest of the code in case anybody...

    Here is the rest of the code in case anybody wants to compile it to see what I'm talking about:


    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <glob.h>
    #include...
  9. Superfluous characters after string -- pointer issues?

    I hope this isn't the wrong forum! I'm aware that I'm using some non-ANSI-C functions, but my problem seems to be with simple C strings and pointers, so I'm posting it here.

    I wrote a simple...
Results 1 to 9 of 9