Skip to content

Commit

Permalink
added history
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@854 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Oct 1, 2002
1 parent dcebc9c commit e0f0331
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mosh/src/mosh.cpp
Expand Up @@ -58,7 +58,7 @@ int main(int argc, char* argv[])
sprintf(systemstr,"%s/../modeq/modeq +d=interactive > %s/error.log &",
moshhome,moshhome);
int res = system(systemstr);
cout << "Started server..." << endl;
cout << "Started server using:"<< systemstr << "\n res = " << res << endl;
}

if (argc > 2)
Expand All @@ -84,6 +84,8 @@ int main(int argc, char* argv[])
exit (EXIT_FAILURE);
}

sleep(3);

/* Connect to the server. */
struct sockaddr_in servername;
init_sockaddr (&servername, hostname, port);
Expand All @@ -101,9 +103,11 @@ int main(int argc, char* argv[])
if (strcmp(line,"quit()") == 0) {
done =true;
}
add_history(line);
int nbytes = write(sock,line,strlen(line)+1);
int recvbytes = read(sock,buf,40000);
cout << buf;
free(line);
}
close (sock);
return EXIT_SUCCESS;
Expand Down

0 comments on commit e0f0331

Please sign in to comment.