/*
 * DESCDEF.H
 * define VMS descriptor structures and some handling macros
 */
#include  descrip.h	/* get the dscdef constants */
/*
 * Fill the fields in the string descriptor.
 * DESC_S_FILL is applicable to fixed length, statically allocated strings
 * Arguments: a = the string descriptor
 *	      b = the C style string to be associated with the descriptor.
 */
#define	DESC_S_FILL(a, b)	{	\
	a.dsc$w_length = strlen(b);	\
	a.dsc$b_dtype = DSC$K_DTYPE_T;	\
	a.dsc$b_class = DSC$K_CLASS_S;	\
	a.dsc$a_pointer = b;	}

/*
 * DESC_D_FILL is applicable to VMS style dynamically allocated strings.
 * No string is actually needed.
 */
#define	DESC_D_FILL(a)	{	\
	a.dsc$w_length = 0;	\
	a.dsc$b_dtype = DSC$K_DTYPE_T;	\
	a.dsc$b_class = DSC$K_CLASS_D;	\
	a.dsc$a_pointer = 0;	}
/*
 * end of DESCDEF.H
 */
