@@ -31,7 +31,7 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3131OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3232
3333
34- The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
34+ The software and related material is released as “NOMAS” (NOt MAnufacturer Supported).
3535
3636 1. Info is released to assist customers using, exploring and extending the product
3737 2. Do NOT contact the manufacturer with questions, seeking support, etc. regarding
@@ -81,7 +81,7 @@ void clear_regs();
8181
8282
8383// ==================================================
84- // == Util functions
84+ // == Util functions
8585// ==================================================
8686
8787
@@ -93,7 +93,7 @@ void beep(int freq, int dur) {
9393
9494
9595void make_screenshot () {
96- // Start click
96+ // Start click
9797 start_buzzer_freq (4400 ); sys_delay (10 ); stop_buzzer ();
9898 // Make screenshot - allow to report errors
9999 if ( create_screenshot (1 ) == 2 ) {
@@ -176,10 +176,10 @@ const int fm_disp_fns[] = {FM_DISP_NONE, FM_DISP_FIX, FM_DISP_SCI, FM_DISP_ENG,0
176176// Returns 1/0 whether it was/wasn't overflow (resp.)
177177// ix - index of first rounded digit
178178int round_string (char * s , int ix , char rounding_digit ) {
179-
179+
180180 if (rounding_digit + 5 <= '9' )
181181 return 0 ;
182-
182+
183183 for ( ; ix >=0 ; ix -- ) {
184184 if (s [ix ] == '.' )
185185 continue ; // Skip decimal point
@@ -216,7 +216,7 @@ void num_format(num_t * num, char *str, int len, int mode, int mode_digits) {
216216 // Terminate mantissa string
217217 char * mend = ep - 1 ; // Mantissa end
218218 char * mant = s + 1 ; // Mantissa string
219- // Ignore mantissa trailing zeros
219+ // Ignore mantissa trailing zeros
220220 while (ep > mant && mend [0 ] == '0' ) mend -- ;
221221 * (++ mend ) = 0 ;
222222
@@ -229,7 +229,7 @@ void num_format(num_t * num, char *str, int len, int mode, int mode_digits) {
229229 b = exp ;
230230 if (exp >= (- MAX_NEG_FILL + 1 )) {
231231 if (exp <= 0 ) // Number requires '0.' and zero padding after decimal point
232- b += 2 - exp + 1 ; // to at least one mantissa digit after padding zeros
232+ b += 2 - exp + 1 ; // to at least one mantissa digit after padding zeros
233233 if (ms ) b ++ ; // One place for sign
234234 isexp = b > len ; // Number cannot fit without exponent
235235 }
@@ -337,7 +337,7 @@ void disp_annun(int xpos, const char * txt) {
337337
338338
339339const char * ang_mode_ann [ANG_MODE_CNT ] = {"[DEG]" , "[RAD]" , "[GRAD]" };
340-
340+
341341void redraw_lcd () {
342342 char s [MAX_LINE_SIZE ];
343343 const int top_y_lines = lcd_lineHeight (t20 );
@@ -474,7 +474,7 @@ void add_edit_key(int key) {
474474
475475 case KEY_BSP :
476476 ed [-- len ] = 0 ;
477- if (len == 0 )
477+ if (len == 0 )
478478 cancel_edit (); // Leaving edit when removed last edited char
479479 break ;
480480
@@ -559,7 +559,7 @@ int run_fn(int key) {
559559 case KEY_STO : reg_by_ix (stack )[0 ] = stack [1 ]; stack_pop (); break ;
560560 case KEY_RCL : stack [0 ] = reg_by_ix (stack )[0 ]; break ;
561561 case KEY_RCL | FNSH : num_mul (& res , stack + 1 , stack ); stack_pop (); num_mul (stack ,& res ,& num_1_100 ); break ;
562-
562+
563563 case KEY_ADD : num_add (& res , stack + 1 , stack ); RES2 ; break ;
564564 case KEY_SUB : num_sub (& res , stack + 1 , stack ); RES2 ; break ;
565565 case KEY_MUL : num_mul (& res , stack + 1 , stack ); RES2 ; break ;
@@ -574,7 +574,7 @@ int run_fn(int key) {
574574 case KEY_SQRT | FNSH : num_mul (& res , stack , stack ); RES1 ; break ;
575575 case KEY_LOG | FNSH : num_exp10 (& res , stack ); RES1 ; break ;
576576 case KEY_LN | FNSH : num_exp (& res ,stack ); RES1 ; break ;
577-
577+
578578 case KEY_SIN : num_sin (stack , TO_RAD (& res , stack )); break ;
579579 case KEY_COS : num_cos (stack , TO_RAD (& res , stack )); break ;
580580 case KEY_TAN : num_tan (stack , TO_RAD (& res , stack )); break ;
@@ -618,7 +618,7 @@ int run_fn(int key) {
618618
619619void handle_fmenu (int key ) {
620620 if (!f_menu ) return ;
621-
621+
622622 if (f_menu_fns ) {
623623 int ix = key - KEY_F1 ;
624624 int fm_key = f_menu_fns [ix ];
@@ -692,7 +692,7 @@ void handle_key(int key) {
692692 switch (key ) {
693693 case KEY_0 :
694694 SET_ST (STAT_MENU );
695- //int ret =
695+ //int ret =
696696 handle_menu (& MID_MENU , MENU_RESET , 0 ); // App menu
697697 CLR_ST (STAT_MENU );
698698 wait_for_key_release (-1 );
@@ -701,7 +701,7 @@ void handle_key(int key) {
701701 case KEY_ENTER :
702702 if (edit )
703703 cancel_edit ();
704- stack_pop ();
704+ stack_pop ();
705705 break ;
706706
707707 case KEY_CHS : // MODES
@@ -746,7 +746,7 @@ void handle_key(int key) {
746746 if (edit )
747747 finish_edit ();
748748 else
749- stack_dup ();
749+ stack_dup ();
750750 break ;
751751
752752 case KEY_BSP :
@@ -821,7 +821,7 @@ void program_init() {
821821 num_from_string (& num_200_pi , "63.66197723675813430755350534900574" );
822822 // 1/100 (for %)
823823 num_from_string (& num_1_100 , "0.01" );
824- //
824+ //
825825 //num_from_string(&num_, "");
826826
827827
@@ -839,7 +839,7 @@ void program_init() {
839839
840840void program_main () {
841841 int key = 0 ;
842-
842+
843843 // Initialization
844844 program_init ();
845845 redraw_lcd ();
@@ -920,5 +920,7 @@ void program_main() {
920920}
921921
922922
923-
924-
923+ void _exit (int value )
924+ {
925+ while (1 ) ;
926+ }
0 commit comments