Changeset e2202ee in git


Ignore:
Timestamp:
Oct 30, 2013, 6:06:10 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
6bf3eb6562daca62390dcfae2e79a0bbe6b0bb5f
Parents:
17bdb2dc9f70b60fd8d6e0b982bce9729a6f2792
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-10-30 18:06:10+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2013-10-31 10:34:28+01:00
Message:
fix: compiler warnings (64bit/const char*)
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r17bdb2 re2202ee  
    34963496          lV=(int)((long)(h->Data()));
    34973497          res->rtyp = INT_CMD;
    3498           res->data = (void*)pLastVblock(p, lV);
     3498          res->data = (void*)(long)pLastVblock(p, lV);
    34993499        }
    35003500        else return TRUE;
     
    37373737          int irred= probIrredTest (F, error);
    37383738          res->rtyp= INT_CMD;
    3739           res->data= (void*)irred;
     3739          res->data= (void*)(long)irred;
    37403740          return FALSE;
    37413741        }
     
    38083808        if ((h->next->next!=NULL)&& (h->next->next->Typ()==INT_CMD))
    38093809          v=(int)(long)h->next->next->Data();
    3810         res->data=(char *)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);
     3810        res->data=(char *)(long)simpleipc_cmd((char *)h->Data(),(int)(long)h->next->Data(),v);
    38113811        res->rtyp=INT_CMD;
    38123812        return FALSE;
  • Singular/iparith.cc

    r17bdb2 re2202ee  
    52585258}
    52595259
    5260 BOOLEAN jjLOAD(char *s, BOOLEAN autoexport)
     5260BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
    52615261{
    52625262  char libnamebuf[256];
     
    52645264
    52655265#ifdef HAVE_DYNAMIC_LOADING
    5266   extern BOOLEAN load_modules(char *newlib, char *fullpath, BOOLEAN autoexport);
     5266  extern BOOLEAN load_modules(const char *newlib, char *fullpath, BOOLEAN autoexport);
    52675267#endif /* HAVE_DYNAMIC_LOADING */
    52685268  switch(LT)
     
    53035303      }
    53045304      case LT_BUILTIN:
    5305         SModulFunc_t iiGetBuiltinModInit(char*);
     5305        SModulFunc_t iiGetBuiltinModInit(const char*);
    53065306        return load_builtin(s,autoexport, iiGetBuiltinModInit(s));
    53075307      case LT_MACH_O:
  • Singular/ipassign.cc

    r17bdb2 re2202ee  
    10661066  while ((i<iv->length())&&(l!=NULL))
    10671067  {
    1068     t.data=(char *)(*iv)[i];
     1068    t.data=(char *)(long)(*iv)[i];
    10691069    h=l->next;
    10701070    l->next=NULL;
  • Singular/ipid.h

    r17bdb2 re2202ee  
    8383/* module support */
    8484typedef int (*SModulFunc_t)(SModulFunctions*);
    85 BOOLEAN load_builtin(char *newlib, BOOLEAN autoexport, SModulFunc_t init);
     85BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init);
    8686void module_help_main(const char *newlib,const char *help);
    8787void module_help_proc(const char *newlib,const char *p, const char *help);
  • Singular/iplib.cc

    r17bdb2 re2202ee  
    4949
    5050#ifdef HAVE_DYNAMIC_LOADING
    51 BOOLEAN load_modules(char *newlib, char *fullname, BOOLEAN autoexport);
     51BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport);
    5252#endif
    5353
     
    741741
    742742SModulFunc_t
    743 iiGetBuiltinModInit(char* libname)
     743iiGetBuiltinModInit(const char* libname)
    744744{
    745745  SI_FOREACH_BUILTIN(SI_GET_BUILTIN_MOD_INIT)
     
    919919}
    920920/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    921 BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, char*newlib,
     921BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char*newlib,
    922922             idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror)
    923923{
     
    11031103/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    11041104#ifdef HAVE_DYNAMIC_LOADING
    1105 BOOLEAN load_modules(char *newlib, char *fullname, BOOLEAN autoexport)
     1105BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport)
    11061106{
    11071107#ifdef HAVE_STATIC
     
    11861186#endif /* HAVE_DYNAMIC_LOADING */
    11871187/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    1188 BOOLEAN load_builtin(char *newlib, BOOLEAN autoexport, SModulFunc_t init)
     1188BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init)
    11891189{
    11901190  int iiAddCproc(const char *libname, const char *procname, BOOLEAN pstatic,
     
    13861386/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
    13871387#ifdef HAVE_LIBPARSER
    1388 void libstack::push(char */*p*/, char *libn)
     1388void libstack::push(const char */*p*/, char *libn)
    13891389{
    13901390  libstackv lp;
     
    14071407}
    14081408
    1409 libstackv libstack::pop(char */*p*/)
     1409libstackv libstack::pop(const char */*p*/)
    14101410{
    14111411  libstackv ls = this;
  • Singular/ipshell.h

    r17bdb2 re2202ee  
    6969*/
    7070/// load lib/module given in v
    71 BOOLEAN jjLOAD(char *s, BOOLEAN autoexport = FALSE);
     71BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport = FALSE);
    7272BOOLEAN iiLocateLib(const char* lib, char* where);
    7373leftv   iiMap(map theMap, const char * what);
     
    9191poly    iiHighCorner(ideal i, int ak);
    9292char *  iiConvName(const char *libname);
    93 BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, char *newlib,
     93BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char *newlib,
    9494                         idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror);
    9595
  • Singular/libparse.cc

    r17bdb2 re2202ee  
    12051205
    12061206#undef YY_DECL
    1207 #define YY_DECL int yylex(char *newlib, const char *libfile, \
     1207#define YY_DECL int yylex(const char *newlib, const char *libfile, \
    12081208                           lib_style_types *lib_style, \
    12091209                           idhdl pl, BOOLEAN autoexport, lp_modes mode)
  • Singular/libparse.h

    r17bdb2 re2202ee  
    7878              const char *procname, int line, long pos, BOOLEAN pstatic=FALSE);
    7979
    80 int yylplex(char *libname, const char *libfile, lib_style_types *lib_style,
     80int yylplex(const char *libname, const char *libfile, lib_style_types *lib_style,
    8181           idhdl pl, BOOLEAN autoexport=FALSE, lp_modes=LOAD_LIB);
    8282
  • Singular/libparse.ll

    r17bdb2 re2202ee  
    155155
    156156#undef YY_DECL
    157 #define YY_DECL int yylex(char *newlib, const char *libfile, \
     157#define YY_DECL int yylex(const char *newlib, const char *libfile, \
    158158                           lib_style_types *lib_style, \
    159159                           idhdl pl, BOOLEAN autoexport, lp_modes mode)
  • Singular/linearAlgebra_ip.cc

    r17bdb2 re2202ee  
    9090      eigenvalues->m[i].data = (void*)nCopy(distinctEVs[i]);
    9191      multiplicities->m[i].rtyp = INT_CMD;
    92       multiplicities->m[i].data = (void*)mults[i];
     92      multiplicities->m[i].data = (void*)(long)mults[i];
    9393      nDelete(&distinctEVs[i]);
    9494    }
  • Singular/misc_ip.cc

    r17bdb2 re2202ee  
    360360  {
    361361    multiplicitiesL->m[i].rtyp = INT_CMD;
    362     multiplicitiesL->m[i].data = (void*)multiplicities[i];
     362    multiplicitiesL->m[i].data = (void*)(long)multiplicities[i];
    363363  }
    364364  omFree(multiplicities);
  • Singular/mod_lib.cc

    r17bdb2 re2202ee  
    2525#define BYTES_TO_CHECK 7
    2626
    27 lib_types type_of_LIB(char *newlib, char *libnamebuf)
     27lib_types type_of_LIB(const char *newlib, char *libnamebuf)
    2828{
    2929  const unsigned char mach_o[]={0xfe,0xed,0xfa,0xce,0};
  • Singular/mod_lib.h

    r17bdb2 re2202ee  
    77#include <polys/mod_raw.h>  /* for lib_types */
    88
    9 lib_types type_of_LIB(char *newlib, char *fullname);
     9lib_types type_of_LIB(const char *newlib, char *fullname);
    1010
    1111#ifdef EMBED_PYTHON
  • Singular/subexpr.h

    r17bdb2 re2202ee  
    120120  BOOLEAN   to_be_done;
    121121  int       cnt;
    122   void      push(char *p, char * libname);
    123   libstackv pop(char *p);
     122  void      push(const char *p, char * libname);
     123  libstackv pop(const char *p);
    124124  inline char *get() { return(libname); }
    125125};
  • Singular/table.h

    r17bdb2 re2202ee  
    11221122//   input type       output type     convert procedure
    11231123//  int -> bigint
    1124    { INT_CMD,         BIGINT_CMD,     D(iiI2BI) , NULL },
     1124   { INT_CMD,         BIGINT_CMD,     D(iiI2BI) , NULL_VAL },
    11251125//  int -> number
    1126    { INT_CMD,         NUMBER_CMD,     D(iiI2N) , NULL },
    1127    { BIGINT_CMD,      NUMBER_CMD,     D(iiBI2N) , NULL },
     1126   { INT_CMD,         NUMBER_CMD,     D(iiI2N) , NULL_VAL },
     1127   { BIGINT_CMD,      NUMBER_CMD,     D(iiBI2N) , NULL_VAL },
    11281128//  int -> poly
    1129    { INT_CMD,         POLY_CMD,       D(iiI2P) , NULL },
    1130    { BIGINT_CMD,      POLY_CMD,       D(iiBI2P) , NULL },
     1129   { INT_CMD,         POLY_CMD,       D(iiI2P) , NULL_VAL },
     1130   { BIGINT_CMD,      POLY_CMD,       D(iiBI2P) , NULL_VAL },
    11311131//  int -> vector
    1132    { INT_CMD,         VECTOR_CMD,     D(iiI2V) , NULL },
    1133    { BIGINT_CMD,      VECTOR_CMD,     D(iiBI2V) , NULL },
     1132   { INT_CMD,         VECTOR_CMD,     D(iiI2V) , NULL_VAL },
     1133   { BIGINT_CMD,      VECTOR_CMD,     D(iiBI2V) , NULL_VAL },
    11341134//  int -> ideal
    1135    { INT_CMD,         IDEAL_CMD,      D(iiI2Id) , NULL },
    1136    { BIGINT_CMD,      IDEAL_CMD,      D(iiBI2Id) , NULL },
     1135   { INT_CMD,         IDEAL_CMD,      D(iiI2Id) , NULL_VAL },
     1136   { BIGINT_CMD,      IDEAL_CMD,      D(iiBI2Id) , NULL_VAL },
    11371137//  int -> matrix
    1138    { INT_CMD,         MATRIX_CMD,     D(iiI2Id) , NULL },
    1139    { BIGINT_CMD,      MATRIX_CMD,     D(iiBI2Id) , NULL },
     1138   { INT_CMD,         MATRIX_CMD,     D(iiI2Id) , NULL_VAL },
     1139   { BIGINT_CMD,      MATRIX_CMD,     D(iiBI2Id) , NULL_VAL },
    11401140//  int -> intvec
    1141    { INT_CMD,         INTVEC_CMD,     D(iiI2Iv) , NULL },
     1141   { INT_CMD,         INTVEC_CMD,     D(iiI2Iv) , NULL_VAL },
    11421142//  intvec -> intmat
    1143    { INTVEC_CMD,      INTMAT_CMD,     D(iiDummy), NULL },
     1143   { INTVEC_CMD,      INTMAT_CMD,     D(iiDummy), NULL_VAL },
    11441144//  intvec -> matrix
    1145    { INTVEC_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL },
     1145   { INTVEC_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL_VAL },
    11461146//  intmat -> bigintmat
    1147    { INTMAT_CMD,      BIGINTMAT_CMD,  D(iiIm2Bim) , NULL },
     1147   { INTMAT_CMD,      BIGINTMAT_CMD,  D(iiIm2Bim) , NULL_VAL },
    11481148//  bigintmat -> intmat
    1149    { BIGINTMAT_CMD,   INTMAT_CMD,     D(iiBim2Im) , NULL },
     1149   { BIGINTMAT_CMD,   INTMAT_CMD,     D(iiBim2Im) , NULL_VAL },
    11501150//  intmat -> matrix
    1151    { INTMAT_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL },
     1151   { INTMAT_CMD,      MATRIX_CMD,     D(iiIm2Ma) , NULL_VAL },
    11521152//  number -> poly
    1153    { NUMBER_CMD,      POLY_CMD,       D(iiN2P)  , NULL },
     1153   { NUMBER_CMD,      POLY_CMD,       D(iiN2P)  , NULL_VAL },
    11541154//  number -> matrix
    1155    { NUMBER_CMD,      MATRIX_CMD,     D(iiN2Ma)  , NULL },
     1155   { NUMBER_CMD,      MATRIX_CMD,     D(iiN2Ma)  , NULL_VAL },
    11561156//  number -> ideal
    11571157//  number -> vector
     
    11591159//  poly -> number
    11601160//  poly -> ideal
    1161    { POLY_CMD,        IDEAL_CMD,      D(iiP2Id) , NULL },
     1161   { POLY_CMD,        IDEAL_CMD,      D(iiP2Id) , NULL_VAL },
    11621162//  poly -> vector
    1163    { POLY_CMD,        VECTOR_CMD,     D(iiP2V) , NULL },
     1163   { POLY_CMD,        VECTOR_CMD,     D(iiP2V) , NULL_VAL },
    11641164//  poly -> matrix
    1165    { POLY_CMD,        MATRIX_CMD,     D(iiP2Id) , NULL },
     1165   { POLY_CMD,        MATRIX_CMD,     D(iiP2Id) , NULL_VAL },
    11661166//  vector -> module
    1167    { VECTOR_CMD,      MODUL_CMD,      D(iiP2Id) , NULL },
     1167   { VECTOR_CMD,      MODUL_CMD,      D(iiP2Id) , NULL_VAL },
    11681168//  vector -> matrix
    1169    { VECTOR_CMD,      MATRIX_CMD,     D(iiV2Ma) , NULL },
     1169   { VECTOR_CMD,      MATRIX_CMD,     D(iiV2Ma) , NULL_VAL },
    11701170//  ideal -> module
    1171    { IDEAL_CMD,       MODUL_CMD,      D(iiMa2Mo) , NULL },
     1171   { IDEAL_CMD,       MODUL_CMD,      D(iiMa2Mo) , NULL_VAL },
    11721172//  ideal -> matrix
    1173    { IDEAL_CMD,       MATRIX_CMD,     D(iiDummy) , NULL },
     1173   { IDEAL_CMD,       MATRIX_CMD,     D(iiDummy) , NULL_VAL },
    11741174//  module -> matrix
    1175    { MODUL_CMD,       MATRIX_CMD,     D(iiMo2Ma) , NULL },
     1175   { MODUL_CMD,       MATRIX_CMD,     D(iiMo2Ma) , NULL_VAL },
    11761176//  matrix -> ideal
    11771177//  matrix -> module
    1178    { MATRIX_CMD,      MODUL_CMD,      D(iiMa2Mo) , NULL },
     1178   { MATRIX_CMD,      MODUL_CMD,      D(iiMa2Mo) , NULL_VAL },
    11791179//  intvec
    11801180//  link
    1181    { STRING_CMD,      LINK_CMD,       D(iiS2Link) , NULL },
     1181   { STRING_CMD,      LINK_CMD,       D(iiS2Link) , NULL_VAL },
    11821182// resolution -> list
    1183    { RESOLUTION_CMD,  LIST_CMD,       NULL /*iiR2L*/ , D(iiR2L_l) },
     1183   { RESOLUTION_CMD,  LIST_CMD,       NULL_VAL /*iiR2L*/ , D(iiR2L_l) },
    11841184// list -> resolution
    1185    { LIST_CMD,        RESOLUTION_CMD, D(iiL2R) , NULL },
     1185   { LIST_CMD,        RESOLUTION_CMD, D(iiL2R) , NULL_VAL},
    11861186//  end of list
    1187    { 0,               0,              NULL , NULL }
     1187   { 0,               0,              NULL_VAL , NULL_VAL }
    11881188};
    11891189#endif
  • libpolys/coeffs/modulop.cc

    r17bdb2 re2202ee  
    364364  }
    365365  if (n == 1)
    366     *a = (number)z;
     366    *a = (number)(long)z;
    367367  else
    368368  {
     
    372372#ifdef NV_OPS
    373373      if (r->ch>NV_MAX_PRIME)
    374         *a = nvDiv((number)z,(number)n,r);
     374        *a = nvDiv((number)(long)z,(number)(long)n,r);
    375375      else
    376376#endif
    377         *a = npDiv((number)z,(number)n,r);
     377        *a = npDiv((number)(long)z,(number)(long)n,r);
    378378    }
    379379  }
     
    617617  dest = res->z;
    618618
    619   int in=0;
     619  long in=0;
    620620  if (e<0)
    621621  {
  • libpolys/coeffs/rmodulo2m.cc

    r17bdb2 re2202ee  
    710710  }
    711711  if (n == 1)
    712     *a = (number)z;
    713   else
    714       *a = nr2mDiv((number)z,(number)n,r);
     712    *a = (number)(long)z;
     713  else
     714      *a = nr2mDiv((number)(long)z,(number)(long)n,r);
    715715  return s;
    716716}
Note: See TracChangeset for help on using the changeset viewer.