Changeset 8de3388 in git for Singular/misc_ip.cc


Ignore:
Timestamp:
Jul 15, 2010, 4:49:04 PM (13 years ago)
Author:
Andreas Steenpaß <steenpas@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
Children:
1dba075fdedd6b7fdac018f3b79cfab9ba2a2e52
Parents:
6263f270b03890e5e7d11a4d6e8a10544a454c92
Message:

M    kernel/misc.cc
M    Singular/misc_ip.cc
automatically closes all links on exit


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

Legend:

Unmodified
Added
Removed
  • Singular/misc_ip.cc

    r6263f2 r8de3388  
    12461246}
    12471247
     1248/*2
     1249* the global exit routine of Singular
     1250*/
     1251#ifdef HAVE_MPSR
     1252void (*MP_Exit_Env_Ptr)()=NULL;
     1253#endif
     1254
     1255extern "C" {
     1256
     1257void m2_end(int i)
     1258{
     1259  fe_reset_input_mode();
     1260  #ifdef PAGE_TEST
     1261  mmEndStat();
     1262  #endif
     1263  #ifdef HAVE_TCL
     1264  if (tclmode)
     1265  {
     1266    PrintTCL('Q',0,NULL);
     1267  }
     1268  #endif
     1269  fe_reset_input_mode();
     1270  idhdl h = IDROOT;
     1271  while(h != NULL)
     1272  {
     1273    if(IDTYP(h) == LINK_CMD)
     1274    {
     1275      idhdl hh=h->next;
     1276      killhdl(h, currPack);
     1277      h = hh;
     1278    }
     1279    else
     1280    {
     1281      h = h->next;
     1282    }
     1283  }
     1284  if (i<=0)
     1285  {
     1286    #ifdef HAVE_TCL
     1287    if (!tclmode)
     1288    #endif
     1289      if (TEST_V_QUIET)
     1290      {
     1291        if (i==0)
     1292          printf("Auf Wiedersehen.\n");
     1293        else
     1294          printf("\n$Bye.\n");
     1295      }
     1296    //#ifdef sun
     1297    //  #ifndef __svr4__
     1298    //    _cleanup();
     1299    //    _exit(0);
     1300    //  #endif
     1301    //#endif
     1302    exit(0);
     1303  }
     1304  else
     1305  {
     1306    #ifdef HAVE_TCL
     1307    if (!tclmode)
     1308    #endif
     1309      printf("\nhalt %d\n",i);
     1310  }
     1311  #ifdef HAVE_MPSR
     1312  if (MP_Exit_Env_Ptr!=NULL) (*MP_Exit_Env_Ptr)();
     1313  #endif
     1314  exit(i);
     1315}
     1316}
Note: See TracChangeset for help on using the changeset viewer.