ecere: Added ChangeChars(); eda/ers: ; Avoiding bad filenames
[sdk] / eda / libeda / src / ers.ec
index 8f95f9f..878925f 100644 (file)
@@ -606,19 +606,17 @@ public class CSVReport : ReportDestination
 
    void AddPage(Page page)
    {
-      int h;
       if(pageCount && display)
          display.NextPage();
       lastPage = page;
       page.master = this;
       page.parent = this;
       page.size = { MAXINT - 10, MAXINT - 10 };
-      h = page.size.h;
       pageCount++;
       page.Create();
    }
 
-   void PutString(File f, char * text)
+   void PutString(File f, const char * text)
    {
       char output[4096];
       int s = 0, d = 0;
@@ -651,6 +649,7 @@ public class CSVReport : ReportDestination
    {
       char filePath[MAX_LOCATION];
       strcpy(filePath, report.title);
+      ChangeChars(filePath, "/\\:*?\"|<>", '_');
       strcat(filePath, ".csv");
       saveTo.master = master;
       saveTo.filePath = filePath;
@@ -675,7 +674,7 @@ public class CSVReport : ReportDestination
                      if(!first) first = label;
                      if(label._class == class(ReportTitle) || eClass_IsDerived(label._class, class(Label)))
                      {
-                        char * text = label.text;
+                        const char * text = label.text;
                         if(label != first)f.Puts(",");
                         if(text)
                            PutString(f, text);
@@ -862,7 +861,7 @@ public:
 
    Array<Grouping> groupings { };
 
-   property String title
+   property const String title
    {
       set
       {