Changeset 742 in Sophya for trunk/SophyaLib/BaseTools
- Timestamp:
- Feb 26, 2000, 10:24:54 AM (26 years ago)
- Location:
- trunk/SophyaLib/BaseTools
- Files:
-
- 2 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/peidainit.cc
r580 r742 70 70 { 71 71 if (fgprt) { 72 char* compiler ;72 char* compiler = 0; 73 73 #ifdef __GNUG__ 74 74 compiler = "gcc " __VERSION__; … … 86 86 compiler = const_cast<char *>("SGI-CC ") ; 87 87 #endif 88 #ifdef __MWERKS__ 89 compiler = const_cast<char *>("Codewarrior "); 90 #endif 88 91 fprintf(stderr,"SOPHYA Version %4.1f Revision %d (%s) -- %s %s %s\n", 89 92 SOPHYA_VERSION, SOPHYA_REVISION, SOPHYA_TAG, -
trunk/SophyaLib/BaseTools/ppersist.cc
r661 r742 35 35 36 36 37 MD5_C TXPIOPersist::ctx;37 MD5_CONTEXT PIOPersist::ctx; 38 38 PIOPersist::ClassList * PIOPersist::classList = NULL; // $CHECK$ Reza 26/04/99 39 39 map<string, uint_8> * PIOPersist::typeids = NULL; … … 250 250 rbuf[32] = '\0'; 251 251 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 253 260 creationdate = mktime(&tm); 254 261 … … 809 816 time_t tm = time(NULL); 810 817 char datestring[33]; 811 int l=strftime(datestring,32,"%d/%m/%Y % TGMT",gmtime(&tm));818 int l=strftime(datestring,32,"%d/%m/%Y %H:%M:%S GMT",gmtime(&tm)); 812 819 for(int i=l; i<32; i++) datestring[i] = ' '; 813 820 datestring[32] = '\0'; -
trunk/SophyaLib/BaseTools/ppersist.h
r588 r742 11 11 #include "machdefs.h" 12 12 #include "pexceptions.h" 13 #include "md5.h" 13 #include "gnumd5.h" 14 14 15 15 16 #include <time.h> … … 72 73 static ClassCreatorFunc FindCreatorFunc(uint_8 classId); 73 74 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))); 78 79 } 79 static MD5_C TXctx;80 static MD5_CONTEXT ctx; 80 81 81 82 static void Initialize(); // Pour initialiser classList
Note:
See TracChangeset
for help on using the changeset viewer.