Changeset - b647e12afd51
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-05-23 22:23:10
ohnobinki@ohnopublishing.net
partially implemented distren_init_mf and distren_free
1 file changed with 21 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/client/libdistren.c
Show inline comments
 
@@ -24,12 +24,29 @@
 
#include <libdistren.h>
 

	
 
#include <malloc.h>
 
#include <stdio.h>
 

	
 
/**
 
   @todo Stub
 
   @todo needs to read configuration in
 
 */
 
int distren_init_mf(distren_t *handle, distren_malloc_t mymalloc, distren_free_t myfree)
 
{
 
  if(!handle
 
     || !mymalloc
 
     || !myfree)
 
    {
 
      fprintf(stderr, "distren_init_mf passed NULL pointers\n");
 
      return 1;
 
    }
 

	
 
  *handle = (*mymalloc)(sizeof(struct distren));
 
  if(!*handle)
 
    return 1;
 

	
 
  (*handle)->malloc = mymalloc;
 
  (*handle)->free = myfree;
 
  
 
  return 0;
 
}
 

	
 
int distren_init(distren_t *handle)
 
@@ -45,8 +62,10 @@ int distren_submit_file(distren_t handle
 
}
 

	
 
/**
 
   @todo Stub
 

	
 
 */
 
int distren_free(distren_t handle)
 
{
 
  _free(handle, handle);
 
  return 0;
 
}
0 comments (0 inline, 0 general)