• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Escaping white space in an NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Escaping white space in an NSString


  • Subject: Re: Escaping white space in an NSString
  • From: Andrew Farmer <email@hidden>
  • Date: Wed, 20 May 2009 23:53:01 -0700

On 20 May 09, at 23:26, Bruce Johnson wrote:
char  mdfile[PATHSIZE];
strncpy(mdfile, <pathToFile>, MAXREAD);

FILE * stream = fopen(<pathToFile>, "rt");

the rest of the c-code iterates over a rather large text file getting
a line at a time, (fgets(inbuff,MAXREAD,stream)) make some
calculations and then go onto the next line.

So as you can see, a non-escaped, white space laden "pathToFile" will
return a bogus FILE *stream.

Where are you getting this idea from? fopen performs no special parsing on the path argument.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Escaping white space in an NSString (From: Greg Guerin <email@hidden>)
 >Re: Escaping white space in an NSString (From: Bruce Johnson <email@hidden>)

  • Prev by Date: Re: iPhone Photo Album and Camera Apps crashing
  • Next by Date: Re: Escaping white space in an NSString
  • Previous by thread: Re: Escaping white space in an NSString
  • Next by thread: Re: Escaping white space in an NSString
  • Index(es):
    • Date
    • Thread