Changeset 742 in Sophya for trunk/SophyaLib/BaseTools


Ignore:
Timestamp:
Feb 26, 2000, 10:24:54 AM (26 years ago)
Author:
ansari
Message:

new md5

Location:
trunk/SophyaLib/BaseTools
Files:
2 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/peidainit.cc

    r580 r742  
    7070{
    7171if (fgprt) {
    72   char* compiler;
     72  char* compiler = 0;
    7373  #ifdef __GNUG__
    7474  compiler = "gcc " __VERSION__;
     
    8686  compiler = const_cast<char *>("SGI-CC ") ;
    8787  #endif
     88  #ifdef __MWERKS__
     89  compiler = const_cast<char *>("Codewarrior ");
     90  #endif
    8891  fprintf(stderr,"SOPHYA Version %4.1f Revision %d (%s) -- %s %s %s\n",
    8992          SOPHYA_VERSION, SOPHYA_REVISION, SOPHYA_TAG,
  • trunk/SophyaLib/BaseTools/ppersist.cc

    r661 r742  
    3535
    3636
    37 MD5_CTX PIOPersist::ctx;
     37MD5_CONTEXT PIOPersist::ctx;
    3838PIOPersist::ClassList * PIOPersist::classList = NULL;   // $CHECK$ Reza 26/04/99
    3939map<string, uint_8> * PIOPersist::typeids = NULL;
     
    250250  rbuf[32] = '\0';
    251251  struct tm tm;
    252   strptime(rbuf,"%d/%m/%Y %T GMT",&tm);
     252  #ifndef __MWERKS__
     253  strptime(rbuf,"%d/%m/%Y %H:%M:%S GMT",&tm);
     254  #else
     255  sscanf(rbuf,"%2d/%2d/%4d %2d:%2d:%2d GMT",&tm.tm_mday,&tm.tm_mon,&tm.tm_year,
     256                                            &tm.tm_hour,&tm.tm_min,&tm.tm_sec);
     257  tm.tm_mon  --;
     258  tm.tm_year -= 1900;
     259  #endif
    253260  creationdate = mktime(&tm);
    254261
     
    809816  time_t tm = time(NULL);
    810817  char datestring[33];
    811   int l=strftime(datestring,32,"%d/%m/%Y %T GMT",gmtime(&tm));
     818  int l=strftime(datestring,32,"%d/%m/%Y %H:%M:%S GMT",gmtime(&tm));
    812819  for(int i=l; i<32; i++)  datestring[i] = ' ';
    813820  datestring[32] = '\0';
  • trunk/SophyaLib/BaseTools/ppersist.h

    r588 r742  
    1111#include "machdefs.h"
    1212#include "pexceptions.h"
    13 #include "md5.h"
     13#include "gnumd5.h"
     14
    1415
    1516#include <time.h>
     
    7273    static ClassCreatorFunc      FindCreatorFunc(uint_8 classId);
    7374    static uint_8 Hash(string const& typname) {
    74         MD5Init(&ctx);
    75         MD5Update(&ctx, (unsigned char*) typname.c_str(), typname.size());
    76         MD5Final(&ctx);
    77         return ( *((uint_8*) ctx.digest) + *((uint_8*) (ctx.digest+8)));
     75        md5_init(&ctx);
     76        md5_write(&ctx, (unsigned char*) typname.c_str(), typname.size());
     77        md5_final(&ctx);
     78        return ( *((uint_8*) ctx.buf) + *((uint_8*) (ctx.buf+8)));
    7879    }
    79     static MD5_CTX ctx;
     80    static MD5_CONTEXT ctx;
    8081 
    8182    static void Initialize();   // Pour initialiser classList
Note: See TracChangeset for help on using the changeset viewer.