[q-lang-cvs] qcalc qcalc.q,1.184,1.185
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-25 11:31:22
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24083 Modified Files: qcalc.q Log Message: bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** qcalc.q 25 Nov 2007 05:35:10 -0000 1.184 --- qcalc.q 25 Nov 2007 11:31:14 -0000 1.185 *************** *** 1534,1541 **** change_case FLAG R S X = S if not FLAG or else any isupper R; ! = strcat $ zipwith (++) (map F Ws) Ds if all (eq F) Fs ! where Ws = words S, Ds = delims S, ! [F|Fs] = map case_changer $ words X; = S otherwise; --- 1534,1541 ---- change_case FLAG R S X = S if not FLAG or else any isupper R; ! = strcat $ zipwith (++) Ds (map F Ws) if all (eq F) Fs ! where (Ds,Ws) = unzip $ words S, ! [F|Fs] = map (case_changer.snd) $ init $ words X; = S otherwise; *************** *** 1545,1550 **** capitalize S = toupper (take 1 S)++drop 1 S; ! words S = regex "g" "[[:alnum:]]+" S (reg 0); ! delims S = regex "g" "[^[:alnum:]]" S (reg 0) ++ [""]; find_state _ _ _ --- 1545,1549 ---- capitalize S = toupper (take 1 S)++drop 1 S; ! words S = regex "g" "[[:alnum:]]+" S (regskip,reg 0) ++ [(regskip,"")]; find_state _ _ _ |