Skip to content

Commit

Permalink
Changed MOSHHOME to OPENMODELICAHOME which shuld point to what ${MOSH…
Browse files Browse the repository at this point in the history
…HOME}/.. used to be.

Also deleted some more (hopefully all) of the tornado stuff
Deleted the old modsim module.
Fixed Ctrl-C and Ctrl-V in WinMosh.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1711 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Håkan Lundvall committed Apr 21, 2005
1 parent 9b4757a commit e989555
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions mosh/src/mosh.cpp
Expand Up @@ -52,7 +52,7 @@ using namespace std;
/* Local functios */
void open_socket(char* hostname, int port);

char * check_moshhome(void);
char * check_omhome(void);

void init_sockaddr (struct sockaddr_in *name,
const char *hostname,
Expand Down Expand Up @@ -91,7 +91,7 @@ int main(int argc, char* argv[])
bool noserv=false;


char * moshhome=check_moshhome();
char * omhome=check_omhome();

corba_comm = flagSet("corba",argc,argv);
const string *scriptname = getFlagValue("f",argc,argv);
Expand All @@ -103,15 +103,15 @@ int main(int argc, char* argv[])
cout << "Using corba communication" << endl;
}
if(!scriptname) {
cout << "Open Source Modelica 0.1" << endl;
cout << "Open Source Modelica 1.2.2" << endl;
cout << "Copyright 2002, PELAB, Linkoping University" << endl;
}
if (corba_comm) {
if (!noserv) {
// Starting background server using corba
char systemstr[255];
sprintf(systemstr,"%s/../modeq/modeq +d=interactiveCorba > %s/error.log 2>&1 &",
moshhome,moshhome);
sprintf(systemstr,"modeq +d=interactiveCorba > %s/error.log 2>&1 &",
omhome);
int res = system(systemstr);
if (!scriptname)
cout << "Started server using:"<< systemstr << "\n res = " << res << endl;
Expand All @@ -121,8 +121,8 @@ int main(int argc, char* argv[])
if (!noserv) {
// Starting background server using corba
char systemstr[255];
sprintf(systemstr,"%s/../modeq/modeq +d=interactive > %s/error.log 2>&1 &",
moshhome,moshhome);
sprintf(systemstr,"modeq +d=interactive > %s/error.log 2>&1 &",
omhome);
int res = system(systemstr);
if (!scriptname)
cout << "Started server using:"<< systemstr << "\n res = " << res << endl;
Expand Down Expand Up @@ -292,13 +292,13 @@ void doSocketCommunication(const string * scriptname)
}


char * check_moshhome(void)
char * check_omhome(void)
{
char *str;

str=getenv("MOSHHOME");
str=getenv("OPENMODELICAHOME");
if (str == NULL) {
printf("Error, MOSHHOME not set. Set MOSHHOME to the directory where mosh resides (top dir)\n");
printf("Error, OPENMODELICAHOME not set. Set OPENMODELICAHOME to the root directory of the OpenModlica installation\n");
exit(1);
}
return str;
Expand Down

0 comments on commit e989555

Please sign in to comment.