Skip to content
Snippets Groups Projects
Commit 3a320b33 authored by rds's avatar rds
Browse files

added --win_id option

parent ff6612c7
No related branches found
No related tags found
No related merge requests found
......@@ -30,9 +30,9 @@
*
* Exported functions: See ZMap/zmapCmdLine.h
* HISTORY:
* Last edited: Feb 10 15:38 2005 (edgrif)
* Last edited: Jun 8 17:08 2005 (rds)
* Created: Fri Feb 4 18:24:37 2005 (edgrif)
* CVS info: $Id: zmapCmdLineArgs.c,v 1.1 2005-02-10 16:31:50 edgrif Exp $
* CVS info: $Id: zmapCmdLineArgs.c,v 1.2 2005-06-13 20:20:32 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -186,7 +186,7 @@ static void makeContext(int argc, char *argv[])
arg_context->start = -1 ;
arg_context->end = -1 ;
arg_context->config_file_path = arg_context->config_dir = NULL ;
arg_context->window = NULL;
makePoptContext(arg_context) ;
return ;
......@@ -215,6 +215,8 @@ static void makePoptContext(ZMapCmdLineArgs arg_context)
"Relative or full path to configuration file.", "file_path"},
{ZMAPARG_CONFIG_DIR, '\0', POPT_ARG_STRING, NULL, ARG_CONF_DIR,
"Relative or full path to configuration directory.", "directory"},
{ZMAPARG_WINDOW_ID, '\0', POPT_ARG_STRING, NULL, ARG_WINID,
"sdfghsjdfhghsjdfghsjdfhg win id, very drunk.", "0x0000000"},
POPT_TABLEEND
} ;
static struct poptOption options_table[] =
......@@ -240,6 +242,7 @@ static void makePoptContext(ZMapCmdLineArgs arg_context)
setPoptArgPtr(ZMAPARG_SEQUENCE_END, &arg_context->end) ;
setPoptArgPtr(ZMAPARG_CONFIG_FILE, &arg_context->config_file_path) ;
setPoptArgPtr(ZMAPARG_CONFIG_DIR, &arg_context->config_dir) ;
setPoptArgPtr(ZMAPARG_WINDOW_ID, &arg_context->window) ;
/* Create the context. */
......@@ -263,6 +266,9 @@ static void makePoptContext(ZMapCmdLineArgs arg_context)
case ARG_CONF_DIR:
setPoptValPtr(ZMAPARG_CONFIG_DIR, ARG_SET) ;
break ;
case ARG_WINID:
setPoptValPtr(ZMAPARG_WINDOW_ID, ARG_SET) ;
break ;
default:
zMapAssert("coding error, bad popt value") ;
break ;
......
......@@ -26,9 +26,9 @@
* Description: Internals for command line parsing.
*
* HISTORY:
* Last edited: Feb 10 15:19 2005 (edgrif)
* Last edited: Jun 8 17:07 2005 (rds)
* Created: Fri Feb 4 19:11:23 2005 (edgrif)
* CVS info: $Id: zmapCmdLineArgs_P.h,v 1.1 2005-02-10 16:31:50 edgrif Exp $
* CVS info: $Id: zmapCmdLineArgs_P.h,v 1.2 2005-06-13 20:20:32 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_CMDLINEARGS_P_H
......@@ -41,7 +41,9 @@
enum {ARG_SET = 1, /* Special value, do not alter. */
ARG_START, ARG_END,
ARG_CONF_FILE, ARG_CONF_DIR} ;
ARG_CONF_FILE, ARG_CONF_DIR,
ARG_WINID
} ;
......@@ -63,6 +65,7 @@ typedef struct _ZMapCmdLineArgsStruct
char *config_dir ;
char *config_file_path ;
char *window ;
} ZMapCmdLineArgsStruct, *ZMapCmdLineArgs ;
......
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