Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Parsing argv arguments
Topic Summary: Getting command line arguments
Created On: 24-Jan-2007 15:57
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 24-Jan-2007 15:57
User is offline View Users Profile Print this message


Kevin Murphy

Posts: 206
Joined: 15-Jul-2005

All,

When DOORS crashes, the DXL window that is displayed shows the command line arguments from the argv variable. You'll see the variable listed as

argv[1] = value
argv[2] = value
argv[3] = value

etc.

I'd like to look at these values via DXL, as I can't always trust registry settings and environment variables. Does anyone know how to do this?

Kev

-------------------------
Kevin Murphy
http://www.baselinesinc.com
The Requirements Management Experts
Report this to a Moderator Report this to a Moderator
 28-Jan-2007 23:43
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

If variable 'xxx' is a name of a DOORS variable in the registry, then variable 'DOORSXXX' is the equivalent name if used in the command line switch. Yes, it must be all upper case. Its null if there is no such command line switch currently in use.

Try this
string DataLocReg = getenv("data")
string DataLocCLS = getenv("DOORSDATA")

if (null DataLocCLS or DataLocReg == DataLocCLS)
print "Using default data location: '" DataLocReg "'\n"
else print "Data loc overridden by Command Line Switch: '" DataLogReg "' '" DataLocCLS "'\n"

This function may be useful:

string fGetCommnandLineSwitchName(string EnvVarName)
{ // for the specified Environement Variable recognized by DOORS,
// calculate the name of the corresponding variable is used in the command line

return("DOORS" upper(EnvVarName))
} // end fGetCommandLineSwitchName()

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.