Changeset ec3675 in git


Ignore:
Timestamp:
Oct 27, 1998, 2:25:44 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c7af8613769b29c741d6c338945669719f1fc4f8')
Children:
e48ffd782fbf332ffb10269170ae43104d17aa4f
Parents:
a8f3d7a9db9d39698641daa4be03efea24de09cd
Message:
* more flexible handling of MPrsh option


git-svn-id: file:///usr/local/Singular/svn/trunk@2600 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/sing_mp.cc

    ra8f3d7 rec3675  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sing_mp.cc,v 1.21 1998-10-15 11:46:06 obachman Exp $ */
     4/* $Id: sing_mp.cc,v 1.22 1998-10-27 13:25:44 obachman Exp $ */
    55
    66/*
     
    208208{
    209209  char *argv[] = {"--MPtransp", "TCP", "--MPmode", "launch",
    210                   "--MPhost", "localhost",  "--MPrsh", "rsh",
    211                   "--MPapplication", "Singular -bq  --no-stdlib --no-rc"};
     210                  "--MPhost", "localhost", 
     211                  "--MPapplication", "Singular -bq  --no-warn --no-out --no-rc",
     212                  "--MPrsh", "rsh"};
    212213  char *appl = IMP_GetCmdlineArg(n_argc, n_argv, "--MPapplication");
    213214  char *host = IMP_GetCmdlineArg(n_argc, n_argv, "--MPhost");
     
    215216  char* nappl = NULL;
    216217  MP_Link_pt link;
    217 
     218  int argc = 8;
    218219
    219220  if (appl == NULL && (host == NULL ||
     
    224225    if (appl != NULL)
    225226    {
    226       nappl = (char*) Alloc(MAXPATHLEN + 24);
     227      nappl = (char*) Alloc(MAXPATHLEN + 50);
    227228      strcpy(nappl, appl);
    228       strcat(nappl, " -bq");
     229      strcat(nappl, " -bq --no-warn --no-out --no-rc");
    229230      appl = nappl;
    230231    }
    231232  }
    232233 
     234  if (host == NULL)
     235  {
     236    argv[5] = mp_Env->thishost;
     237  }
     238  else
     239    argv[5] = host;
     240
    233241  if (appl != NULL) 
    234     argv[9] = appl;
    235 
    236   if (host == NULL)
    237   {
    238     argv[5] = mp_Env->thishost;
    239   }
    240   else
    241     argv[5] = host;
     242    argv[7] = appl;
     243
    242244
    243245  if (rsh != NULL)
    244246  {
    245     argv[7] = rsh;
    246   }
    247 
    248   link = MP_OpenLink(mp_Env, 10, argv);
    249   if (nappl != NULL) Free(nappl, MAXPATHLEN + 24);
     247    argv[9] = rsh;
     248    argc = 10;
     249  }
     250
     251  link = MP_OpenLink(mp_Env, argc, argv);
     252  if (nappl != NULL) Free(nappl, MAXPATHLEN + 50);
    250253  return link;
    251254}
Note: See TracChangeset for help on using the changeset viewer.