diff options
Diffstat (limited to 'fluid/io/Project_Reader.cxx')
| -rw-r--r-- | fluid/io/Project_Reader.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/fluid/io/Project_Reader.cxx b/fluid/io/Project_Reader.cxx index e4eb65606..33dce126c 100644 --- a/fluid/io/Project_Reader.cxx +++ b/fluid/io/Project_Reader.cxx @@ -112,7 +112,7 @@ Project_Reader::~Project_Reader() /** Open an .fl file for reading. - \param[in] s filename, if nullptr, read from stdin instead + \param[in] s filename, if 0, read from stdin instead \return 0 if the operation failed, 1 if it succeeded */ int Project_Reader::open_read(const char *s) { @@ -137,7 +137,7 @@ int Project_Reader::open_read(const char *s) { int Project_Reader::close_read() { if (fin != stdin) { int x = fclose(fin); - fin = nullptr; + fin = 0; return x >= 0; } return 1; @@ -195,7 +195,7 @@ int Project_Reader::read_quoted() { // read whatever character is after a \ If this is the first call, also read the global settings for this design. - \param[in] p parent node or nullptr + \param[in] p parent node or 0 \param[in] merge if set, merge into existing design, else replace design \param[in] strategy add nodes after current or as last child \param[in] skip_options this is set if the options were already found in @@ -204,8 +204,8 @@ int Project_Reader::read_quoted() { // read whatever character is after a \ */ Node *Project_Reader::read_children(Node *p, int merge, Strategy strategy, char skip_options) { Fluid.proj.tree.current = p; - Node *last_child_read = nullptr; - Node *t = nullptr; + Node *last_child_read = 0; + Node *t = 0; for (;;) { const char *c = read_word(); REUSE_C: @@ -225,12 +225,12 @@ Node *Project_Reader::read_children(Node *p, int merge, Strategy strategy, char // this is the first word in a .fd file: if (!strcmp(c,"Magic:")) { read_fdesign(); - return nullptr; + return 0; } if (!strcmp(c,"version")) { c = read_word(); - read_version = strtod(c,nullptr); + read_version = strtod(c,0); if (read_version<=0 || read_version>double(FL_VERSION+0.00001)) read_error("unknown version '%s'",c); continue; @@ -266,24 +266,24 @@ Node *Project_Reader::read_children(Node *p, int merge, Strategy strategy, char goto CONTINUE; } if (!strcmp(c,"header_name")) { - if (!proj_.header_file_set) proj_.header_file_name = read_word(); + if (!proj_.header_file_set) proj_.set_header_file_name(read_word()); else read_word(); goto CONTINUE; } if (!strcmp(c,"code_name")) { - if (!proj_.code_file_set) proj_.code_file_name = read_word(); + if (!proj_.code_file_set) proj_.set_code_file_name(read_word()); else read_word(); goto CONTINUE; } if (!strcmp(c,"include_guard")) { - proj_.include_guard = read_word(); + proj_.set_include_guard(read_word()); goto CONTINUE; } if (!strcmp(c, "snap")) { - Fluid.layout_list.read(this); + Fluid.layout_list->read(this); goto CONTINUE; } @@ -400,11 +400,11 @@ int Project_Reader::read_project(const char *filename, int merge, Strategy strat proj_.reset(); read_children(Fluid.proj.tree.current, merge, strategy); // clear this - Fluid.proj.tree.current = nullptr; + Fluid.proj.tree.current = 0; // Force menu items to be rebuilt... for (o = Fluid.proj.tree.first; o; o = o->next) { if (o->is_a(FLD_NODE_TYPE_Menu_Manager_)) { - o->add_child(nullptr,nullptr); + o->add_child(0,0); } } for (o = Fluid.proj.tree.first; o; o = o->next) { @@ -418,7 +418,7 @@ int Project_Reader::read_project(const char *filename, int merge, Strategy strat g_shell_config->rebuild_shell_menu(); g_shell_config->update_settings_dialog(); } - Fluid.layout_list.update_dialogs(); + Fluid.layout_list->update_dialogs(); proj_.update_settings_dialog(); int ret = close_read(); proj_.undo.resume(); @@ -452,7 +452,7 @@ void Project_Reader::read_error(const char *format, ...) { } /** - Return a word read from the .fl file, or nullptr at the EOF. + Return a word read from the .fl file, or 0 at the EOF. This will skip all comments (# to end of line), and evaluate all \\xxx sequences and use \\ at the end of line to remove the newline. @@ -476,7 +476,7 @@ const char *Project_Reader::read_word(int wantbrace) { for (;;) { x = nextchar(); if (x < 0 && feof(fin)) { // eof - return nullptr; + return 0; } else if (x == '#') { // comment do x = nextchar(); while (x >= 0 && x != '\n'); lineno++; @@ -622,7 +622,7 @@ static const char *class_matcher[] = { "2", "FL_BOX", // was FL_TEXT "62","FL_TIMER", "24","Fl_Value_Slider", - nullptr}; + 0}; /** @@ -684,9 +684,9 @@ static void forms_end(Fl_Group *g, int flip) { void Project_Reader::read_fdesign() { int fdesign_magic = atoi(read_word()); fdesign_flip = (fdesign_magic < 13000); - Widget_Node *window = nullptr; - Widget_Node *group = nullptr; - Widget_Node *widget = nullptr; + Widget_Node *window = 0; + Widget_Node *group = 0; + Widget_Node *widget = 0; if (!Fluid.proj.tree.current) { Node *t = add_new_widget_from_file("Function", Strategy::FROM_FILE_AS_LAST_CHILD); t->name("create_the_forms()"); @@ -714,9 +714,9 @@ void Project_Reader::read_fdesign() { Fl_Group* g = (Fl_Group*)(group->o); g->begin(); forms_end(g, fdesign_flip); - Fl_Group::current(nullptr); + Fl_Group::current(0); } - group = widget = nullptr; + group = widget = 0; Fluid.proj.tree.current = window; } else { for (int i = 0; class_matcher[i]; i += 2) |
