lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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/