Changeset 286bd57 in git for Singular/mpsr_Put.cc


Ignore:
Timestamp:
Mar 28, 1997, 10:44:40 PM (27 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
16910e1c7d0e5650764c7686671407d794630421
Parents:
a6815bc36646e83a9fa1fd030f6cedf55e4441b5
Message:
Fri Mar 28 14:12:05 1997  Olaf Bachmann
<obachman@ratchwum.mathematik.uni-kl.de (Olaf Bachmann)>

	* Added routines dump(link) and getdump(link) for ascii and MP
	  links

	* ipconv.cc (dConvertTypes): added int->module conversion so that
	  'module m = 0' works

	* iparith.cc (jjVAR1): added LINK_CMD to list of typeof(...)


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

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_Put.cc

    ra6815b r286bd57  
    491491 *
    492492 ***************************************************************/
    493 BOOLEAN mpsr_PutDump(char *fn)
    494 {
    495   MP_Link_pt link = OpenMPFile(fn, 0);
    496   BOOLEAN status;
    497 
    498   if (link == NULL) return FALSE;
    499   else status = mpsr_PutDump(link);
    500 
    501   MP_CloseLink(link);
    502   return status;
    503 }
    504 
    505 
    506 BOOLEAN mpsr_PutDump(MP_Link_pt link)
     493mpsr_Status_t mpsr_PutDump(MP_Link_pt link)
    507494{
    508495  idhdl h = idroot, h2 = NULL, rh = currRingHdl;
     
    564551 
    565552  if (h == NULL && h2 == NULL)
    566     return TRUE;
     553    return mpsr_Success;
    567554  else
    568   {
    569     mpsr_PrintError();
    570     return FALSE;
    571   }
    572 }
    573  
    574 BOOLEAN mpsr_PutDump(leftv h)
    575 {
    576   if (h == NULL)
    577   {
    578     Print("Using file %s for dump\n", MPSR_DEFAULT_DUMP_FILE);
    579     return mpsr_PutDump(MPSR_DEFAULT_DUMP_FILE);
    580   }
    581   else if (h->Typ() == STRING_CMD)
    582   {
    583     return mpsr_PutDump((char *) h->Data());
    584   }
    585   else if (h->Typ() == LINK_CMD)
    586   {
    587     si_link l = (si_link) h->Data();
    588     if (SI_LINK_W_OPEN_P(l) && mpsr_IsMPLink(l))
    589       return mpsr_PutDump((MP_Link_pt) l->data);
    590     else
    591       Werror("Can only dump data to an already opened MP link");
    592   }
    593   else
    594   {
    595     Werror("Need string or opened MP Link");
    596   }
    597   return FALSE;
    598 }
     555    return mpsr_Failure;
     556}
     557 
    599558#endif // HAVE_MPSR
    600559
Note: See TracChangeset for help on using the changeset viewer.