this->stdmsg = stdout;
this->main_d = "__main.d";
this->pragma_lib_filename = 0;
this->pragma_lib_file_created = 0;
memset (&this->params, 0, sizeof (Param));
}
global.params.useUnitTests = value;
break;
case OPT_fwrite_pragma_libs_: {
// ah, let it leak!
char *tmp = new char[strlen(arg)+1];
strcpy(tmp, arg);
global.pragma_lib_filename = (const char *)&tmp[0];
} break;
case OPT_fversion_:
if (ISDIGIT (arg[0]))
{
ob->writestring((char *) name);
ob->writenl();
if (global.pragma_lib_filename && global.pragma_lib_file_created >= 0) {
FILE *fo = fopen(global.pragma_lib_filename, (global.pragma_lib_file_created ? "a" : "w"));
if (fo) {
global.pragma_lib_file_created = 1; // file successfully created
fprintf(fo, "-l\"%s\"\n", name);
fclose(fo);
} else {
global.pragma_lib_file_created = -1; // error occured, don't try to do this anymore
mem.free(name);
Strings *path; // Array of char*'s which form the import lookup path
Strings *filePath; // Array of char*'s which form the file import lookup path
// writing pragma(lib) to file
const char *pragma_lib_filename; // NULL: don't write; (? "" -- stdout)
int pragma_lib_file_created; // !0: append; <0: error
const char *version;
Compiler compiler;
D Joined RejectNegative
-fversion=<level|ident> Compile in version code >= <level> or identified by <ident>
fwrite-pragma-libs=
-fwrite-pragma-libs=<filename> write all libraries from pragma(lib) to <filename>
fXf=
-fXf=<filename> Write JSON file to <filename>