#include <stdio.h>

#include "mach.h"

libvers() {
  printf("Storage method is ");
#ifndef PACKBITS
  printf("*** UNDEFINED ***\n");
#else
  switch(PACKBITS) {
  case SHIFTANDMASK:
    printf("SHIFTANDMASK\n"); break;
  case BITFIELDS:
    printf("BITFIELDS\n"); break;
  case BYTES:
    printf("BYTES\n"); break;
  }
#endif

  printf("Salt computation is ");
#ifndef COMPSALT
  printf("*** UNDEFINED ***\n");
#else
switch(COMPSALT) {
  case ONFLY:
    printf("ONFLY\n"); break;
  case PRECOMPUTE:
    printf("PRECOMPUTE\n"); break;
  case MEMBOUND:
    printf("MEMBOUND\n"); break;
  }
#endif

#ifndef BITSPERWORD
  printf("Bits per word is *** UNDEFINED ***\n");
#else
  printf("Bits per word defined as %d\n", BITSPERWORD);
#endif

#ifdef NETORDER
  printf("Bytes are stored in network order.\n");
#else
  printf("Bytes are NOT stored in network order.\n");
#endif

#ifdef STRUCTFROMTOP
  printf("High order byte is FIRST in a structure.\n");
#else
  printf("High order byte is LAST in a structure.\n");
#endif

#ifdef ONEBYTE
define(PRINT1,ONEBYTE)
  printf("The one byte data type is PRINT1.\n");
#else
  printf("The one byte data type is *** UNDEFINED ***\n");
#endif

#ifdef TWOBYTES
define(PRINT2,TWOBYTES)
  printf("The two byte data type is PRINT2.\n");
#else
  printf("The two byte data type is *** UNDEFINED ***\n");
#endif

#ifdef WORD
define(PRINTW,WORD)
  printf("The WORD data type is PRINTW.\n");
#else
  printf("The WORD data type is *** UNDEFINED ***\n");
#endif
}
