[DGD] Editor question

Felix A. Croes felix at dworkin.nl
Sat Feb 21 13:35:31 CET 1998


> This is a rather minor question, but I thought I'd throw it out there
> anyway.  Are there plans to incorporate line numbering into the on-line
> editor?  I use off-line editors for the bulk of my editing, but for those
> fixes that need to be done on the spot, I use 'ed'.  While it's an effective
> editor, the lack of automatic line numbering makes simple tasks somewhat
> arduous at times.  I hacked the code a while ago to do this, but I've since
> lost the changes due to all the patches.  It wasn't that big of a deal to do
> save dealing with the secondary buffers.  Anyway, it's a nit, but it would
> be incredibly nice to have.  Thoughts?

I generally add `#' at the end of a command if I want line numbers
displayed in output.  If you want this to be the default, the following
patch will do it:

*** dgd/src/ed/edcmd.c	Wed Aug  6 14:11:21 1997
--- dgd/src/ed/edcmd.c.new	Sat Feb 21 14:18:40 1998
***************
*** 850,855 ****
--- 850,856 ----
  	    int ltype, ret;
  
  	    cb->flags &= ~(CB_EXCL | CB_NUMBER | CB_LIST);
+ 	    cb->flags |= CB_NUMBER;
  
  	    cb->a_addr = -1;
  	    cb->a_buffer = 0;

Regards,
Dworkin



More information about the DGD mailing list