You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(36) |
Sep
(44) |
Oct
(25) |
Nov
(2) |
Dec
(5) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(9) |
Jun
|
Jul
(4) |
Aug
(8) |
Sep
(16) |
Oct
|
Nov
(2) |
Dec
(28) |
| 2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(33) |
Jul
(5) |
Aug
(7) |
Sep
(9) |
Oct
(31) |
Nov
(25) |
Dec
(21) |
| 2011 |
Jan
(2) |
Feb
(12) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jorge G. <cl...@us...> - 2007-12-18 12:47:33
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv6805 Modified Files: grtaps.c Log Message: bold font in trace mode Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** grtaps.c 30 Sep 2007 00:35:42 -0000 1.33 --- grtaps.c 18 Dec 2007 12:47:29 -0000 1.34 *************** *** 31,34 **** --- 31,35 ---- #else #define HanderaCoord( x ) ( x ) + #define HanderaAdjustFont( font ) ( font ) #endif *************** *** 46,49 **** --- 47,52 ---- #include "funcs.h" + #define BOLDRES 1 + static Int16 trackSelected = 0; static double lastParam = 0.0; *************** *** 531,534 **** --- 534,544 ---- } else { + FontID oldfont; + #ifdef SONY_SDK + if (gHrMode == hrSony) + oldfont = HRFntSetFont(gHrLibRefNum, hrStdFont+BOLDRES); + else + #endif + oldfont = FntSetFont(HanderaAdjustFont(stdFont+BOLDRES)); gadget_bounds(FrmGetActiveForm(), graphGadget, &natbounds, &stdbounds); *************** *** 572,575 **** --- 582,591 ---- oldangle = math_rad_to_user(lastParam); } + #ifdef SONY_SDK + if(gHrMode == hrSony) + HRFntSetFont(gHrLibRefNum, oldfont); + else + #endif + FntSetFont(oldfont); } } *************** *** 833,836 **** --- 849,859 ---- /* Is tracking checked? */ else if (CtlGetValue(GetObjectPtr(btnGraphTrack))) { + FontID oldfont; + #ifdef SONY_SDK + if (gHrMode == hrSony) + oldfont = HRFntSetFont(gHrLibRefNum, hrStdFont+BOLDRES); + else + #endif + oldfont = FntSetFont(HanderaAdjustFont(stdFont+BOLDRES)); if (graphPrefs.functype == graph_func) grtaps_track_func(x, y, &natbounds, &stdbounds); *************** *** 839,842 **** --- 862,871 ---- else if (graphPrefs.functype == graph_param) grtaps_track_param(x, y, &natbounds, &stdbounds); + #ifdef SONY_SDK + if(gHrMode == hrSony) + HRFntSetFont(gHrLibRefNum, oldfont); + else + #endif + FntSetFont(oldfont); } else /* Move the graph */ |
|
From: Jorge G. <cl...@us...> - 2007-12-18 09:12:36
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15765 Modified Files: result.c Log Message: bold font in result area Index: result.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/result.c,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** result.c 23 Sep 2006 23:40:30 -0000 1.32 --- result.c 18 Dec 2007 09:12:31 -0000 1.33 *************** *** 49,52 **** --- 49,54 ---- #include "mtxedit.h" + #define BOLDRES 1 + /* This handle gets freed from the PalmOS at the end, * or it would have to be called from some other routine than AppHandler */ *************** *** 622,629 **** #ifdef SONY_SDK if (gHrMode == hrSony) ! oldfont = HRFntSetFont(gHrLibRefNum, hrLargeFont); else #endif ! oldfont = FntSetFont(HanderaAdjustFont(largeFont)); chrwidth = FntCharsWidth(text,StrLen(text)); if (chrwidth + 5*gSonyFactor < resultBounds.extent.x) --- 624,631 ---- #ifdef SONY_SDK if (gHrMode == hrSony) ! oldfont = HRFntSetFont(gHrLibRefNum, hrLargeFont+5*BOLDRES); else #endif ! oldfont = FntSetFont(HanderaAdjustFont(largeFont+5*BOLDRES)); chrwidth = FntCharsWidth(text,StrLen(text)); if (chrwidth + 5*gSonyFactor < resultBounds.extent.x) *************** *** 670,677 **** #ifdef SONY_SDK if (gHrMode == hrSony) ! oldfont = HRFntSetFont(gHrLibRefNum, hrLargeFont); else #endif ! oldfont = FntSetFont(HanderaAdjustFont(largeFont)); textwidth=2; --- 672,679 ---- #ifdef SONY_SDK if (gHrMode == hrSony) ! oldfont = HRFntSetFont(gHrLibRefNum, hrLargeFont+5*BOLDRES); else #endif ! oldfont = FntSetFont(HanderaAdjustFont(largeFont+5*BOLDRES)); textwidth=2; *************** *** 686,693 **** #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrLargeFont); else #endif ! FntSetFont(HanderaAdjustFont(largeFont)); textwidth += FntCharsWidth(base, expon-base); if (fin) break; --- 688,695 ---- #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrLargeFont+5*BOLDRES); else #endif ! FntSetFont(HanderaAdjustFont(largeFont+5*BOLDRES)); textwidth += FntCharsWidth(base, expon-base); if (fin) break; *************** *** 695,702 **** #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrStdFont); else #endif ! FntSetFont(HanderaAdjustFont(stdFont)); if (expon[0] == '(') { expon++; --- 697,704 ---- #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrStdFont+BOLDRES); else #endif ! FntSetFont(HanderaAdjustFont(stdFont+BOLDRES)); if (expon[0] == '(') { expon++; *************** *** 738,745 **** #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrLargeFont); else #endif ! FntSetFont(HanderaAdjustFont(largeFont)); clie_drawchars(base, expon - base, width - textwidth, 2); textwidth -= FntCharsWidth(base, expon - base); --- 740,747 ---- #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrLargeFont+5*BOLDRES); else #endif ! FntSetFont(HanderaAdjustFont(largeFont+5*BOLDRES)); clie_drawchars(base, expon - base, width - textwidth, 2); textwidth -= FntCharsWidth(base, expon - base); *************** *** 748,755 **** #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrStdFont); else #endif ! FntSetFont(HanderaAdjustFont(stdFont)); if (expon[0] == '(') { expon++; --- 750,757 ---- #ifdef SONY_SDK if (gHrMode == hrSony) ! HRFntSetFont(gHrLibRefNum, hrStdFont+BOLDRES); else #endif ! FntSetFont(HanderaAdjustFont(stdFont+BOLDRES)); if (expon[0] == '(') { expon++; |
|
From: Jorge G. <cl...@us...> - 2007-12-18 09:11:29
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv15295 Modified Files: grtaps.c Log Message: bold font in tracing mode Index: grtaps.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** grtaps.c 30 Sep 2007 00:35:42 -0000 1.33 --- grtaps.c 18 Dec 2007 09:11:25 -0000 1.34 *************** *** 46,49 **** --- 46,51 ---- #include "funcs.h" + #define BOLDRES 1 + static Int16 trackSelected = 0; static double lastParam = 0.0; *************** *** 531,534 **** --- 533,543 ---- } else { + FontID oldfont; + #ifdef SONY_SDK + if (gHrMode == hrSony) + oldfont = HRFntSetFont(gHrLibRefNum, hrStdFont+BOLDRES); + else + #endif + oldfont = FntSetFont(HanderaAdjustFont(stdFont+BOLDRES)); gadget_bounds(FrmGetActiveForm(), graphGadget, &natbounds, &stdbounds); *************** *** 572,575 **** --- 581,590 ---- oldangle = math_rad_to_user(lastParam); } + #ifdef SONY_SDK + if(gHrMode == hrSony) + HRFntSetFont(gHrLibRefNum, oldfont); + else + #endif + FntSetFont(oldfont); } } *************** *** 833,836 **** --- 848,858 ---- /* Is tracking checked? */ else if (CtlGetValue(GetObjectPtr(btnGraphTrack))) { + FontID oldfont; + #ifdef SONY_SDK + if (gHrMode == hrSony) + oldfont = HRFntSetFont(gHrLibRefNum, hrStdFont+BOLDRES); + else + #endif + oldfont = FntSetFont(HanderaAdjustFont(stdFont+BOLDRES)); if (graphPrefs.functype == graph_func) grtaps_track_func(x, y, &natbounds, &stdbounds); *************** *** 839,842 **** --- 861,870 ---- else if (graphPrefs.functype == graph_param) grtaps_track_param(x, y, &natbounds, &stdbounds); + #ifdef SONY_SDK + if(gHrMode == hrSony) + HRFntSetFont(gHrLibRefNum, oldfont); + else + #endif + FntSetFont(oldfont); } else /* Move the graph */ |
|
From: Jorge G. <cl...@us...> - 2007-12-18 09:06:42
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv13063 Modified Files: calc.c graph.c graph.h graph.rcp.in grsetup.c Log Message: graph area set to 140(+1)x140(+1) in lowRes and 280(+1)x280(+1) in hiRes. fixed bugs in graphic mode Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** calc.c 29 Dec 2006 02:17:37 -0000 1.39 --- calc.c 18 Dec 2007 09:06:36 -0000 1.40 *************** *** 99,103 **** #ifdef SONY_SDK if(gHrMode == hrSony) { ! natbounds->topLeft.x *= 2; natbounds->topLeft.y *= 2; natbounds->extent.x *= 2; --- 99,103 ---- #ifdef SONY_SDK if(gHrMode == hrSony) { ! natbounds->topLeft.x = natbounds->topLeft.x*2 +2; natbounds->topLeft.y *= 2; natbounds->extent.x *= 2; *************** *** 111,115 **** --- 111,118 ---- WinScaleRectangle(natbounds); WinSetCoordinateSystem(save); + natbounds->topLeft.x+=2; } + natbounds->extent.x++; + natbounds->extent.y++; } Index: graph.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** graph.h 10 Nov 2006 04:12:56 -0000 1.8 --- graph.h 18 Dec 2007 09:06:37 -0000 1.9 *************** *** 43,47 **** void graph_setcolor(Int16 funcnum) GRAPH; void graph_unsetcolor(void) GRAPH; - void graph_redrawform(void) GRAPH; extern Tgraph_curves graphCurves[MAX_GRFUNCS]; --- 43,46 ---- Index: grsetup.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grsetup.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** grsetup.c 26 May 2007 14:52:10 -0000 1.33 --- grsetup.c 18 Dec 2007 09:06:37 -0000 1.34 *************** *** 883,886 **** --- 883,888 ---- Char *picktitle; + graph_setcolor(-2); + picktitle = MemPtrNew(MAX_RSCLEN); SysStringByIndex(grColorElem, row, picktitle, MAX_RSCLEN); *************** *** 889,895 **** graphPrefs.colors[row] = col; } ! graph_redrawform(); ! FrmDrawForm(frm); ! draw_grType(frm); MemPtrFree(picktitle); handled = true; --- 891,896 ---- graphPrefs.colors[row] = col; } ! ! graph_unsetcolor(); MemPtrFree(picktitle); handled = true; Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** graph.rcp.in 10 Nov 2006 04:12:56 -0000 1.37 --- graph.rcp.in 18 Dec 2007 09:06:37 -0000 1.38 *************** *** 142,146 **** PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 16 140+2 140+3) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) --- 142,146 ---- PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 17 140 140) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** graph.c 16 Dec 2007 12:37:17 -0000 1.61 --- graph.c 18 Dec 2007 09:06:37 -0000 1.62 *************** *** 470,476 **** tmpx = graph_xscr2gr(bounds->topLeft.x); tmpx = ceil(tmpx/xscale)*xscale; ! for (;tmpx < graphPrefs.xmax;tmpx+=xscale) { x = graph_xgr2scr(tmpx); ! for (tmpy=ystart;tmpy < graphPrefs.ymax;tmpy+=yscale) { y = graph_ygr2scr(tmpy); if (gHrMode != hrNone) { --- 470,476 ---- tmpx = graph_xscr2gr(bounds->topLeft.x); tmpx = ceil(tmpx/xscale)*xscale; ! for (;tmpx <= graphPrefs.xmax;tmpx+=xscale) { x = graph_xgr2scr(tmpx); ! for (tmpy=ystart;tmpy <= graphPrefs.ymax;tmpy+=yscale) { y = graph_ygr2scr(tmpy); if (gHrMode != hrNone) { *************** *** 555,559 **** { RectangleType natbounds; // bounds in native coordinates - RectangleType clip; // clip rectangle in standard coordinates Coord x, y; #ifdef SUPPORT_DIA --- 555,558 ---- *************** *** 588,599 **** clie_eraserectangle(&natbounds,0); - /* Only (re)draw grid when whole graph gadget is inside the - clip rectangle */ - WinGetClip(&clip); - if (graphPrefs.grEnable[7] /* grid drawing enabled */ && - clip.topLeft.y <= stdbounds.topLeft.y && - clip.topLeft.y + clip.extent.y >= stdbounds.topLeft.y + stdbounds.extent.y) - graph_grid(&natbounds); - /* Draw axes */ x = graph_xgr2scr(0.0); --- 587,590 ---- *************** *** 609,612 **** --- 600,607 ---- graph_unsetcolor(); + + /*Draw grid */ + if (graphPrefs.grEnable[7]) + graph_grid(&natbounds); /* Draw axes labels */ *************** *** 1207,1216 **** return handled; } - - void graph_redrawform(void) - { - FormType *frm = FrmGetFormPtr(frmGraph); - FrmDrawForm(frm); - graph_init_screen(frm, graphGadget); - } --- 1202,1204 ---- |
|
From: Jorge G. <cl...@us...> - 2007-12-16 13:02:56
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv22945 Modified Files: calc.c graph.rcp.in Log Message: graph area set to 140(+1)x140(+1) in lowRes and 280(+1)x280(+1) in hiRes Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** calc.c 29 Dec 2006 02:17:37 -0000 1.39 --- calc.c 16 Dec 2007 13:02:41 -0000 1.40 *************** *** 112,115 **** --- 112,117 ---- WinSetCoordinateSystem(save); } + natbounds->extent.x++; + natbounds->extent.y++; } Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** graph.rcp.in 10 Nov 2006 04:12:56 -0000 1.37 --- graph.rcp.in 16 Dec 2007 13:02:41 -0000 1.38 *************** *** 142,146 **** PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 16 140+2 140+3) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) --- 142,146 ---- PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 17 140 140) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) |
|
From: Jorge G. <cl...@us...> - 2007-12-16 12:56:01
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv19842/easycalc Modified Files: calc.c graph.rcp.in Log Message: graph area set to 140(+)x140(+1) in lowRes and 280(+1)x280(+1) in hiRes Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** calc.c 29 Dec 2006 02:17:37 -0000 1.39 --- calc.c 16 Dec 2007 12:55:55 -0000 1.40 *************** *** 112,115 **** --- 112,117 ---- WinSetCoordinateSystem(save); } + natbounds->extent.x++; + natbounds->extent.y++; } Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** graph.rcp.in 10 Nov 2006 04:12:56 -0000 1.37 --- graph.rcp.in 16 Dec 2007 12:55:55 -0000 1.38 *************** *** 142,146 **** PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 16 140+2 140+3) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) --- 142,146 ---- PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 17 140 140) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) |
|
From: Jorge G. <cl...@us...> - 2007-12-16 12:37:20
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv12825/easycalc Modified Files: graph.c Log Message: fixed bugs Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** graph.c 30 Sep 2007 00:35:42 -0000 1.60 --- graph.c 16 Dec 2007 12:37:17 -0000 1.61 *************** *** 488,491 **** --- 488,495 ---- } + #ifndef SUPPORT_DIA + #define HanderaCoord(x) (x) + #endif + static void graph_draw_axes_labels(RectangleType *stdbounds) GRAPH; static void *************** *** 794,797 **** --- 798,803 ---- if (err) continue; + /* Lookup variables to speed up execution */ + stack_fix_variables(stack); graphCurves[i].stack2 = stack; } *************** *** 895,899 **** return; if (graphState.funcnum>=MAX_GRFUNCS) { - graph_draw_axes_labels(&stdbounds); graph_draw_stop(); return; --- 901,904 ---- *************** *** 918,922 **** } graphState.position += i; ! if (graphState.position > ScrPrefs.xmax) { /* (ScrPrefs.xmax-ScrPrefs.xmin) */ graphState.position = 0; graphState.funcnum++; --- 923,930 ---- } graphState.position += i; ! if (graphState.position > ScrPrefs.xmax) { ! /* Curve finished */ ! /* Redraw labels. They may have been overwritten */ ! graph_draw_axes_labels(&stdbounds); graphState.position = 0; graphState.funcnum++; *************** *** 944,947 **** --- 952,957 ---- if (start >= graphState.stop) { /* Reached end of drawing area/parameters */ + /* Redraw labels. They may have been overwritten */ + graph_draw_axes_labels(&stdbounds); graphState.position = 0; graphState.funcnum++; |
|
From: Jorge G. <cl...@us...> - 2007-12-16 12:25:04
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7738/easycalc Modified Files: grprefs.c grprefs.h Log Message: added 'axis' function Index: grprefs.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** grprefs.h 28 Dec 2006 03:16:17 -0000 1.14 --- grprefs.h 16 Dec 2007 12:24:50 -0000 1.15 *************** *** 81,83 **** --- 81,86 ---- extern TscrPrefs ScrPrefs; extern IndexedColorType graphColors[]; + + CError set_axis(Functype *func,CodeStack *stack) GRAPH; + #endif Index: grprefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** grprefs.c 10 Aug 2007 18:54:06 -0000 1.28 --- grprefs.c 16 Dec 2007 12:24:50 -0000 1.29 *************** *** 622,623 **** --- 622,691 ---- return handled; } + + CError + set_axis(Functype *func,CodeStack *stack) + { + List *lst,*lst2; + float xscale=graphPrefs.xscale; + float yscale=graphPrefs.yscale; + int i; + CError err; + + if (func->paramcount > 2) + return c_badargcount; + else if (func->paramcount == 2) { + err = stack_get_val(stack,&lst2,list); + if (err) + return err; + if (lst2->size!=2){ + MemPtrFree(lst2); + return c_baddim; + } + if (lst2->item[0].imag!=0.0 || lst2->item[1].imag!=0.0){ + MemPtrFree(lst2); + return c_badarg; + } + xscale=lst2->item[0].real; + yscale=lst2->item[1].real; + MemPtrFree(lst2); + if(xscale<=0.0 || yscale<=0.0) return c_badarg; + } + + err = stack_get_val(stack,&lst,list); + if (err) + return err; + + if (lst->size!=4){ + MemPtrFree(lst); + return c_baddim; + } + + for (i=0;i<4;i++) + if (lst->item[i].imag != 0.0){ + MemPtrFree(lst); + return c_badarg; + } + + if(lst->item[0].real>=lst->item[1].real || lst->item[2].real>=lst->item[3].real){ + MemPtrFree(lst); + return c_badarg; + } + + graphPrefs.xmin=lst->item[0].real; + graphPrefs.xmax=lst->item[1].real; + graphPrefs.ymin=lst->item[2].real; + graphPrefs.ymax=lst->item[3].real; + if (func->paramcount == 2) { + graphPrefs.xscale=xscale; + graphPrefs.yscale=yscale; + graphPrefs.grEnable[7] = true; + } + else + graphPrefs.grEnable[7] = false; + + + err = stack_add_val(stack,&lst,list); + MemPtrFree(lst); + + return err; + } \ No newline at end of file |
|
From: Jorge G. <cl...@us...> - 2007-12-16 12:25:02
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7738/easycalc/mlib Modified Files: konvert.c Log Message: added 'axis' function Index: konvert.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/konvert.c,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** konvert.c 4 Oct 2006 00:39:17 -0000 1.67 --- konvert.c 16 Dec 2007 12:24:51 -0000 1.68 *************** *** 44,47 **** --- 44,53 ---- #include "chkstack.h" + #ifdef GRAPHS_ENABLED + + #include "grprefs.h" + + #endif + #ifdef SPECFUN_ENABLED *************** *** 174,177 **** --- 180,186 ---- {"nextprime", MATH_NEXTPRIME, math_primes, 1, true, true}, {"prevprime", MATH_PREVPRIME, math_primes, 1, true, true}, + #ifdef GRAPHS_ENABLED + {"axis",0,set_axis,0}, + #endif #ifdef SPECFUN_ENABLED {"fzero",MATH_FZERO,integ_fsolve,0}, *************** *** 316,320 **** {"%",4,FUNC_MOD}, {" xor ",3,FUNC_XOR}, ! {"¥",3,FUNC_XOR}, {"\2",6,FUNC_CONJ}, /* The apostrophe, it shouldn't be recognized * as a normal operator */ --- 325,329 ---- {"%",4,FUNC_MOD}, {" xor ",3,FUNC_XOR}, ! {"",3,FUNC_XOR}, {"\2",6,FUNC_CONJ}, /* The apostrophe, it shouldn't be recognized * as a normal operator */ |
|
From: Jorge G. <cl...@us...> - 2007-12-16 12:10:55
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv7486 Modified Files: calc.c graph.rcp.in Log Message: graph area set to 140(+1)x140(+1) in lowRes and 280(+1)x280(+1) in hiRes Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** calc.c 29 Dec 2006 02:17:37 -0000 1.39 --- calc.c 16 Dec 2007 12:10:49 -0000 1.40 *************** *** 112,115 **** --- 112,117 ---- WinSetCoordinateSystem(save); } + natbounds->extent.x++; + natbounds->extent.y++; } Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** graph.rcp.in 10 Nov 2006 04:12:56 -0000 1.37 --- graph.rcp.in 16 Dec 2007 12:10:49 -0000 1.38 *************** *** 142,146 **** PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 16 140+2 140+3) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) --- 142,146 ---- PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 17 140 140) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) |
|
From: Jorge G. <cl...@us...> - 2007-12-15 19:22:59
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv427 Modified Files: calc.c graph.rcp.in Log Message: graph area set to 140(+1)x140(+1) in lowRes and 280(+1)x280(+1) in hiRes Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** calc.c 29 Dec 2006 02:17:37 -0000 1.39 --- calc.c 15 Dec 2007 19:22:55 -0000 1.40 *************** *** 101,106 **** natbounds->topLeft.x *= 2; natbounds->topLeft.y *= 2; ! natbounds->extent.x *= 2; ! natbounds->extent.y *= 2; } #endif --- 101,108 ---- natbounds->topLeft.x *= 2; natbounds->topLeft.y *= 2; ! natbounds->extent.x = natbounds->extent.x*2 - 1; ! natbounds->extent.y = natbounds->extent.y*2 - 1; ! //stdbounds->extent.x--; ! stdbounds->extent.y--; } #endif *************** *** 111,114 **** --- 113,120 ---- WinScaleRectangle(natbounds); WinSetCoordinateSystem(save); + natbounds->extent.x--; + natbounds->extent.y--; + //stdbounds->extent.x--; + stdbounds->extent.y--; } } Index: graph.rcp.in =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.rcp.in,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** graph.rcp.in 10 Nov 2006 04:12:56 -0000 1.37 --- graph.rcp.in 15 Dec 2007 19:22:55 -0000 1.38 *************** *** 142,146 **** PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 16 140+2 140+3) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) --- 142,146 ---- PUSHBUTTON "G" ID btnGraph AT (PREVRIGHT+1 1 10 12) GROUP 1 ! GADGET ID graphGadget AT (1 17 140+1 140+1) SELECTORTRIGGER "C " ID btnGraphCalc AT (147 22 10 12) |
|
From: Jorge G. <cl...@us...> - 2007-12-15 13:26:00
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv18221 Modified Files: fp.c Log Message: fixed bug Index: fp.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/fp.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** fp.c 17 Aug 2007 20:02:52 -0000 1.16 --- fp.c 15 Dec 2007 13:25:56 -0000 1.17 *************** *** 259,263 **** *strP++ = '0'; } ! *strP = '\0'; } if (dispPrefs.stripZeros) { --- 259,263 ---- *strP++ = '0'; } ! *strP++ = '\0'; } if (dispPrefs.stripZeros) { |
|
From: Jorge G. <cl...@us...> - 2007-12-14 17:45:06
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv8162 Modified Files: grprefs.c Log Message: fixed bug Index: grprefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** grprefs.c 7 Dec 2007 02:01:06 -0000 1.29 --- grprefs.c 14 Dec 2007 17:45:00 -0000 1.30 *************** *** 627,631 **** { List *lst,*lst2; ! float xscale,yscale; int i; CError err; --- 627,632 ---- { List *lst,*lst2; ! float xscale=graphPrefs.xscale; ! float yscale=graphPrefs.yscale; int i; CError err; *************** *** 648,651 **** --- 649,653 ---- yscale=lst2->item[1].real; MemPtrFree(lst2); + if(xscale<=0.0 || yscale<=0.0) return c_badarg; } |
|
From: Jorge G. <cl...@us...> - 2007-12-14 16:56:54
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv14803 Modified Files: graph.c Log Message: Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** graph.c 4 Dec 2007 16:01:17 -0000 1.62 --- graph.c 14 Dec 2007 16:56:44 -0000 1.63 *************** *** 798,801 **** --- 798,803 ---- if (err) continue; + /* Lookup variables to speed up execution */ + stack_fix_variables(stack); graphCurves[i].stack2 = stack; } |
|
From: Jorge G. <cl...@us...> - 2007-12-07 02:01:14
|
Update of /cvsroot/easycalc/easycalc/manual In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26054/manual Modified Files: EasyCalcManual.pdb manual.html Log Message: added "axis" function Index: manual.html =================================================================== RCS file: /cvsroot/easycalc/easycalc/manual/manual.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** manual.html 3 Sep 2007 02:06:50 -0000 1.2 --- manual.html 7 Dec 2007 02:01:07 -0000 1.3 *************** *** 867,873 **** </p> <p> ! <tt>concat(x:y)</tt> - concatenates two lists.<br /> ! <tt>concat([1:2]:[3:4:5])<br /> ! ans> [1:2:3:4:5]</tt> </p> <p> --- 867,873 ---- </p> <p> ! <tt>concat(x:y[:z:...])</tt> - concatenates two or more lists.<br /> ! <tt>concat([1:2]:[3:4:5]:[6:7])<br /> ! ans> [1:2:3:4:5:6:7]</tt> </p> <p> *************** *** 1849,1853 **** matching pairs).<br /> <tt>zip(f:x:y)</tt> - applies f to each maching pair of x and y.<br/> ! <tt>concat(x:y)</tt> - concatenates two lists.<br /> <tt>repeat(x:a:b)</tt> - will repeat a list's elements. a means how often to repeat, b means how large parts (0 for full list) to repeat.<br /> --- 1849,1853 ---- matching pairs).<br /> <tt>zip(f:x:y)</tt> - applies f to each maching pair of x and y.<br/> ! <tt>concat(x:y[:z:...])</tt> - concatenates two or more lists.<br /> <tt>repeat(x:a:b)</tt> - will repeat a list's elements. a means how often to repeat, b means how large parts (0 for full list) to repeat.<br /> *************** *** 2025,2029 **** the appropriate expression. Test must return a positive integer ('true') or zero ('false' ).<br /> ! <tt>unset(name)</tt> - clears function or variable 'name' from memory<br /> <tt>defparamn(x)</tt> - <strong>DO NOT USE</strong>. Sets the parameter name to something other than 'x'. Some functions (e.q. most of the q<something> --- 2025,2030 ---- the appropriate expression. Test must return a positive integer ('true') or zero ('false' ).<br /> ! <tt>unset(name{:names})</tt> - clears functions and variables from memory. Returns the number of functions and variables cleared<br /> ! <tt>axis([xmin:xmax:ymin:ymax]{:[xscale:yscale]})</tt> - sets scaling for the x and y axes on the graph mode.<br /> <tt>defparamn(x)</tt> - <strong>DO NOT USE</strong>. Sets the parameter name to something other than 'x'. Some functions (e.q. most of the q<something> *************** *** 2221,2225 **** Jorge Gil (cluny at users.sourceforge.net)<br /> Michael Schierl (schierlm at users.sourceforge.net)<br /> ! Recent inprovemens of code since 1.23 </p> <p> --- 2222,2226 ---- Jorge Gil (cluny at users.sourceforge.net)<br /> Michael Schierl (schierlm at users.sourceforge.net)<br /> ! Recent inprovements of code since 1.23 </p> <p> Index: EasyCalcManual.pdb =================================================================== RCS file: /cvsroot/easycalc/easycalc/manual/EasyCalcManual.pdb,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsHDxCLS and /tmp/cvszURwsZ differ |
|
From: Jorge G. <cl...@us...> - 2007-12-07 02:01:14
|
Update of /cvsroot/easycalc/easycalc/mlib In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26054/mlib Modified Files: konvert.c Log Message: added "axis" function Index: konvert.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/mlib/konvert.c,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** konvert.c 7 Nov 2007 01:48:59 -0000 1.68 --- konvert.c 7 Dec 2007 02:01:07 -0000 1.69 *************** *** 44,47 **** --- 44,53 ---- #include "chkstack.h" + #ifdef GRAPHS_ENABLED + + #include "grprefs.h" + + #endif + #ifdef SPECFUN_ENABLED *************** *** 174,177 **** --- 180,186 ---- {"nextprime", MATH_NEXTPRIME, math_primes, 1, true, true}, {"prevprime", MATH_PREVPRIME, math_primes, 1, true, true}, + #ifdef GRAPHS_ENABLED + {"axis",0,set_axis,0}, + #endif #ifdef SPECFUN_ENABLED {"fzero",MATH_FZERO,integ_fsolve,0}, |
|
From: Jorge G. <cl...@us...> - 2007-12-07 02:01:14
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv26054 Modified Files: grprefs.c grprefs.h Log Message: added "axis" function Index: grprefs.h =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** grprefs.h 28 Dec 2006 03:16:17 -0000 1.14 --- grprefs.h 7 Dec 2007 02:01:06 -0000 1.15 *************** *** 81,83 **** --- 81,86 ---- extern TscrPrefs ScrPrefs; extern IndexedColorType graphColors[]; + + CError set_axis(Functype *func,CodeStack *stack) GRAPH; + #endif Index: grprefs.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/grprefs.c,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** grprefs.c 10 Aug 2007 18:54:06 -0000 1.28 --- grprefs.c 7 Dec 2007 02:01:06 -0000 1.29 *************** *** 622,623 **** --- 622,689 ---- return handled; } + + CError + set_axis(Functype *func,CodeStack *stack) + { + List *lst,*lst2; + float xscale,yscale; + int i; + CError err; + + if (func->paramcount > 2) + return c_badargcount; + else if (func->paramcount == 2) { + err = stack_get_val(stack,&lst2,list); + if (err) + return err; + if (lst2->size!=2){ + MemPtrFree(lst2); + return c_baddim; + } + if (lst2->item[0].imag!=0.0 || lst2->item[1].imag!=0.0){ + MemPtrFree(lst2); + return c_badarg; + } + xscale=lst2->item[0].real; + yscale=lst2->item[1].real; + MemPtrFree(lst2); + } + + err = stack_get_val(stack,&lst,list); + if (err) + return err; + + if (lst->size!=4){ + MemPtrFree(lst); + return c_baddim; + } + + for (i=0;i<4;i++) + if (lst->item[i].imag != 0.0){ + MemPtrFree(lst); + return c_badarg; + } + + if(lst->item[0].real>=lst->item[1].real || lst->item[2].real>=lst->item[3].real){ + MemPtrFree(lst); + return c_badarg; + } + + graphPrefs.xmin=lst->item[0].real; + graphPrefs.xmax=lst->item[1].real; + graphPrefs.ymin=lst->item[2].real; + graphPrefs.ymax=lst->item[3].real; + if (func->paramcount == 2) { + graphPrefs.xscale=xscale; + graphPrefs.yscale=yscale; + graphPrefs.grEnable[7] = true; + } + else + graphPrefs.grEnable[7] = false; + + + err = stack_add_val(stack,&lst,list); + MemPtrFree(lst); + + return err; + } \ No newline at end of file |
|
From: Jorge G. <cl...@us...> - 2007-12-04 16:01:26
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv2387 Modified Files: graph.c Log Message: Index: graph.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/graph.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** graph.c 30 Sep 2007 01:08:09 -0000 1.61 --- graph.c 4 Dec 2007 16:01:17 -0000 1.62 *************** *** 488,491 **** --- 488,495 ---- } + #ifndef SUPPORT_DIA + #define HanderaCoord(x) (x) + #endif + static void graph_draw_axes_labels(RectangleType *stdbounds) GRAPH; static void |
|
From: Ton v. O. <tvo...@us...> - 2007-11-07 01:49:08
|
Update of /cvsroot/easycalc/easycalc
In directory sc8-pr-cvs17:/tmp/cvs-serv32446
Modified Files:
calc.rcp.in main.c
Log Message:
Changed XOR symbold from 0xA5 to 0x88 (a small ^).
Changed the button labels for 'Clr' and 'ans' to 'CLR' and 'ANS' for
better readability.
These changes suggested by Mark (resonat at f-m dot fm).
Index: calc.rcp.in
===================================================================
RCS file: /cvsroot/easycalc/easycalc/calc.rcp.in,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** calc.rcp.in 16 Oct 2006 18:58:37 -0000 1.111
--- calc.rcp.in 7 Nov 2007 01:48:59 -0000 1.112
***************
*** 444,448 ****
POPUPLIST ID histListPopup histList
! BUTTON "Clr" ID btnMainClear AT (134 60 22 14)
BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1
BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1
--- 444,448 ----
POPUPLIST ID histListPopup histList
! BUTTON "CLR" ID btnMainClear AT (134 60 22 14)
BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1
BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1
***************
*** 469,473 ****
BUTTON "|" ID btnMainOr AT (105 120 20 15)
! BUTTON "¥" ID btnMainXor AT (55 140 20 15)
BUTTON "<<" ID btnMainShl AT (80 140 20 15)
BUTTON ">>" ID btnMainShr AT (105 140 20 15)
--- 469,473 ----
BUTTON "|" ID btnMainOr AT (105 120 20 15)
! BUTTON "" ID btnMainXor AT (55 140 20 15)
BUTTON "<<" ID btnMainShl AT (80 140 20 15)
BUTTON ">>" ID btnMainShr AT (105 140 20 15)
***************
*** 527,531 ****
SELECTORTRIGGER "S" ID btnMainSel AT (148 43 11 10)
! BUTTON "Clr" ID btnMainClear AT (134 60 22 14)
BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1
BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1
--- 527,531 ----
SELECTORTRIGGER "S" ID btnMainSel AT (148 43 11 10)
! BUTTON "CLR" ID btnMainClear AT (134 60 22 14)
BUTTON "/" ID btnMainDivide AT (PREVLEFT 75 22 14) FONT 1
BUTTON "*" ID btnMainMult AT (PREVLEFT 90 22 14) FONT 1
***************
*** 551,555 ****
BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
! BUTTON "ans" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12)
BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
--- 551,555 ----
BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
! BUTTON "ANS" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12)
BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
***************
*** 668,672 ****
BUTTON ":" ID btnMainColn AT (PREVRIGHT+4 145 8 14)
! BUTTON "Clr" ID btnMainClear AT (134 60 22 14)
BUTTON "/" ID btnMainDivide AT (134 75 22 14) FONT 1
BUTTON "*" ID btnMainMult AT (134 90 22 14) FONT 1
--- 668,672 ----
BUTTON ":" ID btnMainColn AT (PREVRIGHT+4 145 8 14)
! BUTTON "CLR" ID btnMainClear AT (134 60 22 14)
BUTTON "/" ID btnMainDivide AT (134 75 22 14) FONT 1
BUTTON "*" ID btnMainMult AT (134 90 22 14) FONT 1
***************
*** 692,696 ****
BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
! BUTTON "ans" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12)
BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
--- 692,696 ----
BUTTON "Exp" ID btnMainEE AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
! BUTTON "ANS" ID btnMainAns AT (75 PREVBOTTOM+2 PREVWIDTH 12)
BUTTON "(" ID btnMainOpBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
BUTTON ")" ID btnMainClBr AT (PREVRIGHT+1 PREVTOP PREVWIDTH PREVHEIGHT)
***************
*** 739,744 ****
POPUPLIST ID histListPopup histList
! BUTTON "Clr" ID btnMainClear AT (5 60 20 15)
! BUTTON "ans" ID btnMainAns AT (30 60 20 15)
BUTTON "(" ID btnMainOpBr AT (5 80 20 15)
BUTTON ")" ID btnMainClBr AT (30 80 20 15)
--- 739,744 ----
POPUPLIST ID histListPopup histList
! BUTTON "CLR" ID btnMainClear AT (5 60 20 15)
! BUTTON "ANS" ID btnMainAns AT (30 60 20 15)
BUTTON "(" ID btnMainOpBr AT (5 80 20 15)
BUTTON ")" ID btnMainClBr AT (30 80 20 15)
Index: main.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/main.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** main.c 12 Feb 2007 10:00:29 -0000 1.71
--- main.c 7 Nov 2007 01:48:59 -0000 1.72
***************
*** 282,286 ****
{btnMainAnd,"&",true},
{btnMainOr,"|",true},
! {btnMainXor,"¥",true},
{btnMainShl,"<<",true},
{btnMainShr,">>",true},
--- 282,286 ----
{btnMainAnd,"&",true},
{btnMainOr,"|",true},
! {btnMainXor,"",true},
{btnMainShl,"<<",true},
{btnMainShr,">>",true},
|
|
From: Ton v. O. <tvo...@us...> - 2007-11-07 01:49:07
|
Update of /cvsroot/easycalc/easycalc/mlib
In directory sc8-pr-cvs17:/tmp/cvs-serv32446/mlib
Modified Files:
konvert.c
Log Message:
Changed XOR symbold from 0xA5 to 0x88 (a small ^).
Changed the button labels for 'Clr' and 'ans' to 'CLR' and 'ANS' for
better readability.
These changes suggested by Mark (resonat at f-m dot fm).
Index: konvert.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/mlib/konvert.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** konvert.c 4 Oct 2006 00:39:17 -0000 1.67
--- konvert.c 7 Nov 2007 01:48:59 -0000 1.68
***************
*** 316,320 ****
{"%",4,FUNC_MOD},
{" xor ",3,FUNC_XOR},
! {"¥",3,FUNC_XOR},
{"\2",6,FUNC_CONJ}, /* The apostrophe, it shouldn't be recognized
* as a normal operator */
--- 316,320 ----
{"%",4,FUNC_MOD},
{" xor ",3,FUNC_XOR},
! {"",3,FUNC_XOR},
{"\2",6,FUNC_CONJ}, /* The apostrophe, it shouldn't be recognized
* as a normal operator */
|
|
From: Ton v. O. <tvo...@us...> - 2007-09-30 01:08:13
|
Update of /cvsroot/easycalc/easycalc
In directory sc8-pr-cvs17:/tmp/cvs-serv12676
Modified Files:
graph.c
Log Message:
Redraw axes labels after each curve.
Index: graph.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/graph.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** graph.c 30 Sep 2007 00:35:42 -0000 1.60
--- graph.c 30 Sep 2007 01:08:09 -0000 1.61
***************
*** 895,899 ****
return;
if (graphState.funcnum>=MAX_GRFUNCS) {
- graph_draw_axes_labels(&stdbounds);
graph_draw_stop();
return;
--- 895,898 ----
***************
*** 918,922 ****
}
graphState.position += i;
! if (graphState.position > ScrPrefs.xmax) { /* (ScrPrefs.xmax-ScrPrefs.xmin) */
graphState.position = 0;
graphState.funcnum++;
--- 917,924 ----
}
graphState.position += i;
! if (graphState.position > ScrPrefs.xmax) {
! /* Curve finished */
! /* Redraw labels. They may have been overwritten */
! graph_draw_axes_labels(&stdbounds);
graphState.position = 0;
graphState.funcnum++;
***************
*** 944,947 ****
--- 946,951 ----
if (start >= graphState.stop) {
/* Reached end of drawing area/parameters */
+ /* Redraw labels. They may have been overwritten */
+ graph_draw_axes_labels(&stdbounds);
graphState.position = 0;
graphState.funcnum++;
|
|
From: Ton v. O. <tvo...@us...> - 2007-09-30 00:35:50
|
Update of /cvsroot/easycalc/easycalc
In directory sc8-pr-cvs17:/tmp/cvs-serv32155
Modified Files:
graph.c grtaps.c grtaps.h
Log Message:
Redraw axes labels after all graphs are plotted. The graphs may have covered
the labels. Choose apropriate drawing mode in grtaps_print_val to achieve this.
Index: graph.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/graph.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** graph.c 29 Jul 2007 01:31:18 -0000 1.59
--- graph.c 30 Sep 2007 00:35:42 -0000 1.60
***************
*** 73,76 ****
--- 73,78 ----
Tgraph_curves graphCurves[MAX_GRFUNCS];
+ static RectangleType stdbounds; // bounds in standard coordinates
+
/***********************************************************************
*
***************
*** 486,489 ****
--- 488,548 ----
}
+ static void graph_draw_axes_labels(RectangleType *stdbounds) GRAPH;
+ static void
+ graph_draw_axes_labels(RectangleType *stdbounds)
+ {
+ Coord x, y, xstd, ystd;
+
+ x = graph_xgr2scr(0.0);
+ y = graph_ygr2scr(0.0);
+
+ if (gHrMode == hrPalm) {
+ UInt16 save = WinSetCoordinateSystem(kCoordinatesNative);
+ xstd = WinUnscaleCoord(x, true);
+ ystd = WinUnscaleCoord(y, true);
+ WinSetCoordinateSystem(save);
+ }
+ else {
+ xstd = x / gSonyFactor;
+ ystd = y / gSonyFactor;
+ }
+ if (graphPrefs.grEnable[6] && graphPrefs.grEnable[8]) { /* axes and labels enabled */
+ Coord dy1 = HanderaCoord(1);
+ Coord dy10 = HanderaCoord(10);
+ Coord dy15 = HanderaCoord(15);
+ Coord dy26 = HanderaCoord(26);
+
+ grtaps_print_val("y>",graphPrefs.ymin,
+ xstd + 1,
+ stdbounds->topLeft.y + stdbounds->extent.y - dy10,
+ stdbounds->topLeft.x,
+ stdbounds->topLeft.x + stdbounds->extent.x,
+ align_left, winOverlay);
+ grtaps_print_val("y<",graphPrefs.ymax,
+ xstd + 1,
+ stdbounds->topLeft.y - dy1,
+ stdbounds->topLeft.x,
+ stdbounds->topLeft.x + stdbounds->extent.x,
+ align_left, winOverlay);
+ ystd -= dy1;
+ if (ystd < stdbounds->topLeft.y + dy15)
+ ystd = stdbounds->topLeft.y + dy15;
+ if (ystd > stdbounds->topLeft.y + stdbounds->extent.y - dy26)
+ ystd = stdbounds->topLeft.y + stdbounds->extent.y - dy26;
+ grtaps_print_val("x>",graphPrefs.xmin,
+ stdbounds->topLeft.x + dy1,
+ ystd,
+ stdbounds->topLeft.x,
+ stdbounds->topLeft.x + stdbounds->extent.x,
+ align_left, winOverlay);
+ grtaps_print_val("x<",graphPrefs.xmax,
+ stdbounds->topLeft.x + stdbounds->extent.x,
+ ystd,
+ stdbounds->topLeft.x,
+ stdbounds->topLeft.x + stdbounds->extent.x,
+ align_right, winOverlay);
+ }
+ }
+
/* Initializes Graph gadget and shows the basic grid */
static void graph_init_screen(FormPtr frm,UInt16 graphId) GRAPH;
***************
*** 491,498 ****
graph_init_screen(FormPtr frm,UInt16 graphId)
{
- RectangleType stdbounds; // bounds in standard coordinates
RectangleType natbounds; // bounds in native coordinates
RectangleType clip; // clip rectangle in standard coordinates
! Coord x, y, xstd, ystd;
#ifdef SUPPORT_DIA
Coord dx, dy;
--- 550,556 ----
graph_init_screen(FormPtr frm,UInt16 graphId)
{
RectangleType natbounds; // bounds in native coordinates
RectangleType clip; // clip rectangle in standard coordinates
! Coord x, y;
#ifdef SUPPORT_DIA
Coord dx, dy;
***************
*** 549,598 ****
/* Draw axes labels */
! if (gHrMode == hrPalm) {
! UInt16 save = WinSetCoordinateSystem(kCoordinatesNative);
! xstd = WinUnscaleCoord(x, true);
! ystd = WinUnscaleCoord(y, true);
! WinSetCoordinateSystem(save);
! }
! else {
! xstd = x / gSonyFactor;
! ystd = y / gSonyFactor;
! }
! if (graphPrefs.grEnable[6] && graphPrefs.grEnable[8]) { /* axes and labels enabled */
! Coord dy1 = HanderaCoord(1);
! Coord dy10 = HanderaCoord(10);
! Coord dy15 = HanderaCoord(15);
! Coord dy26 = HanderaCoord(26);
!
! grtaps_print_val("y>",graphPrefs.ymin,
! xstd + 1,
! stdbounds.topLeft.y + stdbounds.extent.y - dy10,
! stdbounds.topLeft.x,
! stdbounds.topLeft.x + stdbounds.extent.x,
! align_left);
! grtaps_print_val("y<",graphPrefs.ymax,
! xstd + 1,
! stdbounds.topLeft.y - dy1,
! stdbounds.topLeft.x,
! stdbounds.topLeft.x + stdbounds.extent.x,
! align_left);
! ystd -= dy1;
! if (ystd < stdbounds.topLeft.y + dy15)
! ystd = stdbounds.topLeft.y + dy15;
! if (ystd > stdbounds.topLeft.y + stdbounds.extent.y - dy26)
! ystd = stdbounds.topLeft.y + stdbounds.extent.y - dy26;
! grtaps_print_val("x>",graphPrefs.xmin,
! stdbounds.topLeft.x + dy1,
! ystd,
! stdbounds.topLeft.x,
! stdbounds.topLeft.x + stdbounds.extent.x,
! align_left);
! grtaps_print_val("x<",graphPrefs.xmax,
! stdbounds.topLeft.x + stdbounds.extent.x,
! ystd,
! stdbounds.topLeft.x,
! stdbounds.topLeft.x + stdbounds.extent.x,
! align_right);
! }
}
--- 607,611 ----
/* Draw axes labels */
! graph_draw_axes_labels(&stdbounds);
}
***************
*** 882,885 ****
--- 895,899 ----
return;
if (graphState.funcnum>=MAX_GRFUNCS) {
+ graph_draw_axes_labels(&stdbounds);
graph_draw_stop();
return;
Index: grtaps.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/grtaps.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** grtaps.c 10 Aug 2007 18:54:06 -0000 1.32
--- grtaps.c 30 Sep 2007 00:35:42 -0000 1.33
***************
*** 379,382 ****
--- 379,383 ----
* xmin,xmax - keep text between xmin and xmax
* align - alignment w.r.t. coordinates
+ * mode - drawing mode
*
* RETURN: Nothing
***************
*** 385,400 ****
void
grtaps_print_val(char *name, double value, Coord x, Coord y, Coord xmin, Coord xmax,
! Ttxtalign align)
{
char text[MAX_FP_NUMBER+10];
- // TdispPrefs oldprefs;
Char *numtxt;
Coord txtwidth;
#ifdef SUPPORT_DIA
FntSetFont(HanderaAdjustFont(FntGetFont()));
#endif
-
- // oldprefs = fp_set_prefs(grNumPrefs);
StrCopy(text,name);
--- 386,399 ----
void
grtaps_print_val(char *name, double value, Coord x, Coord y, Coord xmin, Coord xmax,
! Ttxtalign align, WinDrawOperation mode)
{
char text[MAX_FP_NUMBER+10];
Char *numtxt;
Coord txtwidth;
+ WinDrawOperation oldmode;
#ifdef SUPPORT_DIA
FntSetFont(HanderaAdjustFont(FntGetFont()));
#endif
StrCopy(text,name);
***************
*** 413,420 ****
if ((x + txtwidth) > xmax)
x = xmax - txtwidth;
! WinInvertChars(text, StrLen(text), x, y);
}
-
- // fp_set_prefs(oldprefs);
}
--- 412,419 ----
if ((x + txtwidth) > xmax)
x = xmax - txtwidth;
! oldmode = WinSetDrawMode(mode);
! WinPaintChars(text, StrLen(text), x, y);
! WinSetDrawMode(oldmode);
}
}
***************
*** 446,450 ****
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_left);
grtaps_print_val("fi:", angle, bounds->topLeft.x + bounds->extent.x,
--- 445,449 ----
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_left, winInvert);
grtaps_print_val("fi:", angle, bounds->topLeft.x + bounds->extent.x,
***************
*** 452,456 ****
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_right);
}
--- 451,455 ----
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_right, winInvert);
}
***************
*** 468,472 ****
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_left);
}
--- 467,471 ----
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_left, winInvert);
}
***************
*** 486,495 ****
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_left);
grtaps_print_val("y:", realy, bounds->topLeft.x + bounds->extent.x, y,
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_right);
}
--- 485,494 ----
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_left, winInvert);
grtaps_print_val("y:", realy, bounds->topLeft.x + bounds->extent.x, y,
bounds->topLeft.x,
bounds->topLeft.x + bounds->extent.x,
! align_right, winInvert);
}
Index: grtaps.h
===================================================================
RCS file: /cvsroot/easycalc/easycalc/grtaps.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** grtaps.h 29 Jul 2007 01:31:18 -0000 1.8
--- grtaps.h 30 Sep 2007 00:35:42 -0000 1.9
***************
*** 42,46 ****
Boolean grtaps_track_but(void) GRAPH;
void grtaps_print_val(char *name, double value,
! Coord x, Coord y, Coord xmin, Coord xmax, Ttxtalign align) GRAPH;
void grtaps_track_manual(double value,TtrackAction action) GRAPH;
void grtaps_track_pause(void) GRAPH;
--- 42,47 ----
Boolean grtaps_track_but(void) GRAPH;
void grtaps_print_val(char *name, double value,
! Coord x, Coord y, Coord xmin, Coord xmax,
! Ttxtalign align, WinDrawOperation mode) GRAPH;
void grtaps_track_manual(double value,TtrackAction action) GRAPH;
void grtaps_track_pause(void) GRAPH;
|
|
From: Ton v. O. <tvo...@us...> - 2007-09-28 01:23:32
|
Update of /cvsroot/easycalc/easycalc
In directory sc8-pr-cvs17:/tmp/cvs-serv6359
Modified Files:
Makefile.in calc.def solver.c
Added Files:
dbutil.c
Log Message:
Set backup attribute on calc_xxx.prc and all databases.
Use a single function for opening the databases (dbutil.[ch]).
Index: calc.def
===================================================================
RCS file: /cvsroot/easycalc/easycalc/calc.def,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** calc.def 4 Oct 2006 00:39:17 -0000 1.7
--- calc.def 28 Sep 2007 01:23:25 -0000 1.8
***************
*** 1,2 ****
! application { "EasyCalc" OpCl stack=0x2000 }
multiple code { "mlib" "basefunc" "iface" "specfun" "graph" "newfunc" "parser" "matfunc" }
--- 1,2 ----
! application { "EasyCalc" OpCl backup stack=0x2000 }
multiple code { "mlib" "basefunc" "iface" "specfun" "graph" "newfunc" "parser" "matfunc" }
Index: Makefile.in
===================================================================
RCS file: /cvsroot/easycalc/easycalc/Makefile.in,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** Makefile.in 1 Oct 2006 22:38:12 -0000 1.35
--- Makefile.in 28 Sep 2007 01:23:25 -0000 1.36
***************
*** 36,40 ****
ROFILE = $(TARGET).ro
! CALC_OBJS = calc.o about.o clie.o clie-util.o chkstack.o \
mlib/calcDB.o mlib/fl_num.o mlib/fp.o mlib/funcs.o \
mlib/guess.o mlib/konvert.o mlib/mathem.o mlib/stack.o prefs.o \
--- 36,40 ----
ROFILE = $(TARGET).ro
! CALC_OBJS = calc.o about.o clie.o clie-util.o chkstack.o dbutil.o \
mlib/calcDB.o mlib/fl_num.o mlib/fp.o mlib/funcs.o \
mlib/guess.o mlib/konvert.o mlib/mathem.o mlib/stack.o prefs.o \
--- NEW FILE: dbutil.c ---
/*
* $Id: dbutil.c,v 1.1 2007/09/28 01:23:25 tvoverbe Exp $
*
* Scientific Calculator for Palms.
* Copyright (C) 1999,2000,2007 Ondrej Palkovsky
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* You can contact me at 'on...@pe...'.
*/
#include <PalmOS.h>
#include "defuns.h"
static Err
db_open_byid(LocalID dbid, DmOpenRef *dbref)
{
*dbref = DmOpenDatabase(CARDNO, dbid, dmModeReadWrite);
if (*dbref)
return DmGetLastErr();
return 0;
}
/***********************************************************************
*
* FUNCTION: open_db
*
* DESCRIPTION: Open a database for EasyCalc. Creates a new one,
* if the database does not exist or if the old database
* has the wrong version
*
* PARAMETERS:
*
* RETURN: 0 - on success
* other - on error
*
***********************************************************************/
Int16 open_db(const Char *name, UInt16 dbversion, UInt32 crid, UInt32 dbtype,
DmOpenRef *dbref)
{
Err err;
LocalID dbid;
UInt16 version;
UInt32 creator;
UInt32 type;
UInt16 attr = 0;
dbid = DmFindDatabase(CARDNO, name);
if (dbid) { /* Database exists */
DmDatabaseInfo(CARDNO, dbid,
NULL, /* name */
&attr, /* attrib */
&version, /* version */
NULL, /* crDate */
NULL, /* modDate */
NULL, /* bckUpDate */
NULL, /* modNum */
NULL, /* appinfoID */
NULL, /* sortInfoID */
&type, /* Type */
&creator); /* Creator */
if (version == dbversion && creator == crid && type == dbtype) {
if ((attr & dmHdrAttrBackup) == 0) {
attr |= dmHdrAttrBackup;
DmSetDatabaseInfo(CARDNO, dbid,
NULL, /* name */
&attr, /* attrib */
NULL, /* version */
NULL, /* crDate */
NULL, /* modDate */
NULL, /* bckupDate */
NULL, /* modNum */
NULL, /* appinfoID */
NULL, /* sortInfoID */
NULL, /* Type */
NULL); /* Creator */
}
return db_open_byid(dbid, dbref);
}
/* Database exists, but with incorrect version */
err = DmDeleteDatabase(CARDNO, dbid);
if (err)
return err;
}
/* Database doesn't exist or old version */
err = DmCreateDatabase(CARDNO, name, crid, dbtype, false);
if (err)
return err;
dbid = DmFindDatabase(CARDNO, name);
version = dbversion;
attr |= dmHdrAttrBackup;
DmSetDatabaseInfo(CARDNO, dbid,
NULL, /* name */
&attr, /* attrib */
&version, /* version */
NULL, /* crDate */
NULL, /* modDate */
NULL, /* bckUpDate */
NULL, /* modNum */
NULL, /* appinfoID */
NULL, /* sortInfoID */
NULL, /* Type */
NULL); /* Creator */
return db_open_byid(dbid, dbref);
}
Index: solver.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/solver.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** solver.c 16 Sep 2006 23:30:58 -0000 1.14
--- solver.c 28 Sep 2007 01:23:25 -0000 1.15
***************
*** 41,44 ****
--- 41,45 ----
#include "mathem.h"
#include "prefs.h"
+ #include "dbutil.h"
#ifdef HANDERA_SDK
***************
*** 551,565 ****
}
-
- static Err slv_db_open_byid(LocalID dbid) IFACE;
- static Err
- slv_db_open_byid(LocalID dbid)
- {
- gDB=DmOpenDatabase(CARDNO,dbid,dmModeReadWrite);
- if (gDB)
- return DmGetLastErr();
- return 0;
- }
-
/***********************************************************************
*
--- 552,555 ----
***************
*** 577,632 ****
slv_db_open()
{
! Err err;
! LocalID dbid;
! UInt16 version;
! UInt32 creator;
! UInt32 type;
!
! dbid=DmFindDatabase(CARDNO,SOLVERDBNAME);
! if (dbid) { /* Database exists */
! DmDatabaseInfo(CARDNO,dbid,
! NULL, /* name */
! NULL, /* attrib */
! &version, /* version */
! NULL, /* crDate */
! NULL, /* modDate */
! NULL, /* bckUpDate */
! NULL, /* modNum */
! NULL, /* appinfoID */
! NULL, /* sortInfoID */
! &type, /* Type */
! &creator); /* Creator */
!
! if (version==SOLVER_DB_VERSION && creator==LIB_ID && \
! type==SOLVERDBTYPE)
! return slv_db_open_byid(dbid);
!
! /* Database exists, but with uncorrect version */
! err=DmDeleteDatabase(CARDNO,dbid);
! if (err)
! return err;
! }
!
! /* Database doesn't exist or old version */
! err=DmCreateDatabase(CARDNO,SOLVERDBNAME,LIB_ID,SOLVERDBTYPE,false);
! if (err)
! return err;
!
! dbid=DmFindDatabase(CARDNO,SOLVERDBNAME);
!
! version=SOLVER_DB_VERSION;
! DmSetDatabaseInfo(CARDNO,dbid,
! NULL, /* name */
! NULL, /* attrib */
! &version, /* version */
! NULL, /* crDate */
! NULL, /* modDate */
! NULL, /* bckUpDate */
! NULL, /* modNum */
! NULL, /* appinfoID */
! NULL, /* sortInfoID */
! NULL, /* Type */
! NULL); /* Creator */
! return slv_db_open_byid(dbid);
}
--- 567,572 ----
slv_db_open()
{
! return open_db(SOLVERDBNAME, SOLVER_DB_VERSION, LIB_ID, SOLVERDBTYPE,
! &gDB);
}
|
|
From: Ton v. O. <tvo...@us...> - 2007-09-28 01:23:32
|
Update of /cvsroot/easycalc/easycalc/mlib
In directory sc8-pr-cvs17:/tmp/cvs-serv6359/mlib
Modified Files:
calcDB.c history.c
Log Message:
Set backup attribute on calc_xxx.prc and all databases.
Use a single function for opening the databases (dbutil.[ch]).
Index: history.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/mlib/history.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** history.c 12 Sep 2006 19:40:56 -0000 1.5
--- history.c 28 Sep 2007 01:23:25 -0000 1.6
***************
*** 32,35 ****
--- 32,36 ----
#include "history.h"
#include "display.h"
+ #include "dbutil.h"
static DmOpenRef dbRef;
***************
*** 229,242 ****
}
- static Err history_open_byid(LocalID dbid) MLIB;
- static Err
- history_open_byid(LocalID dbid)
- {
- dbRef=DmOpenDatabase(CARDNO,dbid,dmModeReadWrite);
- if (dbRef)
- return DmGetLastErr();
- return 0;
- }
-
/***********************************************************************
*
--- 230,233 ----
***************
*** 253,307 ****
history_open(void)
{
! Err err;
! LocalID dbid;
! UInt16 version;
! UInt32 creator;
! UInt32 type;
!
! dbid=DmFindDatabase(CARDNO,HISTORYDBNAME);
! if (dbid) { /* Database exists */
! DmDatabaseInfo(CARDNO,dbid,
! NULL, /* name */
! NULL, /* attrib */
! &version, /* version */
! NULL, /* crDate */
! NULL, /* modDate */
! NULL, /* bckUpDate */
! NULL, /* modNum */
! NULL, /* appinfoID */
! NULL, /* sortInfoID */
! &type, /* Type */
! &creator); /* Creator */
!
! if (version==HIST_DB_VERSION && creator==LIB_ID && type==DBTYPE)
! return history_open_byid(dbid);
!
! /* Database exists, but with uncorrect version */
! err=DmDeleteDatabase(CARDNO,dbid);
! if (err)
! return err;
! }
!
! /* Database doesn't exist or old version */
! err=DmCreateDatabase(CARDNO,HISTORYDBNAME,LIB_ID,DBTYPE,false);
! if (err)
! return err;
!
! dbid=DmFindDatabase(CARDNO,HISTORYDBNAME);
!
! version=HIST_DB_VERSION;
! DmSetDatabaseInfo(CARDNO,dbid,
! NULL, /* name */
! NULL, /* attrib */
! &version, /* version */
! NULL, /* crDate */
! NULL, /* modDate */
! NULL, /* bckUpDate */
! NULL, /* modNum */
! NULL, /* appinfoID */
! NULL, /* sortInfoID */
! NULL, /* Type */
! NULL); /* Creator */
! return history_open_byid(dbid);
}
--- 244,248 ----
history_open(void)
{
! return open_db(HISTORYDBNAME, HIST_DB_VERSION, LIB_ID, DBTYPE, &dbRef);
}
Index: calcDB.c
===================================================================
RCS file: /cvsroot/easycalc/easycalc/mlib/calcDB.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** calcDB.c 12 Sep 2006 19:40:56 -0000 1.11
--- calcDB.c 28 Sep 2007 01:23:25 -0000 1.12
***************
*** 32,35 ****
--- 32,36 ----
#include "calcDB.h"
#include "stack.h"
+ #include "dbutil.h"
static DmOpenRef gDB;
***************
*** 554,567 ****
}
- static Err db_open_byid(LocalID dbid) MLIB;
- static Err
- db_open_byid(LocalID dbid)
- {
- gDB=DmOpenDatabase(CARDNO,dbid,dmModeReadWrite);
- if (gDB)
- return DmGetLastErr();
- return 0;
- }
-
/***********************************************************************
*
--- 555,558 ----
***************
*** 582,636 ****
db_open()
{
! Err err;
! LocalID dbid;
! UInt16 version;
! UInt32 creator;
! UInt32 type;
!
! dbid=DmFindDatabase(CARDNO,DBNAME);
! if (dbid) { /* Database exists */
! DmDatabaseInfo(CARDNO,dbid,
! NULL, /* name */
! NULL, /* attrib */
! &version, /* version */
! NULL, /* crDate */
! NULL, /* modDate */
! NULL, /* bckUpDate */
! NULL, /* modNum */
! NULL, /* appinfoID */
! NULL, /* sortInfoID */
! &type, /* Type */
! &creator); /* Creator */
!
! if (version==DBVERSION && creator==LIB_ID && type==DBTYPE)
! return db_open_byid(dbid);
!
! /* Database exists, but with uncorrect version */
! err=DmDeleteDatabase(CARDNO,dbid);
! if (err)
! return err;
! }
!
! /* Database doesn't exist or old version */
! err=DmCreateDatabase(CARDNO,DBNAME,LIB_ID,DBTYPE,false);
! if (err)
! return err;
!
! dbid=DmFindDatabase(CARDNO,DBNAME);
!
! version=DBVERSION;
! DmSetDatabaseInfo(CARDNO,dbid,
! NULL, /* name */
! NULL, /* attrib */
! &version, /* version */
! NULL, /* crDate */
! NULL, /* modDate */
! NULL, /* bckUpDate */
! NULL, /* modNum */
! NULL, /* appinfoID */
! NULL, /* sortInfoID */
! NULL, /* Type */
! NULL); /* Creator */
! return db_open_byid(dbid);
}
--- 573,577 ----
db_open()
{
! return open_db(DBNAME, DBVERSION, LIB_ID, DBTYPE, &gDB);
}
|
|
From: Ton v. O. <tvo...@us...> - 2007-09-28 01:23:31
|
Update of /cvsroot/easycalc/easycalc/include
In directory sc8-pr-cvs17:/tmp/cvs-serv6359/include
Modified Files:
defuns.h
Added Files:
dbutil.h
Log Message:
Set backup attribute on calc_xxx.prc and all databases.
Use a single function for opening the databases (dbutil.[ch]).
--- NEW FILE: dbutil.h ---
/*
* $Id: dbutil.h,v 1.1 2007/09/28 01:23:25 tvoverbe Exp $
*
* Scientific Calculator for Palms.
* Copyright (C) 1999,2000,2007 Ondrej Palkovsky
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* You can contact me at 'on...@pe...'.
*/
#ifndef _DBUTIL_H_
#define _DBUTIL_H_
#include <PalmOS.h>
Int16 open_db(const Char *name, UInt16 dbversion, UInt32 crid, UInt32 dbtype,
DmOpenRef *dbref);
#endif
Index: defuns.h
===================================================================
RCS file: /cvsroot/easycalc/easycalc/include/defuns.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** defuns.h 28 Dec 2006 03:16:17 -0000 1.40
--- defuns.h 28 Sep 2007 01:23:25 -0000 1.41
***************
*** 32,47 ****
/* Application specific things */
! #define APP_ID 'OpCl'
! #define LIB_ID 'OpCl'
! #define DBNAME "CalcDB-OpCl"
#define HISTORYDBNAME "CalcDB-H-OpCl"
! #define SOLVERDBNAME "CalcDB-S-OpCl"
! #define DBTYPE 'Data'
! #define SOLVERDBTYPE 'Slvr'
! #define CARDNO 0
! #define DBVERSION 5
! #define HIST_DB_VERSION 6
! #define SOLVER_DB_VERSION 1
#define PREF_DEFAULT 0
--- 32,47 ----
/* Application specific things */
! #define APP_ID 'OpCl'
! #define LIB_ID 'OpCl'
! #define DBNAME "CalcDB-OpCl"
#define HISTORYDBNAME "CalcDB-H-OpCl"
! #define SOLVERDBNAME "CalcDB-S-OpCl"
! #define DBTYPE 'Data'
! #define SOLVERDBTYPE 'Slvr'
! #define CARDNO 0
! #define DBVERSION 5
! #define HIST_DB_VERSION 6
! #define SOLVER_DB_VERSION 1
#define PREF_DEFAULT 0
***************
*** 53,57 ****
/* Change this if you are changing contents of the preferences structure */
! #define PREF_VERSION 44
#define PREF_RES_VERSION 2
#define PREF_GRAPH_VERSION 5
--- 53,57 ----
/* Change this if you are changing contents of the preferences structure */
! #define PREF_VERSION 44
#define PREF_RES_VERSION 2
#define PREF_GRAPH_VERSION 5
***************
*** 62,74 ****
/* Maximum length of normal strings copied from tSTR */
#define MAX_RSCLEN 30
! #define MAX_RESULT 17
/* Rounding offset for reduce precision */
! #define ROUND_OFFSET 13
#define PRECISION_TO_ZERO 1E-12
/* konvert.c constants */
#define MAX_RPNSIZE 105
! #define MAX_OSTACK 45
#define NaN ((double)(3-3)/(3-3))
--- 62,74 ----
/* Maximum length of normal strings copied from tSTR */
#define MAX_RSCLEN 30
! #define MAX_RESULT 17
/* Rounding offset for reduce precision */
! #define ROUND_OFFSET 13
#define PRECISION_TO_ZERO 1E-12
/* konvert.c constants */
#define MAX_RPNSIZE 105
! #define MAX_OSTACK 45
#define NaN ((double)(3-3)/(3-3))
|