Skip to content
Snippets Groups Projects
Commit 0fa66076 authored by edgrif's avatar edgrif
Browse files

initial version

parent d2881fd8
No related branches found
No related tags found
No related merge requests found
/* File: zmapConfig.h
* Author: Ed Griffiths (edgrif@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003
*-------------------------------------------------------------------
* ZMap is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
*-------------------------------------------------------------------
* This file is part of the ZMap genome database package
* and was written by
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk and
* Rob Clack (Sanger Institute, UK) rnc@sanger.ac.uk
*
* Description:
* HISTORY:
* Last edited: Jan 21 18:10 2004 (edgrif)
* Created: Thu Jul 24 14:39:06 2003 (edgrif)
* CVS info: $Id: zmapConfig.h,v 1.1 2004-01-21 18:16:21 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_CONFIG_H
#define ZMAP_CONFIG_H
#include <ZMap/zmapSys.h>
/* not sure if this is needed.... */
typedef struct _ZMapConfigStruct *ZMapConfig ;
ZMapConfig zMapConfigInit(char *config_file) ;
gboolean zMapConfigGetPorts(ZMapConfig config, char **ports) ;
#endif /* !ZMAP_CONFIG_H */
================================================================================
ZMapConfig
This directory contains the code that deals with reading/writing configuration
information into ZMaps configuration file(s). Currently much of this is just
skeleton stuff.
#
# Makes the configuration part of the ZMap application.
#
# local macros
PUB_HDRS = zmapConfig.h
CONF_PRIV_HDRS = zmapConfig_P.h
CONF_SRC = zmapConfig.c
CONF_OBJ = zmapConfig.o
#
# These must all be set for the common includes to work.
#
CURRENT_LIB = $(ZMAPAPP_LIB)
CURRENT_OBJ = $(CONF_OBJ)
CURRENT_DEP = $(PUB_HDRS) $(CONF_PRIV_HDRS)
CURRENT_SRC = $(CONF_PRIV_HDRS) $(CONF_SRC)
#
# point to common make include file which contains all the rules etc.
#
ROOT_DIRECTORY = ..
MAKE_DIR = $(ROOT_DIRECTORY)/zmapMake
include $(MAKE_DIR)/build.make
/* File: zmapConfig.c
* Author: Ed Griffiths (edgrif@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003
*-------------------------------------------------------------------
* ZMap is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
*-------------------------------------------------------------------
* This file is part of the ZMap genome database package
* and was written by
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk and
* Rob Clack (Sanger Institute, UK) rnc@sanger.ac.uk
*
* Description:
* Exported functions: See zmapConfig.h
* HISTORY:
* Last edited: Jan 21 18:13 2004 (edgrif)
* Created: Thu Jul 24 16:06:44 2003 (edgrif)
* CVS info: $Id: zmapConfig.c,v 1.1 2004-01-21 18:15:31 edgrif Exp $
*-------------------------------------------------------------------
*/
#include <zmapConfig_P.h>
ZMapConfig zMapConfigInit(char *config_file)
{
ZMapConfig config ;
/* assert for non-null config_file.... */
config = g_new(ZMapConfigStruct, sizeof(ZMapConfigStruct)) ;
config->config_file = g_strdup(config_file) ;
return config ;
}
gboolean zMapConfigGetPorts(ZMapConfig config, char **ports)
{
gboolean result = FALSE ;
/* This is just hacked for now.... */
static char *my_ports[] = {"griffin2 20000 acedb",
"griffin2 20001 acedb",
"griffin2 20002 acedb"} ;
*ports = &my_ports[0] ;
return result ;
}
/*
* ------------------- Internal functions -------------------
*/
/* File: zmapConfig_P.h
* Author: Ed Griffiths (edgrif@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2003
*-------------------------------------------------------------------
* ZMap is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
*-------------------------------------------------------------------
* This file is part of the ZMap genome database package
* and was written by
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk and
* Rob Clack (Sanger Institute, UK) rnc@sanger.ac.uk
*
* Description:
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jan 21 17:59 2004 (edgrif)
* Created: Thu Jul 24 14:39:06 2003 (edgrif)
* CVS info: $Id: zmapConfig_P.h,v 1.1 2004-01-21 18:15:31 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_CONFIG_P_H
#define ZMAP_CONFIG_P_H
#include <ZMap/zmapConfig.h>
typedef struct _ZMapConfigStruct
{
char *config_file ;
} ZMapConfigStruct ;
#endif /* !ZMAP_CONFIG_P_H */
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment