Changeset 07dacd in git


Ignore:
Timestamp:
Jul 1, 1997, 5:41:55 PM (27 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '0bc2210f8055033868008a3836878db65ec6f89e')
Children:
52810913e91e34d44e466f459d28b0a87d286a5a
Parents:
ba65c470b2b0569a9585d1b74779e6be2377ec6f
Message:
* hannes: clean up  unused code: binom.cc extra.cc scanner.cc scanner.l
                                 numbers.cc numbers.h
          recovery with setjmp/longjmp: tesths.cc cntrlc.cc cntrlc.h
          changed error messages: ipassign.cc


git-svn-id: file:///usr/local/Singular/svn/trunk@479 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • Singular/binom.cc

    rba65c4 r07dacd  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: binom.cc,v 1.3 1997-04-02 15:06:55 Singular Exp $ */
     4/* $Id: binom.cc,v 1.4 1997-07-01 15:41:41 Singular Exp $ */
    55
    66/*
     
    1818
    1919#ifdef TEST_MAC_ORDER
    20 static char rcsid[] = "$Id: binom.cc,v 1.3 1997-04-02 15:06:55 Singular Exp $";
    21 
    2220extern int  pComponentOrder;
    2321/* ----------- global variables, set by bBinomSet --------------------- */
  • Singular/cntrlc.cc

    rba65c4 r07dacd  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: cntrlc.cc,v 1.12 1997-06-09 12:17:48 Singular Exp $ */
     4/* $Id: cntrlc.cc,v 1.13 1997-07-01 15:41:43 Singular Exp $ */
    55/*
    66* ABSTRACT - interupt handling
     
    5656
    5757/* data */
     58jmp_buf si_start_jmpbuf;
     59int siRandomStart;
     60short si_restart=0;
    5861BOOLEAN siCntrlc = FALSE;
    59 int siRandomStart;
    6062
    6163/*0 implementation*/
     
    108110                   (int)s.eip,(int)s.cr2,siRandomStart);
    109111  }
     112#ifdef __OPTIMIZE__
     113  if(si_restart<3)
     114  {
     115    si_restart++;
     116    fprintf(stderr,"trying to restart...\n");
     117    init_signals();
     118    longjmp(si_start_jmpbuf,1);
     119  }
     120#endif
    110121#ifdef HAVE_FEREAD
    111122  fe_reset_input_mode();
     
    308319  {
    309320    int cnt=0;
    310     fputs("\nabort(a), continue(c) or quit(q) ?",stderr);fflush(stderr);
     321    fputs("\nabort command(a), continue(c) or quit Singular(q) ?",stderr);fflush(stderr);
    311322    switch(fgetc(stdin))
    312323    {
    313324      case 'q':
    314325                m2_end(2);
     326      case 'r':
     327                longjmp(si_start_jmpbuf,1);
    315328      case 'a':
    316329                siCntrlc++;
     
    318331                fgetc(stdin);
    319332                signal(SIGINT ,(s_hdl_typ)sigint_handler);
    320                 return;         
     333                return;
    321334                //siCntrlc ++;
    322335                //if (siCntrlc>2) signal(SIGINT,(s_hdl_typ) sigsegv_handler);
  • Singular/cntrlc.h

    rba65c4 r07dacd  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: cntrlc.h,v 1.5 1997-06-09 12:17:49 Singular Exp $ */
     6/* $Id: cntrlc.h,v 1.6 1997-07-01 15:41:44 Singular Exp $ */
    77/*
    88* ABSTRACT - interupt and signal handling
    99*/
     10#include <setjmp.h>
    1011#include "structs.h"
    1112
     13extern jmp_buf si_start_jmpbuf;
     14extern short si_restart;
    1215extern int siRandomStart;
    1316extern BOOLEAN siCntrlc;
  • Singular/configure

    rba65c4 r07dacd  
    536536SINGULAR_MAJOR_VERSION=1
    537537SINGULAR_MINOR_VERSION=1
    538 SINGULAR_SUB_VERSION=0
    539 VERSION_DATE="June 1997"
     538SINGULAR_SUB_VERSION=1
     539VERSION_DATE="July 1997"
    540540
    541541
     
    997997fi
    998998
    999 # Check whether --with-gmp or --without-gmp was given.
    1000 if test "${with_gmp+set}" = set; then
    1001   withval="$with_gmp"
     999# Check whether --with-apint or --without-apint was given.
     1000if test "${with_apint+set}" = set; then
     1001  withval="$with_apint"
    10021002  :
    10031003fi
     
    18511851    if test "$ac_gmp_ok" = yes; then
    18521852      ac_will_have_gmp=yes
    1853     elif test "$eanble_gmp" = yes; then
     1853    elif test "$enable_gmp" = yes; then
    18541854      ac_will_have_gmp=yes
    18551855      echo "configure: warning: install gmp before making Singular" 1>&2
  • Singular/configure.in

    rba65c4 r07dacd  
    88SINGULAR_MAJOR_VERSION=1
    99SINGULAR_MINOR_VERSION=1
    10 SINGULAR_SUB_VERSION=0
    11 VERSION_DATE="June 1997"
     10SINGULAR_SUB_VERSION=1
     11VERSION_DATE="July 1997"
    1212AC_SUBST(SINGULAR_MAJOR_VERSION)
    1313AC_SUBST(SINGULAR_MINOR_VERSION)
  • Singular/extra.cc

    rba65c4 r07dacd  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.12 1997-06-30 17:04:42 obachman Exp $ */
     4/* $Id: extra.cc,v 1.13 1997-07-01 15:41:48 Singular Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    159159        res->data=(void *)s;
    160160        return FALSE;
    161       } 
     161      }
    162162      else if (h->next->Typ()==STRING_CMD)
    163163      {
     
    346346#endif
    347347#endif
    348 /*==================== std =============================*/
    349 #if 0
    350 #ifdef HAVE_FACTORY
    351     if(strcmp((char*)(h->Data()),"std")==0)
    352     {
    353       if ((h->next!=NULL) &&(h->next->Typ()==IDEAL_CMD))
    354       {
    355         res->rtyp=LIST_CMD;
    356         res->data=(void *)stdfac((ideal)h->next->Data(),NULL,testHomog,NULL);
    357         return FALSE;
    358       }
    359       else
    360         WerrorS("ideal expected");
    361     }
    362     else
    363 #endif
    364 #endif
    365348/*==================== red =============================*/
    366349#if 0
     
    379362    else
    380363#endif
    381 /*==================== min_std =============================*/
    382 #if 0
    383     if(strcmp((char*)(h->Data()),"min_std")==0)
    384     {
    385       if ((h->next!=NULL) &&(h->next->Typ()==IDEAL_CMD))
    386       {
    387         res->rtyp=LIST_CMD;
    388         res->data=(void *)min_std((ideal)h->next->Data(),currQuotient,testHomog,NULL);
    389         return FALSE;
    390       }
    391       else
    392         WerrorS("ideal expected");
    393     }
    394     else
    395 #endif
    396364/*==================== writemat ==================================*/
    397     if(strcmp((char*)(h->Data()),"writemat")==0)
    398     {
    399       if (h->next!=NULL)
    400       {
    401         leftv v=h->next;
    402         if (v->Typ() == STRING_CMD)
    403         {
    404           char *filename = (char *)v->Data();
    405           v = v->next;
    406           if (v->Typ()==MATRIX_CMD)
    407           {
    408             FILE *outfile = fopen(filename,"a");
    409             if (outfile==NULL)
    410             {
    411               Werror("cannot write to file %s",filename);
    412               return TRUE;
    413             }
    414             matrix m=(matrix)v->Data();
    415             fprintf(outfile,"%d\n%d\n",MATROWS(m),MATCOLS(m));
    416             char *s = iiStringMatrix(m,2);
    417             fprintf(outfile,"%s\n",s);
    418             FreeL((ADDRESS)s);
    419             fclose(outfile);
    420             return FALSE;
    421           }
    422           else
    423           {
    424             WerrorS("matrix expected");
    425           }
    426         }
    427         else
    428         {
    429           WerrorS("string expected");
    430         }
    431       }
    432       else
    433         WerrorS("matrix expected");
    434     }
    435     else
     365//    if(strcmp((char*)(h->Data()),"writemat")==0)
     366//    {
     367//      if (h->next!=NULL)
     368//      {
     369//        leftv v=h->next;
     370//        if (v->Typ() == STRING_CMD)
     371//        {
     372//          char *filename = (char *)v->Data();
     373//          v = v->next;
     374//          if (v->Typ()==MATRIX_CMD)
     375//          {
     376//            FILE *outfile = fopen(filename,"a");
     377//            if (outfile==NULL)
     378//            {
     379//              Werror("cannot write to file %s",filename);
     380//              return TRUE;
     381//            }
     382//            matrix m=(matrix)v->Data();
     383//            fprintf(outfile,"%d\n%d\n",MATROWS(m),MATCOLS(m));
     384//            char *s = iiStringMatrix(m,2);
     385//            fprintf(outfile,"%s\n",s);
     386//            FreeL((ADDRESS)s);
     387//            fclose(outfile);
     388//            return FALSE;
     389//          }
     390//          else
     391//          {
     392//            WerrorS("matrix expected");
     393//          }
     394//        }
     395//        else
     396//        {
     397//          WerrorS("string expected");
     398//        }
     399//      }
     400//      else
     401//        WerrorS("matrix expected");
     402//    }
     403//    else
    436404#ifdef HAVE_FACTORY
    437405/*==================== pdivide ====================*/
     
    519487        WerrorS("ideal expected");
    520488    }
    521 /*==================== indsetall =============================*/
     489    else
     490/*==================== ftest =============================*/
    522491    if(strcmp((char*)(h->Data()),"ftest")==0)
    523492    {
  • Singular/ipassign.cc

    rba65c4 r07dacd  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipassign.cc,v 1.13 1997-06-17 09:44:25 Singular Exp $ */
     4/* $Id: ipassign.cc,v 1.14 1997-07-01 15:41:49 Singular Exp $ */
    55
    66/*
     
    610610    }
    611611    // error handling ---------------------------------------------------
    612     Werror("`%s` = `%s` is not supported"
    613            ,Tok2Cmdname(lt),Tok2Cmdname(rt));
    614     if (BVERBOSE(V_SHOW_USE))
    615     {
    616       i=0;
    617       while ((dAssign[i].res!=lt)
    618         && (dAssign[i].res!=0)) i++;
    619       while (dAssign[i].res==lt)
    620       {
    621         Werror("expected `%s` = `%s`"
    622             ,Tok2Cmdname(lt),Tok2Cmdname(dAssign[i].arg));
    623         i++;
     612    if (!errorreported)
     613    {
     614      Werror("`%s` = `%s` is not supported"
     615             ,Tok2Cmdname(lt),Tok2Cmdname(rt));
     616      if (BVERBOSE(V_SHOW_USE))
     617      {
     618        i=0;
     619        while ((dAssign[i].res!=lt)
     620          && (dAssign[i].res!=0)) i++;
     621        while (dAssign[i].res==lt)
     622        {
     623          Werror("expected `%s` = `%s`"
     624              ,Tok2Cmdname(lt),Tok2Cmdname(dAssign[i].arg));
     625          i++;
     626        }
    624627      }
    625628    }
     
    684687    }
    685688    // error handling ---------------------------------------------------
    686     Werror("`%s` = `%s` is not supported"
    687            ,Tok2Cmdname(lt),Tok2Cmdname(rt));
    688     if (BVERBOSE(V_SHOW_USE))
    689     {
    690       i=0;
    691       while ((dAssign_sys[i].res!=lt)
    692         && (dAssign_sys[i].res!=0)) i++;
    693       while (dAssign_sys[i].res==lt)
    694       {
    695         Werror("expected `%s` = `%s`"
    696             ,Tok2Cmdname(lt),Tok2Cmdname(dAssign_sys[i].arg));
    697         i++;
     689    if(!errorreported)
     690    {
     691      Werror("`%s` = `%s` is not supported"
     692             ,Tok2Cmdname(lt),Tok2Cmdname(rt));
     693      if (BVERBOSE(V_SHOW_USE))
     694      {
     695        i=0;
     696        while ((dAssign_sys[i].res!=lt)
     697          && (dAssign_sys[i].res!=0)) i++;
     698        while (dAssign_sys[i].res==lt)
     699        {
     700          Werror("expected `%s` = `%s`"
     701              ,Tok2Cmdname(lt),Tok2Cmdname(dAssign_sys[i].arg));
     702          i++;
     703        }
    698704      }
    699705    }
  • Singular/numbers.cc

    rba65c4 r07dacd  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: numbers.cc,v 1.4 1997-05-02 15:10:23 Singular Exp $ */
     4/* $Id: numbers.cc,v 1.5 1997-07-01 15:41:50 Singular Exp $ */
    55
    66/*
     
    2828
    2929//static int characteristic = 0;
    30 short numbers_delind = 0;
    3130extern int IsPrime(int p);
    3231
     
    113112    nDelete= naDelete;
    114113#endif
    115     numbers_delind=1;
    116114    if (complete)
    117115    {
     
    160158    nDelete= nlDelete;
    161159#endif
    162     numbers_delind=1;
    163160    if (complete)
    164161    {
     
    204201    nDelete= nDummy1;
    205202#endif
    206     numbers_delind=0;
    207203    if (complete)
    208204    {
     
    249245    nDelete= nDummy1;
    250246#endif
    251     numbers_delind=0;
    252247    if (complete)
    253248    {
  • Singular/numbers.h

    rba65c4 r07dacd  
    44*  Computer Algebra System SINGULAR     *
    55****************************************/
    6 /* $Id: numbers.h,v 1.3 1997-04-09 12:20:05 Singular Exp $ */
     6/* $Id: numbers.h,v 1.4 1997-07-01 15:41:51 Singular Exp $ */
    77/*
    88* ABSTRACT: interface to coefficient aritmetics
     
    1515
    1616/* variables */
    17 extern short numbers_delind;
    1817extern short fftable[];
    1918/*extern int characteristic;*/
  • Singular/scanner.l

    rba65c4 r07dacd  
    33*  Computer Algebra System SINGULAR     *
    44****************************************/
    5 /* $Id: scanner.l,v 1.6 1997-05-05 10:08:20 Singular Exp $ */
     5/* $Id: scanner.l,v 1.7 1997-07-01 15:41:53 Singular Exp $ */
    66#include <stdio.h>
    77#include <string.h>
     
    3434extern int yyleng;
    3535extern int inputswitch;
    36 extern int noringvars;
     36extern BOOLEAN noringvars;
    3737extern int inerror;
    3838
  • Singular/tesths.cc

    rba65c4 r07dacd  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: tesths.cc,v 1.19 1997-06-20 10:19:05 obachman Exp $ */
     4/* $Id: tesths.cc,v 1.20 1997-07-01 15:41:55 Singular Exp $ */
    55
    66/*
     
    4646
    4747/*0 implementation*/
    48 char * thisfile;
    4948int main(          /* main entry to Singular */
    5049    int argc,      /* number of parameter */
    5150    char** argv)   /* parameter array */
    5251{
     52  char * thisfile;
    5353  /* initialize components */
    5454  siRandomStart=inits();
     
    296296#endif
    297297#endif
     298  setjmp(si_start_jmpbuf);
    298299  yyparse();
    299300#endif
Note: See TracChangeset for help on using the changeset viewer.