/* file strseg.c */

#if !defined(COMPILE_ENVIRONMENT)
#include <gp/stdcenvf.h> /* std compile environment for functions */
#endif

boolean stranded_segment(struct PRON2 *pron)
/*****************************************************************/
/* determines is there is a segment with no syllabic association */
/*****************************************************************/
{char *proc = "stranded_segment";
 boolean stranded_seg = F;
 int seg_syl[MAX_SYMBS_IN_STR+1], nsegs, iseg, isyl;
db_enter_msg(proc,1); /* debug only */
 nsegs = pron->seg[0];
 if (nsegs > MAX_SYMBS_IN_STR) fatal_error(proc,"nsegs > MAX_SYMBS",nsegs);
 for (iseg=1; iseg <= nsegs; iseg++) seg_syl[iseg] = 0;
 for (isyl=1; isyl <= pron->nsylbs; isyl++)
   {for (iseg=pron->sylb[isyl].segs.l1;iseg <= pron->sylb[isyl].segs.l2; iseg++)
      seg_syl[iseg] = isyl;
   }
 for (iseg=1; ((!stranded_seg)&&(iseg <= nsegs)); iseg++)
   {if (seg_syl[iseg] == 0) stranded_seg = T;
   }
db_leave_msg(proc,1); /* debug only */
  return stranded_seg;
 }
