[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: freopen question
 
- From: Terisquas Brothers <terisquas@...>
 
- Date: Sat, 2 Feb 2008 12:20:52 +0000 (GMT)
 
I'm trying to make LUA work in a platform where I have
no freopen.
I think there's just one appearance of freopen in the
code, in luaL_loadfile. Is it safe to modify it from
    lf.f = freopen(filename, "rb", lf.f);  /* reopen
in binary mode */
to
	  if (lf.f!=NULL) fclose (lf.f);
	  lf.f=fopen (filename,"rb");
? 
Is that a correct equivalence? (the truth is I've
never seen freopen until now...)
TIA
Kak
      ___________________________________________________________
Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/