/* Copyright Per Bothner 1987. Read the file Q-INFO */
#include "stdio.h"
String *
StrRange(m1, m2) register struct Mark *m1, *m2;
 /* Return the string within the range m1..m2.
  * Does not check that m1->segment and m2->segment are in the same chain,
  * or that m1 <= m2.
  * Does not Release m1 or m2.
  */
  { register String *s = (String*)malloc(sizeof(String));
    s->begin.cur = m1->cur;
    s->end.cur = m2->cur;
    if (m1->segment == m2->segment)
       ???
    else
      {
	s->begin.segment = StrAddLink(m1->segment);
	s->end.segment = StrAddLink(m2->segment);
      }
    s->begin.next = m1->next; m1->next = &s->begin;
    s->end.next = m2->next; m2->next = &s->end;
    s->refCount = 1;
    s->kind = ???;
    s->prev = StrNoPrev; s->next = EmpString;
    return (String*)(AddType(s+1, TString));
  }
