481e57eec1f9ee28f931b3829eee037e308dbce1
Stefan Schuermans add missing stdio.h

Stefan Schuermans authored 7 years ago

1) #include <stdio.h>
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

11) 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

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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