|
From: <ho...@us...> - 2004-02-04 00:34:28
|
Update of /cvsroot/ganc/ganc/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6513/src Modified Files: callbacks.c parser_stuff.c Log Message: Fixed 2 minor bugs: pressing 'x' in keypad printed an 'x' as opposed to a '*'. Capital 'E' didn't work for exponent as in '1E3'. Removed debug output that forgot to take out Index: callbacks.c =================================================================== RCS file: /cvsroot/ganc/ganc/src/callbacks.c,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** callbacks.c 3 Feb 2004 21:28:01 -0000 1.11 --- callbacks.c 4 Feb 2004 00:32:10 -0000 1.12 *************** *** 68,72 **** // convert text taken from labels into correct output ! if (!found && strcmp (text, "EE")==0 && ++found) strcpy (text, "E"); if (!found && strcmp (text, "1/x")==0 && ++found) strcpy (text, "^-1"); // add space to these ones --- 68,72 ---- // convert text taken from labels into correct output ! if (!found && strcmp (text, "EE")==0 && ++found) strcpy (text, "e"); if (!found && strcmp (text, "1/x")==0 && ++found) strcpy (text, "^-1"); // add space to these ones *************** *** 93,96 **** --- 93,97 ---- if (!found && strcmp (text, "x^y")==0 && ++found) strcpy (text, "^"); if (!found && strcmp (text, "x!")==0 && ++found) strcpy (text, "!"); + if (!found && strcmp (text, "x")==0 && ++found) strcpy (text, "*"); InsertText (text); *************** *** 110,119 **** void on_button_exe_clicked (GtkWidget *button, gpointer user_data) { - int ww, wh; - ExpressionReady (); - - gtk_window_get_size (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))), &ww, &wh); - printf ("%d, %d\n", ww, wh); } --- 111,115 ---- Index: parser_stuff.c =================================================================== RCS file: /cvsroot/ganc/ganc/src/parser_stuff.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** parser_stuff.c 20 Jan 2004 01:33:40 -0000 1.13 --- parser_stuff.c 4 Feb 2004 00:32:10 -0000 1.14 *************** *** 164,168 **** if (epos>pos) { // check if we have an exponent coming up (only for base 10) ! if (input[epos - 1]=='e' && GetSystemVariable (SYSTEMVAR_IBASE)==10 && (input[epos]=='+' || input[epos]=='-')) { ++epos; --- 164,169 ---- if (epos>pos) { // check if we have an exponent coming up (only for base 10) ! if ((input[epos - 1]=='e' || input[epos - 1]=='E') && ! GetSystemVariable (SYSTEMVAR_IBASE)==10 && (input[epos]=='+' || input[epos]=='-')) { ++epos; |