Changeset dfd346 in git for Singular/sdb.cc


Ignore:
Timestamp:
Jun 10, 1999, 5:12:04 PM (24 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'a7324b6e0b44a1a8ed3fa4d9ca3e2ff210ddd52c')
Children:
d73404fca5a7c17188febfa4ab69af618a135287
Parents:
60763e54295f08381ffeabed82837778c6e95502
Message:
*hannes: sdb-edit fixes


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

Legend:

Unmodified
Added
Removed
  • Singular/sdb.cc

    r60763e rdfd346  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sdb.cc,v 1.7 1999-06-08 12:38:46 Singular Exp $ */
     4/* $Id: sdb.cc,v 1.8 1999-06-10 15:12:04 Singular Exp $ */
    55/*
    66* ABSTRACT: Singular debugger
     
    6161    editor=mstrdup(editor);
    6262
    63     // remove arguments...
    64     if (strchr(editor,' ')!=NULL)
    65     {
    66       char *p=strchr(editor,' ');
    67       *p='\0';
    68     }
    69 
    7063    if (pi->data.s.body==NULL)
    7164    {
     
    9184    else if(pid==0)
    9285    {
    93       execlp(editor,editor,filename,NULL);
    94       Print("cannot exec %s\n",editor);
     86      if (strchr(editor,' ')==NULL)
     87      {
     88        execlp(editor,editor,filename,NULL);
     89        Print("cannot exec %s\n",editor);
     90      }
     91      else
     92      {
     93        char *p=(char *)Alloc(strlen(editor)+strlen(filename)+2);
     94        sprintf(s,"%s %s",editor,filename);
     95        system(s);
     96      }
    9597      exit(0);
    9698    }
Note: See TracChangeset for help on using the changeset viewer.