[q-lang-cvs] qcalc qcalc.q,1.163,1.164
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-17 17:49:11
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20451 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** qcalc.q 17 Nov 2007 16:24:39 -0000 1.163 --- qcalc.q 17 Nov 2007 17:48:58 -0000 1.164 *************** *** 765,768 **** --- 765,773 ---- digest "+++ Exiting." = STATE := 0; + // preformatted text + digest (formatted S:String) + = qt LOG "append" S || qt LOG "scrollToBottom" () + otherwise; + digest 'X = X; // background task digest W:List = process_sel2 W || merge_undo $ map (flip (flip sub 0) 1) W *************** *** 770,774 **** digest S:String = /* The program generated output before we got the "Ready" message, assume that we're up and running anyway. */ ! STATE := 4 || fail; = waitmsg $ val S where [S] = regex "" "^\\+\\+\\+ Message: (.*)$" S (reg 1); --- 775,779 ---- digest S:String = /* The program generated output before we got the "Ready" message, assume that we're up and running anyway. */ ! STATE := 4 || statusmsg "Ready" || fail if get STATE < 4; = waitmsg $ val S where [S] = regex "" "^\\+\\+\\+ Message: (.*)$" S (reg 1); *************** *** 3448,3453 **** simple calculations which execute almost instantaneously. */ ! try2 SEM = get SEM if #SEM>0; ! = sleep 0.1 || try SEM; /* Update a cell value with a computed result. */ --- 3453,3463 ---- simple calculations which execute almost instantaneously. */ ! try2 SEM = check2 SEM (get SEM) if #SEM>0; ! = sleep 0.1 || check2 SEM (try SEM); ! ! check2 SEM (formatted S:String) ! // preformatted string, pass that directly to the digest function ! = local (digest (formatted S)) || try2 SEM; ! check2 SEM S = S otherwise; /* Update a cell value with a computed result. */ *************** *** 3625,3633 **** format S if eq () (sscanf S "! File"): ! = sprintf "<font color=red4>%s</font>" $ format_script S; if eq () (sscanf S "Error"): ! = sprintf "<font color=red4>%s</font>" $ format_script S; if eq () (sscanf S "Warning"): ! = sprintf "<font color=blue4>%s</font>" $ format_script S; otherwise: = S; --- 3635,3646 ---- format S if eq () (sscanf S "! File"): ! = formatted $ ! sprintf "<font color=red4>%s</font>" $ format_script S; if eq () (sscanf S "Error"): ! = formatted $ ! sprintf "<font color=red4>%s</font>" $ format_script S; if eq () (sscanf S "Warning"): ! = formatted $ ! sprintf "<font color=blue4>%s</font>" $ format_script S; otherwise: = S; *************** *** 3637,3645 **** def TMPNAME = ref ""; ! format_script S = if FNAME<>get TMPNAME then S else if N <= qt EDIT "paragraphs" ()+1 then sprintf "%s <i>anonymous</i>, line %d:%s" (TYPE,min N (qt EDIT "paragraphs" ()), ! munge_compiler_msg N MSG) else throw "ignore" --- 3650,3658 ---- def TMPNAME = ref ""; ! format_script S = if FNAME<>get TMPNAME then htmlquote S else if N <= qt EDIT "paragraphs" ()+1 then sprintf "%s <i>anonymous</i>, line %d:%s" (TYPE,min N (qt EDIT "paragraphs" ()), ! htmlquote $ munge_compiler_msg N MSG) else throw "ignore" *************** *** 3648,3654 **** (reg 1,reg 2,reg 3,reg 4), N:Int = val LINE; ! = if FNAME<>last (split "/" (get TMPNAME)) then S else if N <= qt EDIT "paragraphs" () then ! sprintf "! File <i>anonymous</i>, line %s:%s" (LINE,MSG) else throw "ignore" --- 3661,3668 ---- (reg 1,reg 2,reg 3,reg 4), N:Int = val LINE; ! = if FNAME<>last (split "/" (get TMPNAME)) then htmlquote S else if N <= qt EDIT "paragraphs" () then ! sprintf "! File <i>anonymous</i>, line %s:%s" ! (LINE,htmlquote MSG) else throw "ignore" *************** *** 3657,3661 **** (reg 1,reg 2,reg 3), N:Int = val LINE; ! = S otherwise; /* KLUDGE: This does some cleanup of compiler messages referring to lines not --- 3671,3675 ---- (reg 1,reg 2,reg 3), N:Int = val LINE; ! = htmlquote S otherwise; /* KLUDGE: This does some cleanup of compiler messages referring to lines not *************** *** 3674,3680 **** process. */ ! post_msg S = do post_msg $ dropwhile null $ split "\f" S ! if pos "\f" S >= 0; ! post_msg S = catch () (post MSGS (format S)); def BUF = ref ""; --- 3688,3698 ---- process. */ ! post_msg S = post_msgs $ split "\f" S if pos "\f" S >= 0; ! = post_msg1 S otherwise; ! post_msg1 S = catch () (post MSGS (format S)); ! ! post_msgs [S|L] = do (post MSGS) $ filter (neg null) L if null S; ! = post_msg1 S || do (post MSGS) $ filter (neg null) L ! otherwise; def BUF = ref ""; |