Glob function (c) and backup file (file~)

Posted by arnoras on Stack Overflow See other posts from Stack Overflow or by arnoras
Published on 2010-04-16T20:02:01Z Indexed on 2010/04/16 20:53 UTC
Read the original article Hit count: 293

Filed under:
|

I'm using glob function for a autocompletion function. I'm showing you the problem because it's difficult to explain:

matched = ~/.tcsh
glob(matched, 0, NULL, &pglob);

glob put all matched files in a char ** and when I print it I have:

case[0] = .tcshrc
case[1] = 

I should have .tcshrc~ in case[1], but nothing =S, I've seen a flag "GLOB_TILDE" like this "

 glob(matched, GLOB_TILDE, NULL, &pglob);

But it doesn't change anything! Can someone help me?

© Stack Overflow or respective owner

Related posts about c

    Related posts about glob