/***************************************************************************
 *                                                                         *
 *   SAMEIN.C                                                              *
 *                                                                         *
 *   Copyright (c) 1987-1997 Galacticomm, Inc.    All Rights Reserved.     *
 *                                                                         *
 *   This is the GCOMM.LIB routine for determining if a short string is    *
 *   present as a substring of a long string.  Returns 1 if so, else 0.    *
 *                                                                         *
 *                                            - T. Stryker 2/14/92         *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"

#define FILREV "$Revision: 5 $"

GBOOL                              /*   returns TRUE=short in long found   */
samein(                            /* find short string in long string     */
const CHAR *shorts,                /*   short string to find               */
const CHAR *longs)                 /*   long string to search through      */
{
     INT i,looplim;

     looplim=strlen(longs)-strlen(shorts)+1;
     for (i=0 ; i < looplim ; i++) {
          if (sameto(shorts,longs+i)) {
               return(TRUE);
          }
     }
     return(FALSE);
}
