get_site_num(area_num, pcats)
    int area_num;
    struct Categories *pcats ;
{
    int i, icode, recd;
    char buffr[128], area_name[40], cat_name[40];
    char *nptr, *cptr, *label ;
    CELL tmp_cell;

      sprintf(area_name, G_get_ith_c_raster_cat(pcats, area_num, 
					      &tmp_cell, &tmp_cell);
      nptr = area_name;

	/* find input string in category struct, assign category value to the
		    area_name based on category file record number*/
      recd = G_number_of_raster_cats(pcats);             /* set the number of categories */
      for (i=area_num+1;i<recd;i++)                /* category search */
	{		 
	                                    /* get a category label */
        label = G_get_ith_c_raster_cat(pcats, i, &tmp_cell, &tmp_cell);
        sscanf (label, "%s", cat_name);
	cptr = cat_name;                /* first part only */

	if (strncmp(nptr,cptr,strlen(nptr)) == 0)     /* compare for match */
	   {                           /* match, return first found */
	   icode = tmp_cell; /* set icode to category code */
	   return(icode);
	   }
	} 
	/* end of category search, NO category names match */
}
#endif /* SCS_MODS */
