diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2018-08-25 15:17:16 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2018-08-25 15:17:16 +0000 |
| commit | 011e5c498a1f3f197d503bf5ce806e836d667f08 (patch) | |
| tree | 7d48dd1b47908f4bf3d4ddc095c683a31a7ca44f /fluid/code.cxx | |
| parent | 8de0a3c4453c50ae193c0603c7e57516a8157905 (diff) | |
Added new functionality to Fluid: the 'binary data' type can now include text files as well as binary files into the source code. There is an additional check box in the dialog. Terminology is now "inlined data" instead of "binary data". Texts were modified to reflect the changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/code.cxx')
| -rw-r--r-- | fluid/code.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fluid/code.cxx b/fluid/code.cxx index 02cc439bc..9d33f50d8 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -156,6 +156,18 @@ void write_cstring(const char *s, int length) { varused = 1; return; } + if (write_sourceview && ((s==NULL) || (length>1024))) { + if (length>=0) + fprintf(code_file, "\" ... %d bytes of text... \"", length); + else + fprintf(code_file, "\" ... text... \""); + return; + } + if (length==-1) { + fprintf(code_file, "\" ... undefined size text... \""); + return; + } + const char *p = s; const char *e = s+length; int linelength = 1; |
