"Open Macro Library"

Syntax quick tour

heap (array-based heap implementation)

  #include "oml_heap.h"

  typedef ... myType, *pMyType;
  oml_define_heap(int, pMyType);

  #define HEAP_BITS 3
  #define HEAP_SIZE (1 << HEAP_BITS)

  ...

  int k;
  myType myObj1;
  pMyType pObj;

  oml_heap(int, pMyType) h; // template-like syntax
  rv = oml_heap_init(&h, HEAP_BITS);
  rv = oml_heap_add(&h, 4, &myObj1);
  rv = oml_heap_get_min(&h, &k, &pObj);

Latest news

2009-01-25
Deadline exception

2009-01-24
Exceptions for C Package

2009-01-16
Exceptions for the C language

2007-03-06
Syntax quick tour update.





Last update:
March 2, 2010