Changeset eb0708 in git for kernel


Ignore:
Timestamp:
Nov 19, 2011, 2:47:32 AM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
80c102e75622524947cd27fb319c231bc62c9233
Parents:
615ca847eb54f53d0896364932b51cc9074dffda
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-11-19 02:47:32+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-11-19 03:27:47+01:00
Message:
FIX: preparing dynamic linking:
*    Singular/utils.cc needs 'category_out' from Singular/libparse.cc
*    kernel/semic.cc appeared twice in SOURCE in Makefile.am :(
*    kernel/kutil.cc needed showOption...
CHG: kernel/semic.{h,cc} have got a minor cleanup
FIX: standalone.test/test.cc now respects factory reqs.
CHG: kernel/test.cc needed iiArithCmdOpt from Singular/
Location:
kernel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile.am

    r615ca8 reb0708  
    3838    fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \
    3939    kspoly.cc kpolys.cc \
    40     semic.cc \
    4140    syz.cc syz0.cc syz1.cc syz2.cc syz3.cc \
    4241    timer.cc \
  • kernel/kutil.cc

    r615ca8 reb0708  
    66626662void enterSMoraNF (LObject p,int atS,kStrategy strat, int atR=-1);
    66636663// ../Singular/misc.cc:
    6664 char *  showOption();
     6664extern char *  showOption();
    66656665
    66666666void kDebugPrint(kStrategy strat)
  • kernel/semic.cc

    r615ca8 reb0708  
    88#define SEMIC_CC
    99
    10 #include"mod2.h"
     10#include "mod2.h"
    1111
    1212#ifdef HAVE_SPECTRUM
     
    1414#ifdef  SEMIC_PRINT
    1515#ifndef SEMIC_IOSTREAM
    16 #include<stdio.h>
     16#include <stdio.h>
    1717#else
    18 #include<iostream.h>
     18#include <iostream.h>
    1919#endif
    2020#endif
    2121
    22 #include<string.h>
     22#include <string.h>
     23
    2324#ifndef ix86_Win
    2425//#include<values.h>
    2526#endif
    2627
    27 #include<misc/intvec.h>
    28 #include<misc/mylimits.h>
    29 #include"GMPrat.h"
    30 #include"semic.h"
    31 
    32 // ----------------------------------------------------------------------------
    33 //  Delete the memory of a spectrum
    34 // ----------------------------------------------------------------------------
    35 
    36 inline void spectrum::copy_delete( void )
    37 {
    38     if( s != (Rational*)NULL && n > 0 ) delete [] s;
    39     if( w != (int*)NULL      && n > 0 ) delete [] w;
    40     copy_zero( );
     28#include <misc/intvec.h>
     29#include <misc/mylimits.h>
     30#include "GMPrat.h"
     31#include "semic.h"
     32
     33// ----------------------------------------------------------------------------
     34//  Copy constructor for  spectrum
     35// ----------------------------------------------------------------------------
     36
     37spectrum::spectrum( const spectrum &spec )
     38{
     39    copy_deep( spec );
     40}
     41
     42// ----------------------------------------------------------------------------
     43//  Destructor for  spectrum
     44// ----------------------------------------------------------------------------
     45
     46spectrum::~spectrum( )
     47{
     48    copy_delete( );
    4149}
    4250
     
    110118
    111119// ----------------------------------------------------------------------------
    112 //  Copy constructor for  spectrum
    113 // ----------------------------------------------------------------------------
    114 
    115 spectrum::spectrum( const spectrum &spec )
    116 {
    117     copy_deep( spec );
    118 }
    119 
    120 // ----------------------------------------------------------------------------
    121 //  Destructor for  spectrum
    122 // ----------------------------------------------------------------------------
    123 
    124 spectrum::~spectrum( )
    125 {
    126     copy_delete( );
    127 }
    128 
    129 
    130 // ----------------------------------------------------------------------------
    131120//  operator  =  for  spectrum
    132121// ----------------------------------------------------------------------------
  • kernel/semic.h

    r615ca8 reb0708  
    1212#ifndef SEMIC_H
    1313#define SEMIC_H
     14
     15#ifdef HAVE_SPECTRUM
     16
    1417
    1518#include <kernel/GMPrat.h>
     
    6871    int         *w;      // multiplicities
    6972
    70     spectrum( );
    71     spectrum( const spectrum& );
     73//    spectrum( );
    7274//    spectrum( lists );
    7375
     76    ///  Zero constructor
     77    spectrum( )
     78    {
     79       copy_zero( );
     80    }
     81
     82    spectrum( const spectrum& );
     83   
    7484    ~spectrum( );
    7585
     
    8595
    8696    void    copy_new    ( int );
    87     void    copy_delete ( void );
    88     void    copy_zero   ( void );
     97//    void    copy_delete ( void );
    8998
    90     void    copy_shallow( spectrum& );
     99///  Delete the memory of a spectrum
     100inline void copy_delete( void )
     101{
     102    if( s != (Rational*)NULL && n > 0 ) delete [] s;
     103    if( w != (int*)NULL      && n > 0 ) delete [] w;
     104    copy_zero( );
     105}
     106
     107///  Initialize with zero
     108inline void copy_zero( void )
     109{
     110    mu = 0;
     111    pg = 0;
     112    n  = 0;
     113    s  = (Rational*)NULL;
     114    w  = (int*)NULL;
     115}
     116
     117///  Initialize shallow from another spectrum
     118inline void copy_shallow( spectrum &spec )
     119{
     120    mu = spec.mu;
     121    pg = spec.pg;
     122    n  = spec.n;
     123    s  = spec.s;
     124    w  = spec.w;
     125}
     126
    91127    void    copy_deep   ( const spectrum& );
    92128//    void    copy_deep   ( lists );
     
    105141};
    106142
    107 
    108 // ----------------------------------------------------------------------------
    109 //  Initialize with zero
    110 // ----------------------------------------------------------------------------
    111 
    112 inline void spectrum::copy_zero( void )
    113 {
    114     mu = 0;
    115     pg = 0;
    116     n  = 0;
    117     s  = (Rational*)NULL;
    118     w  = (int*)NULL;
    119 }
    120 
    121 // ----------------------------------------------------------------------------
    122 //  Initialize shallow from another spectrum
    123 // ----------------------------------------------------------------------------
    124 
    125 inline void spectrum::copy_shallow( spectrum &spec )
    126 {
    127     mu = spec.mu;
    128     pg = spec.pg;
    129     n  = spec.n;
    130     s  = spec.s;
    131     w  = spec.w;
    132 }
    133 
    134 // ----------------------------------------------------------------------------
    135 //  Zero constructor
    136 // ----------------------------------------------------------------------------
    137 
    138 inline spectrum::spectrum( )
    139 {
    140     copy_zero( );
    141 }
    142 
     143#endif /*HAVE_SPECTRUM*/
    143144// ----------------------------------------------------------------------------
    144145//  semic.h
  • kernel/test.cc

    r615ca8 reb0708  
    5555int mmInit(void) {return 1; }
    5656#endif
     57
     58// // TODO: DUE to the use of HALT in npolygon.cc :(((
     59extern "C" {void m2_end(int i){exit(i);}}
     60
     61// // TODO: DUE to its use in kutil.cc :(((
     62char * showOption(){return NULL;}
     63
     64// // TODO: DUE to its use in feread.cc :(((
     65char *iiArithGetCmd(int nPos){return NULL; }
    5766
    5867
Note: See TracChangeset for help on using the changeset viewer.