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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
347c87ea
Commit
347c87ea
authored
21 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
use abort() instead of exit() when we really want to exit *now*
parent
7b5cbc1a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Fltk/Message.cpp
+16
-5
16 additions, 5 deletions
Fltk/Message.cpp
with
16 additions
and
5 deletions
Fltk/Message.cpp
+
16
−
5
View file @
347c87ea
// $Id: Message.cpp,v 1.4
6
2004-0
2
-0
7 01:28:51
geuzaine Exp $
// $Id: Message.cpp,v 1.4
7
2004-0
5
-0
9 18:59:37
geuzaine Exp $
//
//
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -203,6 +203,19 @@ void Msg(int level, char *fmt, ...)
...
@@ -203,6 +203,19 @@ void Msg(int level, char *fmt, ...)
void
Exit
(
int
level
)
void
Exit
(
int
level
)
{
{
// delete the temp file
unlink
(
CTX
.
tmprc_filename
);
if
(
level
){
// in case of an abnormal exit, force the abort directly
// (bypassing any post main stuff, e.g. destructors for static
// variables). This still guarantees that any open streams are
// flushed and closed, but can prevent nasty infinite loops.
abort
();
}
// if we exit cleanly (level==0) and we are in full GUI mode, save
// the persistent info to disk
if
(
WID
&&
!
CTX
.
batch
)
{
if
(
WID
&&
!
CTX
.
batch
)
{
if
(
CTX
.
session_save
)
{
if
(
CTX
.
session_save
)
{
CTX
.
position
[
0
]
=
WID
->
m_window
->
x
();
CTX
.
position
[
0
]
=
WID
->
m_window
->
x
();
...
@@ -219,19 +232,17 @@ void Exit(int level)
...
@@ -219,19 +232,17 @@ void Exit(int level)
CTX
.
stat_position
[
1
]
=
WID
->
stat_window
->
y
();
CTX
.
stat_position
[
1
]
=
WID
->
stat_window
->
y
();
CTX
.
vis_position
[
0
]
=
WID
->
vis_window
->
x
();
CTX
.
vis_position
[
0
]
=
WID
->
vis_window
->
x
();
CTX
.
vis_position
[
1
]
=
WID
->
vis_window
->
y
();
CTX
.
vis_position
[
1
]
=
WID
->
vis_window
->
y
();
// bof
CTX
.
ctx_position
[
0
]
=
WID
->
context_geometry_window
->
x
();
CTX
.
ctx_position
[
0
]
=
WID
->
context_geometry_window
->
x
();
CTX
.
ctx_position
[
1
]
=
WID
->
context_geometry_window
->
y
();
CTX
.
ctx_position
[
1
]
=
WID
->
context_geometry_window
->
y
();
CTX
.
solver_position
[
0
]
=
WID
->
solver
[
0
].
window
->
x
();
CTX
.
solver_position
[
0
]
=
WID
->
solver
[
0
].
window
->
x
();
CTX
.
solver_position
[
1
]
=
WID
->
solver
[
0
].
window
->
y
();
CTX
.
solver_position
[
1
]
=
WID
->
solver
[
0
].
window
->
y
();
Print_Options
(
0
,
GMSH_SESSIONRC
,
CTX
.
sessionrc_filename
);
Print_Options
(
0
,
GMSH_SESSIONRC
,
CTX
.
sessionrc_filename
);
}
}
if
(
CTX
.
options_save
)
if
(
CTX
.
options_save
)
Print_Options
(
0
,
GMSH_OPTIONSRC
,
CTX
.
optionsrc_filename
);
Print_Options
(
0
,
GMSH_OPTIONSRC
,
CTX
.
optionsrc_filename
);
}
}
unlink
(
CTX
.
tmprc_filename
);
//delete temp file
exit
(
level
);
exit
(
0
);
}
}
// CPU time computation, etc.
// CPU time computation, etc.
...
...
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