Changeset f11262 in git
- Timestamp:
- Jul 28, 1999, 2:42:51 PM (25 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- f2764078b6449847a2d681550eaba43acf75679a
- Parents:
- 8a0ba837004057a6d7355c444061c871cae2a03d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/sing_mp.cc
r8a0ba8 rf11262 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: sing_mp.cc,v 1.2 3 1998-11-09 15:43:05 obachmanExp $ */4 /* $Id: sing_mp.cc,v 1.24 1999-07-28 12:42:51 Singular Exp $ */ 5 5 6 6 /* … … 76 76 } 77 77 } 78 78 79 79 *argc = i; 80 80 if (i>0) … … 101 101 FreeL(s2); 102 102 } 103 103 104 104 } 105 105 … … 114 114 "--MPfile", "/tmp/mpout"}; 115 115 char *mode; 116 116 117 117 MP_Link_pt link = NULL; 118 118 119 119 if (flag == SI_LINK_OPEN) 120 120 { … … 126 126 if (l->name[0] != '\0') argv[5] = l->name; 127 127 else l->name = mstrdup(argv[5]); 128 128 129 129 130 130 if (flag == SI_LINK_READ) … … 182 182 if (host == NULL) mainGetSingOptionValue("--MPhost", &host); 183 183 184 if (port != NULL) 184 if (port != NULL) 185 185 argv[5] = port; 186 186 if (host != NULL) … … 188 188 else 189 189 argv[7] = mp_Env->thishost; 190 190 191 191 return MP_OpenLink(mp_Env, 8, argv); 192 192 } … … 194 194 static MP_Link_pt slOpenMPListen(int n_argc, char **n_argv) 195 195 { 196 char *argv[] = {"--MPtransp", "TCP", "--MPmode", "listen", 196 char *argv[] = {"--MPtransp", "TCP", "--MPmode", "listen", 197 197 "--MPport", "1025"}; 198 198 char *port = IMP_GetCmdlineArg(n_argc, n_argv, "--MPport"); … … 208 208 { 209 209 char *argv[] = {"--MPtransp", "TCP", "--MPmode", "launch", 210 "--MPhost", "localhost", 210 "--MPhost", "localhost", 211 211 "--MPapplication", "Singular -bq --no-warn --no-out --no-rc", 212 212 "--MPrsh", "rsh"}; … … 218 218 int argc = 8; 219 219 220 if (appl == NULL && (host == NULL || 220 if (appl == NULL && (host == NULL || 221 221 strcmp(host, "localhost") == 0)) 222 222 { 223 223 appl = feGetExpandedExecutable(); 224 224 225 225 if (appl != NULL) 226 226 { … … 231 231 } 232 232 } 233 234 if ( host == NULL)233 234 if ((host == NULL)||(strcmp(host, "localhost") == 0)) 235 235 { 236 236 argv[5] = mp_Env->thishost; … … 239 239 argv[5] = host; 240 240 241 if (appl != NULL) 241 if (appl != NULL) 242 242 argv[7] = appl; 243 243 … … 262 262 if (port != NULL) argv[5] = port; 263 263 264 link = MP_OpenLink(mp_Env, 6, argv); 264 link = MP_OpenLink(mp_Env, 6, argv); 265 265 if (link != NULL) 266 266 { … … 291 291 } 292 292 293 294 293 294 295 295 static BOOLEAN slOpenMPTcp(si_link l, short flag) 296 296 { … … 298 298 char **argv; 299 299 int argc; 300 300 301 301 GetCmdArgs(&argc, &argv, l->name); 302 302 303 303 if (mp_Env == NULL) 304 304 mp_Env = MP_InitializeEnv(MP_AllocateEnv()); … … 324 324 325 325 FreeCmdArgs(argc, argv); 326 326 327 327 if (link != NULL) 328 328 { … … 355 355 } 356 356 357 // take care of the remaining leftv's 357 // take care of the remaining leftv's 358 358 while (next != NULL) 359 359 { … … 506 506 #endif 507 507 508 508 509 509 int Batch_do(const char* port, const char* host) 510 510 {
Note: See TracChangeset
for help on using the changeset viewer.