Re: checking for line ending types
Re: checking for line ending types
- Subject: Re: checking for line ending types
- From: Graham J Lee <email@hidden>
- Date: Sat, 27 Nov 2004 17:57:22 +0000
On 27 Nov 2004, at 17:43, Craig Hunter wrote:
Hi All,
Hi Craig,
char *check_file_type(const char *file_name)
{
if (atoi([Gstring cString]) == 0) return NULL;
else if (atoi([Gstring cString]) == 1) return "Mac";
else return "DOS";
Your function has definitely returned by here, so the next lines don't
get run...
[Gstring release];
[Gpipe release];
[theGrep release];
}
I *think* that calling [object autorelease] on these is possibly what
you want to do, or you could just -release them before you do any
returning.
Cheers,
Graham.
--
Graham Lee
UNIX Systems Manager,
Oxford Physics Practical Course
http://nextstep.sdf-eu.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden