📝 rename flstream => filestream
This commit is contained in:
parent
7590a286c3
commit
b6a7b7f46d
|
@ -88,7 +88,9 @@ std::ostream& logo(std::ostream& out) {
|
|||
<< "repo : https://gitee.com/valkmjolnir/Nasal-Interpreter\n"
|
||||
<< "wiki : https://wiki.flightgear.org/Nasal_scripting_language\n"
|
||||
<< "\n"
|
||||
<< "presented by fgprc members - http://fgprc.org.cn\n"
|
||||
<< "presented by fgprc members\n"
|
||||
<< " - fgprc : http://fgprc.org\n"
|
||||
<< " - fgprc.cn : http://fgprc.org.cn\n"
|
||||
<< "\n"
|
||||
<< "input <nasal -h> to get help .\n\n";
|
||||
return out;
|
||||
|
|
|
@ -13,7 +13,7 @@ void operand_line_counter::load_file_line_counter(
|
|||
file_name_list = file_list;
|
||||
file_line_counter = {};
|
||||
file_contents = {};
|
||||
flstream fs;
|
||||
filestream fs;
|
||||
for(usize i =0; i<file_list.size(); ++i) {
|
||||
fs.load(file_list[i]);
|
||||
file_contents.push_back(fs.file_content());
|
||||
|
|
|
@ -71,7 +71,7 @@ std::ostream& reset(std::ostream& s) {
|
|||
return s;
|
||||
}
|
||||
|
||||
void flstream::load(const std::string& f) {
|
||||
void filestream::load(const std::string& f) {
|
||||
if (file==f) { // don't need to load a loaded file
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -29,13 +29,13 @@ std::ostream& orange(std::ostream&);
|
|||
std::ostream& white(std::ostream&);
|
||||
std::ostream& reset(std::ostream&);
|
||||
|
||||
class flstream {
|
||||
class filestream {
|
||||
protected:
|
||||
std::string file;
|
||||
std::vector<std::string> res;
|
||||
|
||||
public:
|
||||
flstream(): file("") {}
|
||||
filestream(): file("") {}
|
||||
void load(const std::string&);
|
||||
const std::string& operator[](usize n) const {return res[n];}
|
||||
const auto& name() const {return file;}
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
usize size() const {return res.size();}
|
||||
};
|
||||
|
||||
class error: public flstream {
|
||||
class error: public filestream {
|
||||
private:
|
||||
u32 cnt; // counter for errors
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ const char* get_platform() {
|
|||
} else if (is_macos()) {
|
||||
return "macOS";
|
||||
}
|
||||
return "unknown platform";
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* get_arch() {
|
||||
|
@ -126,7 +126,7 @@ const char* get_arch() {
|
|||
} else if (is_superh()) {
|
||||
return "superh";
|
||||
}
|
||||
return "unknown arch";
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
f64 hex_to_f64(const char* str) {
|
||||
|
|
Loading…
Reference in New Issue