Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
7c6fd0ae
Commit
7c6fd0ae
authored
23 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
option to parse files silently
parent
8926b500
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Common/GetOptions.cpp
+4
-4
4 additions, 4 deletions
Common/GetOptions.cpp
Parser/OpenFile.cpp
+8
-7
8 additions, 7 deletions
Parser/OpenFile.cpp
Parser/OpenFile.h
+1
-1
1 addition, 1 deletion
Parser/OpenFile.h
with
13 additions
and
12 deletions
Common/GetOptions.cpp
+
4
−
4
View file @
7c6fd0ae
// $Id: GetOptions.cpp,v 1.4
2
2001-1
1-19 09:29:18
geuzaine Exp $
// $Id: GetOptions.cpp,v 1.4
3
2001-1
2-06 10:10:42
geuzaine Exp $
#include
<unistd.h>
#include
"Gmsh.h"
...
...
@@ -94,8 +94,8 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
InitSymbols
();
//this symbol context is local to option parsing (the
//symbols will not interfere with subsequent OpenFiles)
ParseFile
(
CTX
.
sessionrc_filename
);
ParseFile
(
CTX
.
optionsrc_filename
);
ParseFile
(
CTX
.
sessionrc_filename
,
1
);
ParseFile
(
CTX
.
optionsrc_filename
,
1
);
// Get command line options
...
...
@@ -179,7 +179,7 @@ void Get_Options (int argc, char *argv[], int *nbfiles) {
i
++
;
CTX
.
terminal
=
1
;
if
(
argv
[
i
]
&&
argv
[
i
+
1
]){
ParseFile
(
argv
[
i
]);
ParseFile
(
argv
[
i
]
,
0
);
if
(
List_Nbr
(
CTX
.
post
.
list
))
Write_View
(
1
,(
Post_View
*
)
List_Pointer
(
CTX
.
post
.
list
,
0
),
argv
[
i
+
1
]);
else
...
...
This diff is collapsed.
Click to expand it.
Parser/OpenFile.cpp
+
8
−
7
View file @
7c6fd0ae
// $Id: OpenFile.cpp,v 1.2
5
2001-12-0
4 09:31:18
geuzaine Exp $
// $Id: OpenFile.cpp,v 1.2
6
2001-12-0
6 10:10:42
geuzaine Exp $
#include
"Gmsh.h"
#include
"Numeric.h"
...
...
@@ -25,7 +25,7 @@ extern GUI *WID;
extern
Mesh
*
THEM
,
M
;
extern
Context_T
CTX
;
int
ParseFile
(
char
*
f
){
int
ParseFile
(
char
*
f
,
int
silent
){
char
String
[
256
];
int
status
;
...
...
@@ -36,7 +36,7 @@ int ParseFile(char *f){
if
(
!
(
yyin
=
fopen
(
yyname
,
"r"
)))
return
0
;
Msg
(
STATUS2
,
"Loading '%s'"
,
yyname
);
if
(
!
silent
)
Msg
(
STATUS2
,
"Loading '%s'"
,
yyname
);
fpos_t
position
;
fgetpos
(
yyin
,
&
position
);
...
...
@@ -70,7 +70,8 @@ int ParseFile(char *f){
}
fclose
(
yyin
);
Msg
(
STATUS2
,
"Loaded '%s'"
,
yyname
);
if
(
!
silent
)
Msg
(
STATUS2
,
"Loaded '%s'"
,
yyname
);
return
status
;
}
...
...
@@ -81,12 +82,12 @@ void ParseString(char *str){
if
((
f
=
fopen
(
CTX
.
tmp_filename
,
"w"
))){
fprintf
(
f
,
"%s
\n
"
,
str
);
fclose
(
f
);
ParseFile
(
CTX
.
tmp_filename
);
ParseFile
(
CTX
.
tmp_filename
,
0
);
}
}
void
MergeProblem
(
char
*
name
){
ParseFile
(
name
);
ParseFile
(
name
,
0
);
if
(
yyerrorstate
)
return
;
}
...
...
@@ -131,7 +132,7 @@ void OpenProblem(char *name){
int
nb
=
List_Nbr
(
CTX
.
post
.
list
);
status
=
ParseFile
(
CTX
.
filename
);
status
=
ParseFile
(
CTX
.
filename
,
0
);
ApplyLcFactor
(
THEM
);
...
...
This diff is collapsed.
Click to expand it.
Parser/OpenFile.h
+
1
−
1
View file @
7c6fd0ae
...
...
@@ -3,7 +3,7 @@
#define MAX_OPEN_FILES 256
int
ParseFile
(
char
*
filename
);
int
ParseFile
(
char
*
filename
,
int
silent
);
void
ParseString
(
char
*
str
);
void
OpenProblem
(
char
*
filename
);
void
MergeProblem
(
char
*
filename
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment