Skip to content
Snippets Groups Projects
Commit 56f96798 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

change the behavior of "-string string" command line option to match the
bahavior of "-option file"
parent c4fb744b
Branches
Tags
No related merge requests found
// $Id: CommandLine.cpp,v 1.55 2005-02-28 23:57:59 geuzaine Exp $
// $Id: CommandLine.cpp,v 1.56 2005-03-01 17:47:54 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -45,7 +45,7 @@ extern Context_T CTX;
extern Mesh *THEM;
char *TheFileNameTab[MAX_OPEN_FILES];
char *TheBgmFileName = NULL, *TheOptString = NULL;
char *TheBgmFileName = NULL;
char gmsh_progname[] = "Gmsh, a 3D mesh generator with pre- and post-processing facilities" ;
char gmsh_copyright[] = "Copyright (C) 1997-2005 Christophe Geuzaine and Jean-Francois Remacle";
......@@ -105,8 +105,8 @@ void Print_Usage(char *name){
Msg(DIRECT, " -pid Print process id on stdout");
Msg(DIRECT, " -v int Set verbosity level");
Msg(DIRECT, " -nopopup Don't popup dialog windows in scripts");
Msg(DIRECT, " -string \"string\" Parse string before project file");
Msg(DIRECT, " -option file Parse option file before GUI creation");
Msg(DIRECT, " -string \"string\" Parse option string at startup");
Msg(DIRECT, " -option file Parse option file at startup");
Msg(DIRECT, " -convert file file Perform batch conversion of views and meshes into latest file formats");
Msg(DIRECT, " -version Show version number");
Msg(DIRECT, " -info Show detailed version information");
......@@ -173,15 +173,6 @@ void Get_Options(int argc, char *argv[], int *nbfiles)
fflush(stdout);
i++;
}
else if(!strcmp(argv[i] + 1, "string")) {
i++;
if(argv[i] != NULL)
TheOptString = argv[i++];
else {
fprintf(stderr, ERROR_STR "Missing string\n");
exit(1);
}
}
else if(!strcmp(argv[i] + 1, "a")) {
CTX.initial_context = 0;
i++;
......@@ -246,6 +237,15 @@ void Get_Options(int argc, char *argv[], int *nbfiles)
CTX.nopopup = 1;
i++;
}
else if(!strcmp(argv[i] + 1, "string")) {
i++;
if(argv[i] != NULL)
ParseString(argv[i++]);
else {
fprintf(stderr, ERROR_STR "Missing string\n");
exit(1);
}
}
else if(!strcmp(argv[i] + 1, "option")) {
i++;
if(argv[i] != NULL)
......
......@@ -26,7 +26,7 @@ extern char gmsh_progname[], gmsh_copyright[], gmsh_version[], gmsh_os[];
extern char gmsh_date[], gmsh_host[], gmsh_packager[], gmsh_url[];
extern char gmsh_email[], gmsh_gui[], gmsh_options[], gmsh_license[];
extern char *TheFileNameTab[MAX_OPEN_FILES], *TheBgmFileName, *TheOptString;
extern char *TheFileNameTab[MAX_OPEN_FILES], *TheBgmFileName;
void Get_Options(int argc, char *argv[], int *nbfiles);
void Print_Usage(char *name);
......
// $Id: OpenFile.cpp,v 1.71 2005-02-20 06:36:58 geuzaine Exp $
// $Id: OpenFile.cpp,v 1.72 2005-03-01 17:47:54 geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
......@@ -349,8 +349,6 @@ void OpenProblem(char *name)
// Initialize pseudo random mesh generator to the same seed
srand(1);
ParseString(TheOptString);
strncpy(CTX.filename, name, 255);
strncpy(CTX.base_filename, name, 255);
......
.\" $Id: gmsh.1,v 1.62 2005-02-11 02:27:13 geuzaine Exp $
.\" $Id: gmsh.1,v 1.63 2005-03-01 17:47:54 geuzaine Exp $
.TH Gmsh 1 "10 February 2005" "Gmsh 1.59" "Gmsh Manual Pages"
.UC 4
.\" ********************************************************************
......@@ -47,7 +47,7 @@ save all elements (and discard all physical group definitions).
specify mesh output file name.
.TP 4
.B \-format string
set output mesh format (msh, unv, gref).
set output mesh format (msh, unv, gref, p3d).
.TP 4
.B \-algo string
select mesh algorithm (iso, tri, aniso, netgen).
......@@ -135,10 +135,10 @@ set verbosity level.
don't popup dialog windows in scripts.
.TP 4
.B \-string "string"
parse string before project file.
parse option string at startup.
.TP 4
.B \-option file
parse option file before GUI creation.
parse option file at startup.
.TP 4
.B \-convert file file
perform batch conversion of views and meshes into latest file formats.
......
......@@ -17,7 +17,7 @@ Save all elements (discard physical group definitions)
@item -o file
Specify mesh output file name
@item -format string
Set output mesh format (msh, unv, gref)
Set output mesh format (msh, unv, gref, p3d)
@item -algo string
Select 2D mesh algorithm (iso, tri, aniso, netgen)
@item -smooth int
......@@ -92,9 +92,9 @@ Set verbosity level
@item -nopopup
Don't popup dialog windows in scripts
@item -string "string"
Parse string before project file
Parse option string at startup
@item -option file
Parse option file before GUI creation
Parse option file at startup
@item -convert file file
Perform batch conversion of views and meshes into latest file formats
@item -version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment