142b77743806f69d44ef381214ead1d76b3b9175
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

1) #include <libmng.h>
2) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

3) mng_ptr my_mng_alloc(mng_size_t iSize)
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

4) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

5)   void *ptr = malloc(iSize);
6)   memset(ptr, 0, iSize);
7)   return (mng_ptr) ptr;
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

8) }
9) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

10) void my_mng_free(mng_ptr pPtr, mng_size_t __attribute__ ((unused)) iSize)
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

11) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

12)   free(pPtr);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

13) }
14) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

15) int main()
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

16) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

17)   mng_handle hMNG =
18)       mng_initialize(MNG_NULL, my_mng_alloc, my_mng_free, MNG_NULL);
19)   mng_cleanup(&hMNG);