Changeset 8a839d1 in git


Ignore:
Timestamp:
Sep 22, 1998, 12:29:45 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
Children:
e0d91ca23156d80a43dde9ffd342ab947b5cc298
Parents:
3ab190a8d35777d9a45959eb4ca0dedfb3ec5683
Message:
* hannes: fixed last fix


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

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_Put.cc

    r3ab190 r8a839d1  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mpsr_Put.cc,v 1.11 1998-09-21 12:42:10 Singular Exp $ */
     4/* $Id: mpsr_Put.cc,v 1.12 1998-09-22 10:29:45 Singular Exp $ */
    55
    66
     
    1313 * Change History (most recent first):
    1414 *  o 1/97 obachman
    15  *    Updated putting routines to MP and MPP v1.1 
     15 *    Updated putting routines to MP and MPP v1.1
    1616 *
    1717 ***************************************************************/
     
    131131      case NONE:
    132132        return mpsr_Success;
    133        
     133
    134134      default:
    135135        return mpsr_SetError(mpsr_UnknownLeftvType);
     
    144144{
    145145  int length = iv->length();
    146  
    147   // Put the Vector Operator 
     146
     147  // Put the Vector Operator
    148148  mp_failr(MP_PutCommonOperatorPacket(link,
    149149                                      MP_MatrixDict,
     
    151151                                      1,
    152152                                      length));
    153   // Prototype Annot 
     153  // Prototype Annot
    154154  mp_failr(MP_PutAnnotationPacket(link,
    155155                                  MP_ProtoDict,
     
    157157                                  MP_AnnotReqValNode));
    158158  // Together with the CommonMetaTypePacket specifying that each element of
    159   // the vector is an Sint32 
     159  // the vector is an Sint32
    160160  mp_failr(MP_PutCommonMetaTypePacket(link,
    161161                                      MP_ProtoDict,
    162162                                      MP_CmtProtoIMP_Sint32,
    163163                                      0));
    164  
    165   // Now we finally put the data 
     164
     165  // Now we finally put the data
    166166  mp_return(IMP_PutSint32Vector(link, (MP_Sint32_t *) iv->ivGetVec(),
    167167                                length));
     
    172172  int r = iv->rows(), c = iv->cols(), length = r*c;
    173173
    174   // First, we put the Matrix operator 
     174  // First, we put the Matrix operator
    175175  mp_failr(MP_PutCommonOperatorPacket(link,
    176176                                      MP_MatrixDict,
     
    178178                                      2,
    179179                                      length));
    180   // Put the two annotations 
    181   // First, the prototype annot 
     180  // Put the two annotations
     181  // First, the prototype annot
    182182  mp_failr(MP_PutAnnotationPacket(link,
    183183                                  MP_ProtoDict,
     
    188188                                  MP_CmtProtoIMP_Sint32,
    189189                                  0));
    190   // And second, the dimension annot 
     190  // And second, the dimension annot
    191191  mp_failr(MP_PutAnnotationPacket(link,
    192192                                  MP_MatrixDict,
     
    202202  mp_failr(MP_PutUint32Packet(link, (MP_Uint32_t) c, 0));
    203203
    204   // And finally, we put the elments 
     204  // And finally, we put the elments
    205205  mp_return(IMP_PutSint32Vector(link, (MP_Sint32_t *) iv->ivGetVec(),
    206206                                length));
     
    224224
    225225  failr(mpsr_tok2mp('=', &dict, &cop));
    226  
     226
    227227  // A Singular- procedure is sent as a cop with the string as arg
    228228  mp_failr(MP_PutCommonOperatorPacket(link,
    229                                         dict,
    230                                         cop,
    231                                         0,
    232                                         2));
     229                                        dict,
     230                                        cop,
     231                                        0,
     232                                        2));
    233233  mp_failr(MP_PutIdentifierPacket(link, MP_SingularDict, pname,1));
    234234  mp_failr(MP_PutAnnotationPacket(link,
    235                                   MP_SingularDict,
    236                                   MP_AnnotSingularProcDef,
    237                                   0));
     235                                  MP_SingularDict,
     236                                  MP_AnnotSingularProcDef,
     237                                  0));
    238238  if( proc->language == LANG_SINGULAR) {
    239239    if (proc->data.s.body == NULL)
     
    336336    mpsr_SetCurrRing(cring, TRUE);
    337337  }
    338  
     338
    339339  if (!nIsZero(n))
    340340  {
     
    346346
    347347  if (rr != NULL) mpsr_SetCurrRing(rr, TRUE);
    348  
     348
    349349  return r;
    350350}
     
    421421                                          0));
    422422  failr(mpsr_PutRingAnnots(link, cring, 1));
    423  
     423
    424424  mp_failr(MP_PutAnnotationPacket(link,
    425425                                    MP_PolyDict,
     
    427427                                    MP_AnnotValuated));
    428428  mp_failr(MP_PutUint32Packet(link, id->rank, 0));
    429  
     429
    430430  for (i=0; i < idn; i++)
    431431  {
     
    441441  MP_Uint32_t n = nrows*ncols, i;
    442442
    443   // First, we put the Matrix operator 
     443  // First, we put the Matrix operator
    444444  mp_failr(MP_PutCommonOperatorPacket(link,
    445445                                      MP_MatrixDict,
     
    447447                                      2,
    448448                                      n));
    449   // Put the two annotations 
    450   // First, the prototype annot 
     449  // Put the two annotations
     450  // First, the prototype annot
    451451  mp_failr(MP_PutAnnotationPacket(link,
    452452                                  MP_ProtoDict,
     
    473473  mp_failr(MP_PutUint32Packet(link, (MP_Uint32_t) ncols, 0));
    474474
    475   // And finally, we put the elments 
     475  // And finally, we put the elments
    476476  for (i=0; i < n; i++)
    477477  {
     
    507507  // Second, the name of the ring
    508508  mp_failr(MP_PutStringPacket(link, m->preimage,0));
    509  
     509
    510510  // and third, the ideal --
    511511  // supposing that we can cast a map to an ideal
     
    515515
    516516/***************************************************************
    517  * 
     517 *
    518518 * A routine which dumps the content of Singular to a file
    519519 *
     
    532532  cmd.arg1.rtyp = DEF_CMD;
    533533  lv = mpsr_InitLeftv(COMMAND, (void *) &cmd);
    534  
     534
    535535  MP_ResetLink(link);
    536536  while (h != NULL && h2 == NULL)
    537537  {
    538    
     538
    539539    if (IDTYP(h) == PROC_CMD)
    540540    {
     
    569569          cmd.arg1.name = IDID(h2);
    570570          //memcpy(&(cmd.arg2), h2, sizeof(sleftv));
    571           cmd.arg2.data=IDDATA(h);
    572           cmd.arg2.flag=h->flag;
    573           cmd.arg2.attribute=h->attribute;
    574           cmd.arg2.rtyp=h->typ;
     571          cmd.arg2.data=IDDATA(h2);
     572          cmd.arg2.flag=h2->flag;
     573          cmd.arg2.attribute=h2->attribute;
     574          cmd.arg2.rtyp=h2->typ;
    575575          if (mpsr_PutLeftv(link, lv, r) != mpsr_Success) break;
    576576#ifdef MPSR_DEBUG
     
    581581      }
    582582    }
    583    
     583
    584584    h = h->next;
    585585  }
     
    587587  Free(lv, sizeof(sleftv));
    588588  if (rh != NULL && rh != currRingHdl) rSetHdl(rh, TRUE);
    589  
     589
    590590  if (h == NULL && h2 == NULL)
    591591    return mpsr_Success;
     
    593593    return mpsr_Failure;
    594594}
    595  
     595
    596596#endif // HAVE_MPSR
    597597
Note: See TracChangeset for help on using the changeset viewer.