 /* file malint_prot.c */

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

 ALIGNMENT_INT_PROT *make_al_int_prot2(char *ident, pcodeset *pcode1)
 /**********************************************************************/
 /*                                                                    */
 /* Allocates memory space for an object of type ALIGNMENT_INT_PROT (a */
 /* protected integer string alignment) and initializes it with a      */
 /* pointer to pcode1.  Other items are set to legitimate but          */
 /* informationless values.  Returns a pointer to the alignment or     */
 /* NULL if memory allocation failed.                                  */
 /*                                                                    */
 /**********************************************************************/
{
/* local data: */
  char *proc = "make_al_int_prot2";
  int i;
  ALIGNMENT_INT_PROT *p;
/* code: */
 db_enter_msg(proc,1); /* debug only */
  p = (ALIGNMENT_INT_PROT *) malloc_safe(sizeof(ALIGNMENT_INT_PROT),proc);
  p->id = create_prot_chr_str(65);
  strcpy_prot_s(p->id,ident);
  p->nsa = create_prot_int_str(133);
  p->nsb = create_prot_int_str(133);
  p->max_aux = 100;
  p->auxtab = (PROTECTED_INT_STR**)calloc_safe(p->max_aux+1,sizeof(PROTECTED_INT_STR*),proc);
if (db_level > 3) printf("%s allocated %s->auxtab at %x\n",pdb,p->id->str,(int)p->auxtab);
  for (i=0; i <= p->max_aux; i++) p->auxtab[i] = (PROTECTED_INT_STR*)NULL;
  init_al_int_prot(p,pcode1);
 db_leave_msg(proc,1); /* debug only */
  return p;
  } /* end of function "make_al_int_prot2" */
