Skip to content

Commit

Permalink
📝 rename flstream => filestream
Browse files Browse the repository at this point in the history
  • Loading branch information
ValKmjolnir committed May 21, 2024
1 parent 7590a28 commit b6a7b7f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/nasal_dbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/nasal_err.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions src/nasal_err.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ 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;}
const auto& file_content() const {return res;}
usize size() const {return res.size();}
};

class error: public flstream {
class error: public filestream {
private:
u32 cnt; // counter for errors

Expand Down
4 changes: 2 additions & 2 deletions src/nasal_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const char* get_platform() {
} else if (is_macos()) {
return "macOS";
}
return "unknown platform";
return "unknown";
}

const char* get_arch() {
Expand All @@ -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) {
Expand Down

0 comments on commit b6a7b7f

Please sign in to comment.