🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99455

Useful enhancement for etags

#99455
From: Rich Salz
Date: Thu, 13 Sep 1990 13:27
95 lines
2901 bytes
The following DIFF adds a new flag, "-s", to etags.  If this flag is given
it reads the list of files on standard input, rather than on the command
line.  This is very useful when running etags over a LARGE source tree:
	find . -type f -name '*.[cylh]' -print | etags

Please pass this along to the appropriate parties.
	/rich $alz

*** /nfs/papaya/source/emacs/dist/etc/etags.c	Thu Jun 23 08:45:37 1988
--- xetags.c	Thu Sep 13 09:12:58 1990
***************
*** 240,248 ****
--- 240,250 ----
       int	ac;
       char	*av[];
  {
+   char buff[200], *p, *strchr();
    char cmd[100];
    int i;
    int fflag = 0;
+   int listisonstdinflag = 0;
    char *this_file;
  #ifdef VMS
    char got_err;
***************
*** 274,279 ****
--- 276,284 ----
  	{
  	  switch(av[1][i])
  	    {
+ 	    case 's':
+ 	      listisonstdinflag = 1;
+ 	      break;
  #ifndef VMS  /* These options are useful only with ctags,
  		and VMS can't input them, so just omit them.  */
  	    case 'B':
***************
*** 337,349 ****
        ac--; av++;
      }

!   if (ac <= 1)
      {
      usage:
  #ifdef VMS
!       fprintf (stderr, "Usage: %s [-aetwvx] [-f outfile] file ...\n", progname);
  #else
!       fprintf (stderr, "Usage: %s [-BFaetuwvx] [-f outfile] file ...\n", progname);
  #endif
        exit(BAD);
      }
--- 342,354 ----
        ac--; av++;
      }

!   if (ac <= 1 && !listisonstdinflag)
      {
      usage:
  #ifdef VMS
!       fprintf (stderr, "Usage: %s [-aetwvx] [-f outfile] [-s|file...]\n", progname);
  #else
!       fprintf (stderr, "Usage: %s [-BFaetuwvx] [-f outfile] [-s|file...]\n", progname);
  #endif
        exit(BAD);
      }
***************
*** 385,393 ****
  	{
  	  this_file = massage_name (this_file);
  #else     
!   for (; file_num < ac; file_num++)
      {
!       this_file = av[file_num];
        if (1)
  	{
  #endif
--- 390,407 ----
  	{
  	  this_file = massage_name (this_file);
  #else     
!   for (; file_num < ac || listisonstdinflag; file_num++)
      {
!       if (listisonstdinflag)
! 	{
! 	  if (fgets(buff, sizeof buff, stdin) == NULL)
! 	    break;
! 	  if (p = strchr(buff, '\n'))
! 	    *p = '\0';
! 	  this_file = buff;
! 	}
!       else
! 	this_file = av[file_num];
        if (1)
  	{
  #endif
Technical Details
Message-ID: <9009140251.AA07697@apple-gunkies.ai.mit.edu>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!BBN.COM!rsalz

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,988355b33bcb439f,start
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-09-13 06:27:31 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!BBN.COM!rsalz
From: rsalz@BBN.COM (Rich Salz)
Newsgroups: gnu.emacs.bug
Subject: Useful enhancement for etags
Message-ID: <9009140251.AA07697@apple-gunkies.ai.mit.edu>
Date: 13 Sep 90 13:27:31 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 95
Posted: Thu Sep 13 14:27:31 1990