diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 19:04:24 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 19:04:24 +0500 |
| commit | 793fa5a91f24358aa7ce21abf6ee4e93a17b04ee (patch) | |
| tree | e81d1e60ffdf068ac1e93e8d36d9c2046b2d7c50 /fluid/io | |
| parent | b4995f979d127cea667b4e2b71c91e9db4ab52ef (diff) | |
wip
Diffstat (limited to 'fluid/io')
| -rw-r--r-- | fluid/io/Code_Writer.cxx | 60 | ||||
| -rw-r--r-- | fluid/io/Code_Writer.h | 7 | ||||
| -rw-r--r-- | fluid/io/Project_Reader.cxx | 32 | ||||
| -rw-r--r-- | fluid/io/Project_Reader.h | 7 | ||||
| -rw-r--r-- | fluid/io/Project_Writer.cxx | 22 | ||||
| -rw-r--r-- | fluid/io/Project_Writer.h | 7 | ||||
| -rw-r--r-- | fluid/io/String_Writer.cxx | 2 | ||||
| -rw-r--r-- | fluid/io/String_Writer.h | 7 |
8 files changed, 58 insertions, 86 deletions
diff --git a/fluid/io/Code_Writer.cxx b/fluid/io/Code_Writer.cxx index ffa63514a..f81da6ca7 100644 --- a/fluid/io/Code_Writer.cxx +++ b/fluid/io/Code_Writer.cxx @@ -141,7 +141,7 @@ int is_id(char c) { \param[in] label else if label is set, it is appended, skipping non-keyword characters \return buffer to a unique identifier, managed by Code_Writer, so caller must NOT free() it */ -const char* fld::io::Code_Writer::unique_id(void* o, const char* type, const char* name, const char* label) { +const char* Code_Writer::unique_id(void* o, const char* type, const char* name, const char* label) { char buffer[128]; char* q = buffer; char* q_end = q + 128 - 8 - 1; // room for hex number and NUL @@ -186,7 +186,7 @@ const char* fld::io::Code_Writer::unique_id(void* o, const char* type, const cha \param[in] set generate this indent depth \return pointer to a static string */ -const char *fld::io::Code_Writer::indent(int set) { +const char *Code_Writer::indent(int set) { static const char* spaces = " "; int i = set * 2; if (i>64) i = 64; @@ -198,7 +198,7 @@ const char *fld::io::Code_Writer::indent(int set) { Return a C string that indents code to the current source file depth. \return pointer to a static string */ -const char *fld::io::Code_Writer::indent() { +const char *Code_Writer::indent() { return indent(indentation); } @@ -208,7 +208,7 @@ const char *fld::io::Code_Writer::indent() { change the `indentation` variable; offset can be negative \return pointer to a static string */ -const char *fld::io::Code_Writer::indent_plus(int offset) { +const char *Code_Writer::indent_plus(int offset) { return indent(indentation+offset); } @@ -219,7 +219,7 @@ const char *fld::io::Code_Writer::indent_plus(int offset) { \param[in] format printf-style formatting text, followed by a vararg list \return 1 if the text was written to the file, 0 if it was previously written. */ -int fld::io::Code_Writer::write_h_once(const char *format, ...) { +int Code_Writer::write_h_once(const char *format, ...) { va_list args; char buf[1024]; va_start(args, format); @@ -239,7 +239,7 @@ int fld::io::Code_Writer::write_h_once(const char *format, ...) { \param[in] format printf-style formatting text, followed by a vararg list \return 1 if the text was written to the file, 0 if it was previously written. */ -int fld::io::Code_Writer::write_c_once(const char *format, ...) { +int Code_Writer::write_c_once(const char *format, ...) { va_list args; char buf[1024]; va_start(args, format); @@ -264,7 +264,7 @@ int fld::io::Code_Writer::write_c_once(const char *format, ...) { \param[in] pp ay pointer \return true if found in the tree, false if added to the tree */ -bool fld::io::Code_Writer::c_contains(void *pp) { +bool Code_Writer::c_contains(void *pp) { if (ptr_in_code.contains(pp)) { return true; } @@ -289,7 +289,7 @@ bool fld::io::Code_Writer::c_contains(void *pp) { \see f.write_cstring(const char*) */ -void fld::io::Code_Writer::write_cstring(const char *s, int length) { +void Code_Writer::write_cstring(const char *s, int length) { const char *next_line = "\"\n\""; if (varused_test) { varused = 1; @@ -370,7 +370,7 @@ void fld::io::Code_Writer::write_cstring(const char *s, int length) { \param[in] s write this string \see f.write_cstring(const char*, int) */ -void fld::io::Code_Writer::write_cstring(const char *s) { +void Code_Writer::write_cstring(const char *s) { write_cstring(s, (int)strlen(s)); } @@ -382,7 +382,7 @@ void fld::io::Code_Writer::write_cstring(const char *s) { \param[in] s a block of binary data, interpreted as unsigned bytes \param[in] length size of the block in bytes */ -void fld::io::Code_Writer::write_cdata(const char *s, int length) { +void Code_Writer::write_cdata(const char *s, int length) { if (varused_test) { varused = 1; return; @@ -420,7 +420,7 @@ void fld::io::Code_Writer::write_cdata(const char *s, int length) { \param[in] format printf-style formatting text \param[in] args list of arguments */ -void fld::io::Code_Writer::vwrite_c(const char* format, va_list args) { +void Code_Writer::vwrite_c(const char* format, va_list args) { if (varused_test) { varused = 1; return; @@ -432,7 +432,7 @@ void fld::io::Code_Writer::vwrite_c(const char* format, va_list args) { Print a formatted line to the source file. \param[in] format printf-style formatting text, followed by a vararg list */ -void fld::io::Code_Writer::write_c(const char* format,...) { +void Code_Writer::write_c(const char* format,...) { va_list args; va_start(args, format); vwrite_c(format, args); @@ -447,7 +447,7 @@ void fld::io::Code_Writer::write_c(const char* format,...) { \param[in] c line of code \param[in] com optional commentary */ -void fld::io::Code_Writer::write_cc(const char *indent, int n, const char *c, const char *com) { +void Code_Writer::write_cc(const char *indent, int n, const char *c, const char *com) { write_c("%s%.*s", indent, n, c); char cc = c[n-1]; if (cc!='}' && cc!=';') @@ -461,7 +461,7 @@ void fld::io::Code_Writer::write_cc(const char *indent, int n, const char *c, co Print a formatted line to the header file. \param[in] format printf-style formatting text, followed by a vararg list */ -void fld::io::Code_Writer::write_h(const char* format,...) { +void Code_Writer::write_h(const char* format,...) { if (varused_test) return; va_list args; va_start(args, format); @@ -477,7 +477,7 @@ void fld::io::Code_Writer::write_h(const char* format,...) { \param[in] c line of code \param[in] com optional commentary */ -void fld::io::Code_Writer::write_hc(const char *indent, int n, const char* c, const char *com) { +void Code_Writer::write_hc(const char *indent, int n, const char* c, const char *com) { write_h("%s%.*s", indent, n, c); char cc = c[n-1]; if (cc!='}' && cc!=';') @@ -494,7 +494,7 @@ void fld::io::Code_Writer::write_hc(const char *indent, int n, const char* c, co \param[in] inTrailWith append this character if the last line did not end with a newline, usually 0 or newline. */ -void fld::io::Code_Writer::write_c_indented(const char *textlines, int inIndent, char inTrailWith) { +void Code_Writer::write_c_indented(const char *textlines, int inIndent, char inTrailWith) { if (textlines) { indentation += inIndent; for (;;) { @@ -567,7 +567,7 @@ bool is_comment_before_class_member(Node *q) { \param[in] p write this type and all its children \return pointer to the next sibling */ -Node* fld::io::Code_Writer::write_static(Node* p) { +Node* Code_Writer::write_static(Node* p) { if (write_codeview) p->header_static_start = (int)ftell(header_file); if (write_codeview) p->code_static_start = (int)ftell(code_file); p->write_static(*this); @@ -589,7 +589,7 @@ Node* fld::io::Code_Writer::write_static(Node* p) { \param[in] p write this node and all its children \return pointer to the next sibling */ -Node* fld::io::Code_Writer::write_code(Node* p) { +Node* Code_Writer::write_code(Node* p) { // write all code that comes before the children code // (but don't write the last comment until the very end) if (!(p==Fluid.proj.tree.last && p->is_a(FLD_NODE_TYPE_Comment))) { @@ -658,7 +658,7 @@ Node* fld::io::Code_Writer::write_code(Node* p) { \param[in] t filename of the header file \return 0 if the operation failed, 1 if it was successful */ -int fld::io::Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { +int Code_Writer::write_code(const char *s, const char *t, bool to_codeview) { write_codeview = to_codeview; unique_id_list.clear(); indentation = 0; @@ -873,7 +873,7 @@ int fld::io::Code_Writer::write_code(const char *s, const char *t, bool to_codev This avoids repeating these words if the mode is already set. \param[in] state 0 for private, 1 for public, 2 for protected */ -void fld::io::Code_Writer::write_public(int state) { +void Code_Writer::write_public(int state) { if (!current_class && !current_widget_class) return; if (current_class && current_class->write_public_state == state) return; if (current_widget_class && current_widget_class->write_public_state == state) return; @@ -889,7 +889,7 @@ void fld::io::Code_Writer::write_public(int state) { /** Create and initialize a new C++ source code writer. */ -fld::io::Code_Writer::Code_Writer(Project &proj) +Code_Writer::Code_Writer(Project &proj) : proj_ { proj } { block_crc_ = crc32(0, 0, 0); @@ -898,7 +898,7 @@ fld::io::Code_Writer::Code_Writer(Project &proj) /** Release all resources. */ -fld::io::Code_Writer::~Code_Writer() +Code_Writer::~Code_Writer() { if (block_buffer_) ::free(block_buffer_); } @@ -911,7 +911,7 @@ fld::io::Code_Writer::~Code_Writer() \param[in] type FD_TAG_GENERIC, FD_TAG_CODE, FD_TAG_MENU_CALLBACK, or FD_TAG_WIDGET_CALLBACK \param[in] uid the unique id of the current type */ -void fld::io::Code_Writer::tag(Mergeback::Tag prev_type, Mergeback::Tag next_type, unsigned short uid) { +void Code_Writer::tag(Mergeback::Tag prev_type, Mergeback::Tag next_type, unsigned short uid) { if (proj_.write_mergeback_data) { ::Mergeback::print_tag(code_file, prev_type, next_type, uid, (uint32_t)block_crc_); } @@ -929,7 +929,7 @@ void fld::io::Code_Writer::tag(Mergeback::Tag prev_type, Mergeback::Tag next_typ if we are the start of a line, used to find leading whitespace \return the new CRC */ -unsigned long fld::io::Code_Writer::block_crc(const void *data, int n, unsigned long in_crc, bool *inout_line_start) { +unsigned long Code_Writer::block_crc(const void *data, int n, unsigned long in_crc, bool *inout_line_start) { if (!data) return 0; if (n==-1) n = (int)strlen((const char*)data); bool line_start = true; @@ -956,7 +956,7 @@ unsigned long fld::io::Code_Writer::block_crc(const void *data, int n, unsigned \param[in] data a pointer to the data block \param[in] n the size of the data in bytes, or -1 to use strlen() */ -void fld::io::Code_Writer::crc_add(const void *data, int n) { +void Code_Writer::crc_add(const void *data, int n) { block_crc_ = block_crc(data, n, block_crc_, &block_line_start_); } @@ -965,7 +965,7 @@ void fld::io::Code_Writer::crc_add(const void *data, int n) { \param[in] format printf style formatting string \return see fprintf(FILE *, *const char*, ...) */ -int fld::io::Code_Writer::crc_printf(const char *format, ...) { +int Code_Writer::crc_printf(const char *format, ...) { va_list args; va_start(args, format); int ret = crc_vprintf(format, args); @@ -979,7 +979,7 @@ int fld::io::Code_Writer::crc_printf(const char *format, ...) { \param[in] args list of arguments \return see fprintf(FILE *, *const char*, ...) */ -int fld::io::Code_Writer::crc_vprintf(const char *format, va_list args) { +int Code_Writer::crc_vprintf(const char *format, va_list args) { if (proj_.write_mergeback_data) { int n = vsnprintf(block_buffer_, block_buffer_size_, format, args); if (n > block_buffer_size_) { @@ -1000,7 +1000,7 @@ int fld::io::Code_Writer::crc_vprintf(const char *format, va_list args) { \param[in] text any text, no requirements to end in a newline or such \return see fputs(const char*, FILE*) */ -int fld::io::Code_Writer::crc_puts(const char *text) { +int Code_Writer::crc_puts(const char *text) { if (proj_.write_mergeback_data) { crc_add(text); } @@ -1009,11 +1009,11 @@ int fld::io::Code_Writer::crc_puts(const char *text) { /** Write a single ASCII character to the code file. If MergeBack is enabled, the CRC calculation is continued. - \note to write UTF-8 characters, use fld::io::Code_Writer::crc_puts(const char *text) + \note to write UTF-8 characters, use Code_Writer::crc_puts(const char *text) \param[in] c any character between 0 and 127 inclusive \return see fputc(int, FILE*) */ -int fld::io::Code_Writer::crc_putc(int c) { +int Code_Writer::crc_putc(int c) { if (proj_.write_mergeback_data) { uchar uc = (uchar)c; crc_add(&uc, 1); diff --git a/fluid/io/Code_Writer.h b/fluid/io/Code_Writer.h index bd99395e5..4b0ed6794 100644 --- a/fluid/io/Code_Writer.h +++ b/fluid/io/Code_Writer.h @@ -74,12 +74,8 @@ struct Fd_Pointer_Set { int is_id(char c); -namespace fld { - class Project; -namespace io { - class Code_Writer { private: @@ -161,7 +157,4 @@ public: static unsigned long block_crc(const void *data, int n=-1, unsigned long in_crc=0, bool *inout_line_start=0); }; -} // namespace io -} // namespace fld - #endif // FLUID_IO_CODE_WRITER_H diff --git a/fluid/io/Project_Reader.cxx b/fluid/io/Project_Reader.cxx index 54baa9a85..043aebcfa 100644 --- a/fluid/io/Project_Reader.cxx +++ b/fluid/io/Project_Reader.cxx @@ -44,7 +44,7 @@ // This file contains code to read and write .fl files. /// If set, we read an old fdesign file and widget y coordinates need to be flipped. -int fld::io::fdesign_flip = 0; +int fdesign_flip = 0; /** \brief Read a .fl project file. @@ -56,7 +56,7 @@ int fld::io::fdesign_flip = 0; \param[in] strategy add new nodes after current or as last child \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::read_file(Project &proj, const char *filename, int merge, Strategy strategy) { +int read_file(Project &proj, const char *filename, int merge, Strategy strategy) { Project_Reader f(proj); strategy.source(Strategy::FROM_FILE); return f.read_project(filename, merge, strategy); @@ -82,7 +82,7 @@ static int hexdigit(int x) { Oh how I wish sometimes we would upgrade to modern C++. \param[in] length minimum length in bytes */ -void fld::io::Project_Reader::expand_buffer(int length) { +void Project_Reader::expand_buffer(int length) { if (length >= buflen) { if (!buflen) { buflen = length+1; @@ -96,13 +96,13 @@ void fld::io::Project_Reader::expand_buffer(int length) { } /** \brief Construct local project reader. */ -fld::io::Project_Reader::Project_Reader(Project &proj) +Project_Reader::Project_Reader(Project &proj) : proj_(proj) { } /** \brief Release project reader resources. */ -fld::io::Project_Reader::~Project_Reader() +Project_Reader::~Project_Reader() { // fname is not copied, so do not free it if (buffer) @@ -114,7 +114,7 @@ fld::io::Project_Reader::~Project_Reader() \param[in] s filename, if 0, read from stdin instead \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::Project_Reader::open_read(const char *s) { +int Project_Reader::open_read(const char *s) { lineno = 1; if (!s) { fin = stdin; @@ -133,7 +133,7 @@ int fld::io::Project_Reader::open_read(const char *s) { Close the .fl file. \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::Project_Reader::close_read() { +int Project_Reader::close_read() { if (fin != stdin) { int x = fclose(fin); fin = 0; @@ -146,7 +146,7 @@ int fld::io::Project_Reader::close_read() { Return the name part of the current filename and path. \return a pointer into a string that is not owned by this class */ -const char *fld::io::Project_Reader::filename_name() { +const char *Project_Reader::filename_name() { return fl_filename_name(fname); } @@ -156,7 +156,7 @@ const char *fld::io::Project_Reader::filename_name() { values, and \\o### octal values. \return a character in the ASCII range */ -int fld::io::Project_Reader::read_quoted() { // read whatever character is after a \ . +int Project_Reader::read_quoted() { // read whatever character is after a \ . int c,d,x; switch(c = nextchar()) { case '\n': lineno++; return -1; @@ -201,7 +201,7 @@ int fld::io::Project_Reader::read_quoted() { // read whatever character is a previous call, and there is no need to waste time searching for them. \return the last node that was created */ -Node *fld::io::Project_Reader::read_children(Node *p, int merge, Strategy strategy, char skip_options) { +Node *Project_Reader::read_children(Node *p, int merge, Strategy strategy, char skip_options) { Fluid.proj.tree.current = p; Node *last_child_read = 0; Node *t = 0; @@ -385,7 +385,7 @@ Node *fld::io::Project_Reader::read_children(Node *p, int merge, Strategy strate \param[in] strategy add new nodes after current or as last child \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::Project_Reader::read_project(const char *filename, int merge, Strategy strategy) { +int Project_Reader::read_project(const char *filename, int merge, Strategy strategy) { Node *o; proj_.undo.suspend(); read_version = 0.0; @@ -435,7 +435,7 @@ int fld::io::Project_Reader::read_project(const char *filename, int merge, Strat operations. \param[in] format printf style format string, followed by an argument list */ -void fld::io::Project_Reader::read_error(const char *format, ...) { +void Project_Reader::read_error(const char *format, ...) { va_list args; va_start(args, format); if (!fin) { // FIXME: this line suppresses any error messages in interactive mode @@ -468,7 +468,7 @@ void fld::io::Project_Reader::read_error(const char *format, ...) { overwrite this buffer. If wantbrace is not set, but we read a leading '{', the returned string will be stripped of its leading and trailing braces. */ -const char *fld::io::Project_Reader::read_word(int wantbrace) { +const char *Project_Reader::read_word(int wantbrace) { int x; // skip all the whitespace before it: @@ -538,7 +538,7 @@ const char *fld::io::Project_Reader::read_word(int wantbrace) { /** Read a word and interpret it as an integer value. \return integer value, or 0 if the word is not an integer */ -int fld::io::Project_Reader::read_int() { +int Project_Reader::read_int() { const char *word = read_word(); if (word) { return atoi(word); @@ -554,7 +554,7 @@ int fld::io::Project_Reader::read_int() { \param[out] value string \return 0 if end of file, else 1 */ -int fld::io::Project_Reader::read_fdesign_line(const char*& name, const char*& value) { +int Project_Reader::read_fdesign_line(const char*& name, const char*& value) { int length = 0; int x; // find a colon: @@ -681,7 +681,7 @@ static void forms_end(Fl_Group *g, int flip) { FLTK widgets. \see http://xforms-toolkit.org */ -void fld::io::Project_Reader::read_fdesign() { +void Project_Reader::read_fdesign() { int fdesign_magic = atoi(read_word()); fdesign_flip = (fdesign_magic < 13000); Widget_Node *window = 0; diff --git a/fluid/io/Project_Reader.h b/fluid/io/Project_Reader.h index fe66be689..a68b7a237 100644 --- a/fluid/io/Project_Reader.h +++ b/fluid/io/Project_Reader.h @@ -26,12 +26,8 @@ class Node; -namespace fld { - class Project; -namespace io { - extern int fdesign_flip; int read_file(Project &proj, const char *, int merge, Strategy strategy=Strategy::FROM_FILE_AS_LAST_CHILD); @@ -77,7 +73,4 @@ public: void read_fdesign(); }; -} // namespace io -} // namespace fld - #endif // FLUID_IO_PROJECT_READER_H diff --git a/fluid/io/Project_Writer.cxx b/fluid/io/Project_Writer.cxx index e2f670f8f..f67a877cb 100644 --- a/fluid/io/Project_Writer.cxx +++ b/fluid/io/Project_Writer.cxx @@ -41,7 +41,7 @@ is used to implement copy and paste. \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::write_file(Project &proj, const char *filename, int selected_only, bool to_codeview) { +int write_file(Project &proj, const char *filename, int selected_only, bool to_codeview) { Project_Writer out(proj); return out.write_project(filename, selected_only, to_codeview); } @@ -49,13 +49,13 @@ int fld::io::write_file(Project &proj, const char *filename, int selected_only, // ---- Project_Writer ---------------------------------------------- MARK: - /** \brief Construct local project writer. */ -fld::io::Project_Writer::Project_Writer(Project &proj) +Project_Writer::Project_Writer(Project &proj) : proj_(proj) { } /** \brief Release project writer resources. */ -fld::io::Project_Writer::~Project_Writer() +Project_Writer::~Project_Writer() { } @@ -65,7 +65,7 @@ fld::io::Project_Writer::~Project_Writer() \param[in] s the filename or 0 for stdout \return 1 if successful. 0 if the operation failed */ -int fld::io::Project_Writer::open_write(const char *s) { +int Project_Writer::open_write(const char *s) { if (!s) { fout = stdout; } else { @@ -81,7 +81,7 @@ int fld::io::Project_Writer::open_write(const char *s) { Don't close, if data was sent to stdout. \return 1 if succeeded, 0 if fclose failed */ -int fld::io::Project_Writer::close_write() { +int Project_Writer::close_write() { if (fout != stdout) { int x = fclose(fout); fout = stdout; @@ -97,7 +97,7 @@ int fld::io::Project_Writer::close_write() { \param[in] sv if set, this file will be used by codeview \return 0 if the operation failed, 1 if it succeeded */ -int fld::io::Project_Writer::write_project(const char *filename, int selected_only, bool sv) { +int Project_Writer::write_project(const char *filename, int selected_only, bool sv) { write_codeview_ = sv; proj_.undo.suspend(); if (!open_write(filename)) { @@ -148,7 +148,7 @@ int fld::io::Project_Writer::write_project(const char *filename, int selected_on Write a string to the .fl file, quoting characters if necessary. \param[in] w NUL terminated text */ -void fld::io::Project_Writer::write_word(const char *w) { +void Project_Writer::write_word(const char *w) { if (needspace) putc(' ', fout); needspace = 1; if (!w || !*w) {fprintf(fout,"{}"); return;} @@ -186,7 +186,7 @@ void fld::io::Project_Writer::write_word(const char *w) { unless the format starts with a newline character \\n. \param[in] format printf style formatting string followed by a list of arguments */ -void fld::io::Project_Writer::write_string(const char *format, ...) { +void Project_Writer::write_string(const char *format, ...) { va_list args; va_start(args, format); if (needspace && *format != '\n') fputc(' ',fout); @@ -199,7 +199,7 @@ void fld::io::Project_Writer::write_string(const char *format, ...) { Start a new line in the .fl file and indent it for a given nesting level. \param[in] n indent level */ -void fld::io::Project_Writer::write_indent(int n) { +void Project_Writer::write_indent(int n) { fputc('\n',fout); while (n--) {fputc(' ',fout); fputc(' ',fout);} needspace = 0; @@ -208,7 +208,7 @@ void fld::io::Project_Writer::write_indent(int n) { /** Write a '{' to the .fl file at the given indenting level. */ -void fld::io::Project_Writer::write_open() { +void Project_Writer::write_open() { if (needspace) fputc(' ',fout); fputc('{',fout); needspace = 0; @@ -218,7 +218,7 @@ void fld::io::Project_Writer::write_open() { Write a '}' to the .fl file at the given indenting level. \param[in] n indent level */ -void fld::io::Project_Writer::write_close(int n) { +void Project_Writer::write_close(int n) { if (needspace) write_indent(n); fputc('}',fout); needspace = 1; diff --git a/fluid/io/Project_Writer.h b/fluid/io/Project_Writer.h index 845f77f1e..cfb3b31c8 100644 --- a/fluid/io/Project_Writer.h +++ b/fluid/io/Project_Writer.h @@ -23,12 +23,8 @@ class Node; -namespace fld { - class Project; -namespace io { - int write_file(Project &proj, const char *, int selected_only = 0, bool to_codeview = false); class Project_Writer @@ -60,7 +56,4 @@ public: bool write_codeview() const { return write_codeview_; } }; -} // namespace io -} // namespace fld - #endif // FLUID_IO_PROJECT_WRITER_H diff --git a/fluid/io/String_Writer.cxx b/fluid/io/String_Writer.cxx index 891fc5a25..dc7424c3d 100644 --- a/fluid/io/String_Writer.cxx +++ b/fluid/io/String_Writer.cxx @@ -58,7 +58,7 @@ static int write_escaped_strings(FILE *out, const char *text) { \param[in] filename file path and name to a file that will hold the strings \return 1 if the file could not be opened for writing, or the result of `fclose`. */ -int fld::io::write_strings(Project &proj, const char *filename) { +int write_strings(Project &proj, const char *filename) { Node *p; Widget_Node *w; int i; diff --git a/fluid/io/String_Writer.h b/fluid/io/String_Writer.h index 8402836c1..428cde33f 100644 --- a/fluid/io/String_Writer.h +++ b/fluid/io/String_Writer.h @@ -17,15 +17,8 @@ #ifndef FLUID_IO_STRING_WRITER_H #define FLUID_IO_STRING_WRITER_H -namespace fld { - class Project; -namespace io { - int write_strings(Project &proj, const char *filename); -} // namespace io -} // namespace fld - #endif // FLUID_IO_STRING_WRITER_H |
