--- freem/src/xecline.c 2025/04/02 03:02:42 1.11 +++ freem/src/xecline.c 2025/04/10 01:24:39 1.13 @@ -1,5 +1,5 @@ /* - * $Id: xecline.c,v 1.11 2025/04/02 03:02:42 snw Exp $ + * $Id: xecline.c,v 1.13 2025/04/10 01:24:39 snw Exp $ * freem interpreter proper * * @@ -24,6 +24,12 @@ * along with FreeM. If not, see . * * $Log: xecline.c,v $ + * Revision 1.13 2025/04/10 01:24:39 snw + * Remove C++ style comments + * + * Revision 1.12 2025/04/09 19:52:02 snw + * Eliminate as many warnings as possible while building with -Wall + * * Revision 1.11 2025/04/02 03:02:42 snw * Stop requiring users to pass -e to fmadm when -u or -g are passed * @@ -904,8 +910,7 @@ set0: if (isalpha (vn[0]) && *(codptr + 1) == ':') { char sc_string[255]; - register int sci; - + codptr += 2; expr (NAME); @@ -941,8 +946,7 @@ set0: if (*++codptr != '=') { -/* SET A++ or SET A-- equivalent to SET A+=1 SET A-=1 currently disabled */ -//#ifdef NEVER + /* unary ++/-- */ if ((ch == '+' || ch == '-') && ch == *codptr) { codptr++; setop = ch; @@ -951,7 +955,6 @@ set0: goto set2; } -//#endif /* NEVER */ merr_raise (ASSIGNER); break; @@ -1037,7 +1040,9 @@ set2: if (new_and_set == TRUE) new_and_set = FALSE; if (new_object == TRUE) new_object = FALSE; +/* set1: +*/ if (*codptr != ',') break; if (*++codptr == '@') goto again; @@ -1601,7 +1606,7 @@ set10: } if (stcat (tmp2, &tmp3[arg4]) == 0) { - merr_raise (M56); //JPW + merr_raise (M56); /* snw */ goto err; } @@ -2380,7 +2385,6 @@ s_end: #ifdef DEBUG_NEWSTACK printf ("EXTRINSIC\r\n"); #endif - //printf (" extr_types[%d] = '%d'\r\n", nstx, extr_types[nstx]); if (*codptr == EOL || *codptr == SP) { #ifdef DEBUG_NEWSTACK @@ -4005,8 +4009,9 @@ off3: goto set2; } +/* post_new: - +*/ ch = nstx; while (nestc[ch] == FOR) ch--; /* FOR does not define a NEW level */ @@ -5095,15 +5100,11 @@ open_socket: #endif if (nestc[nstx] == BREAK) { -// printf ("nestc[nstx] was BREAK\r\n"); if (repQUIT) continue; merr_raise (OK - CTRLB); goto zgo; /*cont. single step */ } -// else { -// printf ("nestc[nstx] was _not_ BREAK\r\n"); -// } if (nestc[nstx] == FOR) { @@ -5679,9 +5680,6 @@ zgo: } case ZWRITE: - - -zwrite: { short k; char w_tmp[512]; @@ -5805,7 +5803,6 @@ zwritep: expr (NAME); - //if (varnam[0] == '^') merr_raise (GLOBER); if (merr () > OK) goto err; codptr++; @@ -6586,15 +6583,15 @@ evthandler: /* for event hand /* run the next iteration of GTK's event loop */ - //TODO: replace with libXt event loop - //gtk_main_iteration_do (TRUE); + /* TODO: replace with libXt event loop */ + /* gtk_main_iteration_do (TRUE); */ /* dequeue any events */ evt_count = mwapi_dequeue_events (syn_handlers); if (evt_count) { /* write them out */ - //printf ("event handlers = '%s'\r\n", syn_handlers); + /* printf ("event handlers = '%s'\r\n", syn_handlers); */ syn_event_entry_nstx = nstx; @@ -7039,7 +7036,7 @@ restart: DSW &= ~BIT0; /* enable ECHO */ - // print here + /* print here */ { char *t_rtn; char *t_nsn = (char *) malloc (STRLEN * sizeof (char)); @@ -7377,17 +7374,12 @@ direct_mode: #endif if (merr () > OK) goto err; - - - // printf ("zbflag = %d\r\n", zbflag); if (code[0] == EOL && zbflag && nestc[nstx] == BREAK) { - //printf ("cont single step\r\n"); debug_mode = TRUE; merr_raise (OK - CTRLB); - //printf ("ierr now '%d'\r\n", ierr); goto zgo; } /* single step */ } @@ -7453,7 +7445,7 @@ void rbuf_dump(void) for (i = 0; i < NO_OF_RBUF; i++) { - sprintf (flgs, ""); + flgs[0] = '\0'; if (ages[i] == 0) { sprintf (rnam, "---------");