| 20 | das::Context * get_context ( int stackSize=0 ); |
| 21 | |
| 22 | bool saveToFile ( const string & fname, const string & str ) { |
| 23 | if ( !quiet ) { |
| 24 | tout << "saving to " << fname << "\n"; |
| 25 | } |
| 26 | FILE * f = fopen ( fname.c_str(), "w" ); |
| 27 | if ( !f ) { |
| 28 | tout << "can't open " << fname << "\n"; |
| 29 | return false; |
| 30 | } |
| 31 | fwrite ( str.c_str(), str.length(), 1, f ); |
| 32 | fclose ( f ); |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | bool compile ( const string & fn, const string & cppFn, bool dryRun ) { |
| 37 | auto access = get_file_access((char*)(projectFile.empty() ? nullptr : projectFile.c_str())); |