Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    Please try to construct a minimal test case (see sscce.org). All the stuff to do with opendir, etc. is probably irrelevant to the problem, so you can probably remove it from your code snippet. Commented Aug 30, 2011 at 11:06
  • Note that it is not safe to use strsep on environment variables, since it modifies them. However this is not the source of your problems. Commented Aug 30, 2011 at 11:07
  • a properly indented source code helps a lot... what is this newEnvvariable ? Commented Aug 30, 2011 at 11:11
  • Why are you skipping the first array element? Commented Aug 30, 2011 at 11:15
  • Your code doesn't compile as newEnv, flag, and count are not defined. strsep()is not found either but this is maybe because I did not include the proper include file. Which one is it? Commented Aug 30, 2011 at 11:21