2
#include <X11/Intrinsic.h>
13
extern char* my_basename();
14
extern char* dirname();
15
extern int LoadNamedGraph();
16
extern char *StripGraph();
18
#if defined(SYSV) || defined(SVR4)
19
#define getwd(x) getcwd(x,2*MAXNAM)
24
int arcStrDisplay = NODISP;
25
int nodeStrDisplay = NODISP;
26
double metaScale = 1.0;
30
char *graphNames[MAXGRAPHS];
32
char datanet[2*MAXNAM];
33
char beginHelp[2*MAXNAM];
34
char studyHelp[2*MAXNAM];
35
char modifyHelp[2*MAXNAM];
37
void InitMetanet(path,scale)
50
if ((dirp=opendir(path)) != NULL) {
54
name = my_basename(path);
56
if (dir == NULL) getwd(datanet);
57
else strcpy(datanet,dir);
60
if ((dirp=opendir(datanet)) == NULL) {
61
sprintf(Description,"Directory \"%s\" does not exist",datanet);
62
MetanetAlert(Description);
68
dir=getenv("NETHELPDIR");
69
if (dir == NULL || (dirp=opendir(dir)) == NULL) {
70
sprintf(Description,"Help Directory does not exist\nHelp not available");
71
MetanetAlert(Description);
73
strcpy(beginHelp,dir);
74
strcat(beginHelp,"/MetanetBegin.help");
75
strcpy(studyHelp,dir);
76
strcat(studyHelp,"/MetanetStudy.help");
77
strcpy(modifyHelp,dir);
78
strcat(modifyHelp,"/MetanetModify.help");
79
if ((f1=fopen(beginHelp,"r")) == NULL ||
80
(f2=fopen(studyHelp,"r")) == NULL ||
81
(f3=fopen(modifyHelp,"r")) == NULL) {
82
sprintf(Description,"Help Files does not exist\nHelp not available");
84
fclose(f1); fclose(f2); fclose(f3);
88
if (scale > 0) metaScale = scale;
90
theGG.n_hilited_arcs = 0;
91
theGG.n_hilited_nodes = 0;
92
theGG.hilited_arcs = ListAlloc();
93
theGG.hilited_nodes = ListAlloc();
97
maxGraphs = MAXGRAPHS;
98
if (name != NULL && LoadNamedGraph(StripGraph(name))) return;