Diff for /freem/src/xecline.c between versions 1.18 and 1.19

version 1.18, 2025/04/29 18:46:17 version 1.19, 2025/04/30 14:41:03
Line 24 Line 24
  *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.   *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
  *   *
  *   $Log$   *   $Log$
    *   Revision 1.19  2025/04/30 14:41:03  snw
    *   Further debugger work
    *
  *   Revision 1.18  2025/04/29 18:46:17  snw   *   Revision 1.18  2025/04/29 18:46:17  snw
  *   Begin work on interactive debugger   *   Begin work on interactive debugger
  *   *
Line 244  int xecline(int typ) Line 247  int xecline(int typ)
 next_line:          /* entry point for next command line */  next_line:          /* entry point for next command line */
   
     if (debug_mode) {      if (debug_mode) {
         debug_mode = debugger ();          debug_mode = debugger (DEBENTRY_LINE, codptr);
     }      }
           
     job_set_status (pid, JSTAT_INTERPRETER);      job_set_status (pid, JSTAT_INTERPRETER);
Line 294  next_line:          /* entry point for n Line 297  next_line:          /* entry point for n
     codptr = code;      codptr = code;
   
 next_cmnd:          /* continue line entry point */  next_cmnd:          /* continue line entry point */
       if (debug_mode) {
           debug_mode = debugger (DEBENTRY_CMD, codptr);
       }
   
     if (sigint_in_for) goto for_quit;      if (sigint_in_for) goto for_quit;
           
     if (forsw && (forpost[forx][0] != '\0')) {      if (forsw && (forpost[forx][0] != '\0')) {
Line 2616  quit0: Line 2623  quit0:
             printf ("CHECK 03 (Stack PUSH)\r\n");              printf ("CHECK 03 (Stack PUSH)\r\n");
 #endif  #endif
   
               
             if (++nstx > NESTLEVLS) {              if (++nstx > NESTLEVLS) {
                 nstx--;                                  nstx--;                
                 merr_raise (STKOV);                  merr_raise (STKOV);
Line 2642  quit0: Line 2648  quit0:
             nestn[nstx] = 0;        /* no overring of routine */              nestn[nstx] = 0;        /* no overring of routine */
             nestr[nstx] = roucur - rouptr;  /* save roucur: only for $V(26) needed */              nestr[nstx] = roucur - rouptr;  /* save roucur: only for $V(26) needed */
             ztrap[nstx][0] = EOL;              ztrap[nstx][0] = EOL;
              
   
             forsw = TRUE;              forsw = TRUE;
             ftyp = 0;           /* no args is FOREVER */              ftyp = 0;           /* no args is FOREVER */
Line 6744  syn_evt_loop_bottom: Line 6750  syn_evt_loop_bottom:
     if (ch != ',' && merr () == OK) {       if (ch != ',' && merr () == OK) { 
         merr_raise (SPACER);          merr_raise (SPACER);
     }      }
     else if ((ierr <= OK) || (debug_mode == TRUE)) {      else if (ierr <= OK) {        
         if (debug_mode) goto direct_mode;  
         if (*++codptr != SP && *codptr != EOL) goto again;          if (*++codptr != SP && *codptr != EOL) goto again;
   
         merr_raise (ARGLIST);          merr_raise (ARGLIST);
Line 6787  err: Line 6792  err:
         }          }
     }      }
   
   
     if (merr () > OK ) {      if (merr () > OK ) {
   
         char er_buf[ERRLEN];          char er_buf[ERRLEN];
Line 6796  err: Line 6802  err:
         stcpy (er_buf, errmes[merr ()]);          stcpy (er_buf, errmes[merr ()]);
         stcnv_m2c (er_buf);          stcnv_m2c (er_buf);
   
   
           /*
           if (usermode == 1 && ztrap[nstx][0] == EOL && etrap[0] == '\0') {
               debug_mode = TRUE;
               debugger (DEBENTRY_ERROR, codptr);
           }
           */
   
           
 #if !defined(MSDOS)  #if !defined(MSDOS)
         logprintf (FM_LOG_DEBUG, "xecline:  interpreter error %d [%s]", ierr, er_buf);          logprintf (FM_LOG_DEBUG, "xecline:  interpreter error %d [%s]", ierr, er_buf);
 #endif  #endif
Line 7168  restart: Line 7183  restart:
                           
                           
             free (t_nsn);              free (t_nsn);
   
         }          }
   
   
Line 7229  restore: Line 7245  restore:
   
         goto next_cmnd;          goto next_cmnd;
     }      }
     else {  
        if (debug_mode) goto direct_mode;  
     }  
   
     if (libcall == TRUE) {             /* library mode: don't go to direct mode, just return */      if (libcall == TRUE) {             /* library mode: don't go to direct mode, just return */
         return merr ();          return merr ();

Removed from v.1.18  
changed lines
  Added in v.1.19


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>