/* This subroutine takes care of any labels encountered.
 *
 * $Log: labproc.c,v $
 * Revision 1.2  1997/06/04 01:11:29  david
 * ANSI-fied the program.
 *
 */

#include <stdio.h>
#include "xasm.h"

static char *RcsId = "$Id: labproc.c,v 1.2 1997/06/04 01:11:29 david Exp $";

/* label = Current Label */
void labproc( char *label )
{
WORD value;

if ( pass != 1 || label == NULL || *label == '\0' )
   return; /* No label */
   
/* Check to see if label is already in the symbol table */
if ( symfind( label, &value, 0 ) == ' ' )
   symins( label, loc, 'D' ); /* Insert label */
 else
   {
   symins( label, loc, 'M' ); /* Set to 'Multiply Defined' */
   xerror( "labproc: Multiply Defined Symbol" );
   }
}
