Changeset - 52937ad805ae
[Not reviewed]
default
0 3 1
Nathan Brink (binki) - 16 years ago 2009-05-23 23:06:35
ohnobinki@ohnopublishing.net
started implementing libdistren configuration
4 files changed with 50 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/client/Makefile.am
Show inline comments
 
@@ -11,7 +11,7 @@ include_HEADERS = distren.h
 

	
 
lib_LTLIBRARIES = libdistren.la
 

	
 
libdistren_la_SOURCES = distren.h libdistren.h libdistren.c libdistren_job.c libdistren_unbias.c
 
libdistren_la_SOURCES = distren.h libdistren.h libdistren.c libdistren_job.c libdistren_unbias.c libdistren_config.c
 
#evidently the following should not be LDADD, but LDFLAGS because automake doesn't like the idea of LDADD for libraries for some reason... or I am very confused
 
libdistren_la_LIBADD = @DISTLIBS_LIBS@
 
libdistren_la_CXXFLAGS = @DISTLIBS_CFLAGS@
src/client/libdistren.c
Show inline comments
 
@@ -46,6 +46,19 @@ int distren_init_mf(distren_t *handle, d
 
  (*handle)->malloc = mymalloc;
 
  (*handle)->free = myfree;
 
  
 
  /* now the environment is ready for general use */
 
  if(_distren_getoptions(*handle))
 
    {
 
      fprintf(stderr, "error getting configuration\n");
 
      distren_free(*handle);
 
      return 1;
 
    }
 
  
 
  /**
 
     @todo open a connection to the server now and return error if we can't
 
     connect. 
 
   */
 
  
 
  return 0;
 
}
 

	
src/client/libdistren.h
Show inline comments
 
@@ -55,3 +55,10 @@ void *_malloc(distren_t distren, size_t 
 
   All of libdisren should use this instead of malloc.h's free()
 
*/
 
void _free(distren_t distren, void *tofree);
 

	
 
/**
 
   Sets up the distren handle with information garnered from
 
   configuration files, etc. Uses the environment variable
 
   DISTREN_CONFIG or the built-in default config file location.
 
 */
 
int _distren_getoptions(distren_t handle);
src/client/libdistren_config.c
Show inline comments
 
new file 100644
 
/*
 
  Copyright 2008 Nathan Phillip Brink, Ethan Zonca, Matt Orlando
 

	
 
  This file is a part of DistRen.
 

	
 
  DistRen is free software: you can redistribute it and/or modify
 
  it under the terms of the GNU Affero General Public License as published by
 
  the Free Software Foundation, either version 3 of the License, or
 
  (at your option) any later version.
 

	
 
  DistRen is distributed in the hope that it will be useful,
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
/*
 
  Functions and code for retrieving the client's configuration information.
 
 */
 

	
 
#include <libdistren.h>
 

	
 
int _distren_getoptions(distren_t handle)
 
{
 
  
 
}
0 comments (0 inline, 0 general)