home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / db2 / etest.c < prev    next >
Text File  |  1997-09-03  |  846b  |  50 lines

  1. # include <stdio.h>
  2. # include <stdlib.h>
  3. # include "eref.h"
  4.  
  5. eref_ERP eref_Pool;            /* private */
  6. static bool needsInit = TRUE;  /* private */
  7.  
  8. void eref_initMod (void) 
  9. {
  10.   int i;
  11.   const int size = 16;
  12.   
  13.   if (!needsInit) 
  14.     {
  15.       return;
  16.     }
  17.  
  18.   needsInit = FALSE;
  19.   bool_initMod ();
  20.   employee_initMod ();
  21.  
  22.   eref_Pool.conts = (employee *) malloc (size * sizeof (employee));
  23.  
  24.   if (eref_Pool.conts == 0) 
  25.     {
  26.       printf ("Malloc returned null in eref_initMod\n");
  27.       exit (EXIT_FAILURE);
  28.     }
  29.   
  30.   eref_Pool.status = (eref_status *) malloc (size * sizeof (eref_status));
  31.  
  32.   if (eref_Pool.status == 0) 
  33.     {
  34.       printf ("Malloc returned null in eref_initMod\n");
  35.       exit (EXIT_FAILURE);
  36.     }
  37.   
  38.   eref_Pool.size = size;
  39.  
  40.   if (size > 3)
  41.     {
  42.       eref_Pool.status[0] = avail;
  43.     }
  44.   else
  45.     {
  46.       ;
  47.     }
  48. }
  49.  
  50.