c-----------------------------------------------------------------------
      subroutine do_macro(command,numc,cmds)
c-----------------------------------------------------------------------
c
c     Processes the NUMC of mind commands  given in the CMDS array without
c     any intervening display or redraw events.
c
      parameter (natom = 10000)
      parameter (nbond = 50000)
c
      character*(*) command
      character*80 string,form,cmds
      character*30 cha
      integer count
      logical display,line_dis,arrow_dis,arc_dis
c
      dimension inva(40),rea(40),cha(40),cmds(100)
c
      common/mol_num/numat,num(natom),co(3,natom),atrad(natom)
      common/string_labels/display(80),string(80),x_string(80),
     &                     y_string(80),angle(80),height(80),
     &                     len_string(80),next_string
      common/lines/line_dis(40),x1(40),y1(40),x2(40),y2(40),
     &            next_line,idash(40),iwid(40)
      common/heads/arrow_dis(40),xb(40),yb(40),xe(40),ye(40),
     &            next_head
      common/arcs/arc_dis(40),x1a(40),y1a(40),x2a(40),y2a(40),
     &            x3a(40),y3a(40),cx(40),cy(40),r(40),next_arc,
     &            idasha(40),iwida(40)
c
      if (numc.eq.0) return
      count=1
      do while(count.le.numc)
         command='  '
         if (cmds(count)(1:9).eq.'add label') then
            call freeread(cmds(count),nint,nrea,ncha,inva,rea,cha,form)
            display(next_string)=.true.
            x_string(next_string)=rea(1)
            y_string(next_string)=rea(2)
            angle(next_string)=rea(3)
            height(next_string)=rea(4)
            len_string(next_string)=inva(1)
            count=count+1
            string(next_string)=cmds(count)
            next_string=next_string+1
         else if (cmds(count)(1:8).eq.'add line') then
            call freeread(cmds(count),nint,nrea,ncha,inva,rea,cha,form)
            line_dis(next_line)=.true.
            x1(next_line) = rea(1)
            y1(next_line) = rea(2)
            x2(next_line) = rea(3)
            y2(next_line) = rea(4)
            idash(next_line) = inva(1)
            iwid(next_line) = inva(2)
            next_line=next_line+1
         else if (cmds(count)(1:9).eq.'add arrow') then
            call freeread(cmds(count),nint,nrea,ncha,inva,rea,cha,form)
            arrow_dis(next_head)=.true.
            xb(next_head)=rea(1)
            yb(next_head)=rea(2)
            xe(next_head)=rea(3)
            ye(next_head)=rea(4)
            next_head=next_head+1
         else if (cmds(count)(1:7).eq.'add arc') then
            arc_dis(next_arc)=.true.
            call freeread(cmds(count),nint,nrea,ncha,inva,rea,cha,form)
            x1a(next_arc)=rea(1)
            y1a(next_arc)=rea(2)
            x2a(next_arc)=rea(3)
            y2a(next_arc)=rea(4)
            x3a(next_arc)=rea(5)
            y3a(next_arc)=rea(6)
            count=count+1
            call freeread(cmds(count),nint,nrea,ncha,inva,rea,cha,form)
            cx(next_arc)=rea(1)
            cy(next_arc)=rea(2)
            r(next_arc)=rea(3)
            idasha(next_arc)=inva(1)
            iwida(next_arc)=inva(2)
            next_arc=next_arc+1
         else
            call parse_command(cmds(count),command,angx,angy,angz)
            if (command.eq.'TU') call rot_mol(co,numat,angx,angy,
     &                                                 angz,.true.)
         endif
         command='  '
         count=count+1
      enddo
      numc=0
      return
      end

