Hi Volker,

this problem has been found before, when trying to save
history to files, here's a history save function, that 
does it right ...

;
; History save and load by Christoph Mammitzsch
;
save-history: func [
   "Saves system/console/history to file."
   file [ file! ] "the file to save to"
   /local history line subst
][
   history: copy system/console/history
   forall history [
      line: mold first history
      if equal? first line #"{" [
         line: change line #"^""
            forall line [
                subst: select [
                    #"^""   "^^^""
                    #"^/"   "^^/"  
          ;There must be more. I'm sure I forgot something :)
                ] first line        
                if not none? subst [
                    remove line
                    line: back insert line subst
                ]
            ]
            change back line #"^""
         line: head line
      ]
      change/only history line
   ]
   history: head history
   write file history
   exit
]

load-history: func [
   "Restores system/console/history from file."
   file [ file! ] "the file to load from"
   /local history
][
   system/console/history: load file
   exit
]


I hope this helps,

Ingo


Those were the words of [EMAIL PROTECTED]:
> my little email-database is crashed.
> Caused by some emails which contained
> unpaired "{".

--  _     .                                _
ingo@)|_ /|  _| _  <We ARE all ONE   www._|_o _   _ ._ _  
www./_|_) |o(_|(/_  We ARE all FREE> ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/                     ._|      ._|

Reply via email to