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
f3eb1685
Commit
f3eb1685
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
tiny cleanup
parent
a6ac7097
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Fltk/GmshServer.cpp
+5
-12
5 additions, 12 deletions
Fltk/GmshServer.cpp
Fltk/GmshServer.h
+1
-1
1 addition, 1 deletion
Fltk/GmshServer.h
Fltk/Makefile
+2
-2
2 additions, 2 deletions
Fltk/Makefile
Fltk/Solvers.cpp
+3
-3
3 additions, 3 deletions
Fltk/Solvers.cpp
with
11 additions
and
18 deletions
Fltk/GmshServer.cpp
+
5
−
12
View file @
f3eb1685
/* $Id: GmshServer.cpp,v 1.2
5
2005-01-
08 20:15:11
geuzaine Exp $ */
/* $Id: GmshServer.cpp,v 1.2
6
2005-01-
14 04:50:48
geuzaine Exp $ */
/*
* Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
*
...
...
@@ -30,10 +30,6 @@
* Christopher Stott
*/
// This is a hacked version using the Gmsh function SystemCall()
// instead system() and using CTX.solver.max_delay in select()
#include
"Context.h"
extern
Context_T
CTX
;
void
SystemCall
(
char
*
str
);
#include
<stdio.h>
...
...
@@ -85,7 +81,7 @@ static int Socket_UnlinkName(char *name)
/* public interface */
int
Gmsh_StartClient
(
char
*
command
,
char
*
sockname
)
int
Gmsh_StartClient
(
char
*
command
,
char
*
sockname
,
int
maxdelay
)
{
static
int
init
=
0
;
static
int
s
;
...
...
@@ -104,8 +100,7 @@ int Gmsh_StartClient(char *command, char *sockname)
/* no socket? launch the command! */
if
(
!
sockname
)
{
//system(command);
SystemCall
(
command
);
SystemCall
(
command
);
//system(command);
return
1
;
}
...
...
@@ -160,16 +155,14 @@ int Gmsh_StartClient(char *command, char *sockname)
}
/* Start the external function via system() call */
//system(command);
SystemCall
(
command
);
SystemCall
(
command
);
//system(command);
/* wait for external function to connect */
if
(
listen
(
s
,
20
))
return
-
3
;
/* Error: Socket listen failed */
/* Watch s to see when it has input; wait up to N seconds */
//tv.tv_sec = 4;
tv
.
tv_sec
=
CTX
.
solver
.
max_delay
;
tv
.
tv_sec
=
maxdelay
;
tv
.
tv_usec
=
0
;
FD_ZERO
(
&
rfds
);
FD_SET
(
s
,
&
rfds
);
...
...
This diff is collapsed.
Click to expand it.
Fltk/GmshServer.h
+
1
−
1
View file @
f3eb1685
...
...
@@ -29,7 +29,7 @@
* Please report all bugs and problems to <gmsh@geuz.org>.
*/
int
Gmsh_StartClient
(
char
*
command
,
char
*
sockname
);
int
Gmsh_StartClient
(
char
*
command
,
char
*
sockname
,
int
maxdelay
);
int
Gmsh_ReceiveString
(
int
socket
,
int
*
type
,
char
str
[]);
int
Gmsh_StopClient
(
char
*
sockname
,
int
socket
);
...
...
This diff is collapsed.
Click to expand it.
Fltk/Makefile
+
2
−
2
View file @
f3eb1685
# $Id: Makefile,v 1.6
7
2005-01-1
3 23:39:10
geuzaine Exp $
# $Id: Makefile,v 1.6
8
2005-01-1
4 04:50:48
geuzaine Exp $
#
# Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
#
...
...
@@ -150,7 +150,7 @@ Colorbar_Window.o: Colorbar_Window.cpp ../Common/Gmsh.h \
../Common/VertexArray.h ../Common/SmoothNormals.h ../Mesh/Metric.h
\
../Mesh/Matrix.h Colorbar_Window.h ../Common/ColorTable.h
\
../Common/Context.h
GmshServer.o
:
GmshServer.cpp
../Common/Context.h ../DataStr/List.h
GmshServer.o
:
GmshServer.cpp
Solvers.o
:
Solvers.cpp ../Common/Gmsh.h ../Common/Message.h
\
../DataStr/Malloc.h ../DataStr/List.h ../DataStr/Tree.h
\
../DataStr/avl.h ../DataStr/Tools.h GmshServer.h ../Parser/OpenFile.h
\
...
...
This diff is collapsed.
Click to expand it.
Fltk/Solvers.cpp
+
3
−
3
View file @
f3eb1685
// $Id: Solvers.cpp,v 1.3
3
2005-01-14 0
1:4
0:4
9
geuzaine Exp $
// $Id: Solvers.cpp,v 1.3
4
2005-01-14 0
4:5
0:4
8
geuzaine Exp $
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
...
...
@@ -70,7 +70,7 @@ int Solver(int num, char *args)
#if !defined(WIN32)
strcat
(
command
,
" &"
);
#endif
Gmsh_StartClient
(
command
,
NULL
);
Gmsh_StartClient
(
command
,
NULL
,
CTX
.
solver
.
max_delay
);
return
1
;
}
...
...
@@ -90,7 +90,7 @@ int Solver(int num, char *args)
strcat
(
command
,
" &"
);
#endif
sock
=
Gmsh_StartClient
(
command
,
socket_name
);
sock
=
Gmsh_StartClient
(
command
,
socket_name
,
CTX
.
solver
.
max_delay
);
if
(
sock
<
0
)
{
switch
(
sock
)
{
case
-
1
:
...
...
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