Changeset f438b4c in git


Ignore:
Timestamp:
Nov 16, 2016, 3:08:21 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
c248d2f567086a9ad995e42d554a335ee1554928
Parents:
c5ea0ee35940f5c8088557bed9197153ca42e7e8
Message:
add: missing system("...") for tests and manual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    rc5ea0e rf438b4c  
    288288    }
    289289    else
     290/*==================== alarm ==================================*/
     291  #ifdef unix
     292      if(strcmp(sys_cmd,"alarm")==0)
     293      {
     294        if ((h!=NULL) &&(h->Typ()==INT_CMD))
     295        {
     296          // standard variant -> SIGALARM (standard: abort)
     297          //alarm((unsigned)h->next->Data());
     298          // process time (user +system): SIGVTALARM
     299          struct itimerval t,o;
     300          memset(&t,0,sizeof(t));
     301          t.it_value.tv_sec     =(unsigned)((unsigned long)h->Data());
     302          setitimer(ITIMER_VIRTUAL,&t,&o);
     303          return FALSE;
     304        }
     305        else
     306          WerrorS("int expected");
     307      }
     308      else
     309  #endif
    290310/*==================== cpu ==================================*/
    291311    if(strcmp(sys_cmd,"cpu")==0)
     
    315335      }
    316336      return TRUE;
     337    }
     338    else
     339  /*==================== neworder =============================*/
     340    if(strcmp(sys_cmd,"neworder")==0)
     341    {
     342      if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))
     343      {
     344        res->rtyp=STRING_CMD;
     345        res->data=(void *)singclap_neworder((ideal)h->Data(), currRing);
     346        return FALSE;
     347      }
     348      else
     349        WerrorS("ideal expected");
    317350    }
    318351    else
     
    26032636      else
    26042637  #endif
    2605   /*==================== alarm ==================================*/
    2606   #ifdef unix
    2607       if(strcmp(sys_cmd,"alarm")==0)
    2608       {
    2609         if ((h!=NULL) &&(h->Typ()==INT_CMD))
    2610         {
    2611           // standard variant -> SIGALARM (standard: abort)
    2612           //alarm((unsigned)h->next->Data());
    2613           // process time (user +system): SIGVTALARM
    2614           struct itimerval t,o;
    2615           memset(&t,0,sizeof(t));
    2616           t.it_value.tv_sec     =(unsigned)((unsigned long)h->Data());
    2617           setitimer(ITIMER_VIRTUAL,&t,&o);
    2618           return FALSE;
    2619         }
    2620         else
    2621           WerrorS("int expected");
    2622       }
    2623       else
    2624   #endif
    26252638  /*==================== red =============================*/
    26262639  #if 0
     
    35983611        return TRUE;
    35993612      }
    3600     }
    3601     else
    3602   /*==================== neworder =============================*/
    3603     if(strcmp(sys_cmd,"neworder")==0)
    3604     {
    3605       if ((h!=NULL) &&(h->Typ()==IDEAL_CMD))
    3606       {
    3607         res->rtyp=STRING_CMD;
    3608         res->data=(void *)singclap_neworder((ideal)h->Data(), currRing);
    3609         return FALSE;
    3610       }
    3611       else
    3612         WerrorS("ideal expected");
    36133613    }
    36143614    else
Note: See TracChangeset for help on using the changeset viewer.