diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-10-21 19:37:33 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-10-21 19:37:33 -0700 |
commit | a9317eac758b150ef839aa673e9a04bacb875d8b (patch) | |
tree | c197df11daac01cb6943937b5b19d55b318f1d18 /src/base/cmd | |
parent | 7592aa8a3e4bce6a28fddeea87e90cd3f2fb02a6 (diff) | |
download | abc-a9317eac758b150ef839aa673e9a04bacb875d8b.tar.gz abc-a9317eac758b150ef839aa673e9a04bacb875d8b.tar.bz2 abc-a9317eac758b150ef839aa673e9a04bacb875d8b.zip |
Preparing to work with C++ code.
Diffstat (limited to 'src/base/cmd')
-rw-r--r-- | src/base/cmd/cmdUtils.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/base/cmd/cmdUtils.c b/src/base/cmd/cmdUtils.c index 4140680e..3d4d91bb 100644 --- a/src/base/cmd/cmdUtils.c +++ b/src/base/cmd/cmdUtils.c @@ -489,6 +489,14 @@ void CmdFreeArgv( int argc, char **argv ) ABC_FREE( argv[i] ); ABC_FREE( argv ); } +char ** CmdDupArgv( int argc, char **argv ) +{ + char ** argvNew = ABC_ALLOC( char *, argc ); + int i; + for ( i = 0; i < argc; i++ ) + argvNew[i] = Abc_UtilStrsav( argv[i] ); + return argvNew; +} /**Function************************************************************* |