public Io(String[] a)
{
int i;
args = a;
ParseArgs();
ifile = new FileStream(ifilename, FileMode.Open,
FileAccess.Read, FileShare.Read, 8192);
if (ifile == null)
{
Abort("Could not open file '"+ifilename+"'\n");
}
rfile = new StreamReader(ifile); // open up a stream for reading
/*
* for now we are going to create a default class using the filename
*/
i = ifilename.LastIndexOf('.');
if (i < 0)
Abort("Bad filename '"+ifilename+"'");
int j = ifilename.LastIndexOf('\\');
if (j < 0)
j = 0;
else
j++;
classname = ifilename.Substring(j,i-j);
if (genexe)
ofilename = classname+".exe";
if (gendll)
ofilename = classname+".dll";
if (genlist)
{
lst_ofilename = classname+".lst";
lst_ofile = new FileStream(lst_ofilename, FileMode.Create,
FileAccess.Write, FileShare.Write, 8192);
if (lst_ofile == null)
Abort("Could not open file '"+ofilename+"'\n");
lst_wfile = new StreamWriter(lst_ofile);
}
}