version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_arch_c = | | * static char *rcsid_arch_c = |
* "$Id: arch.c,v 1.6 2001/04/07 19:44:50 michtoen Exp $"; | | * "$Id: arch.c,v 1.7 2001/04/09 00:57:13 michtoen Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
| | |
The author can be reached via e-mail to mwedel@scruz.net | | The author can be reached via e-mail to mwedel@scruz.net |
*/ | | */ |
| | |
#include <global.h> | | #include <global.h> |
#include <arch.h> | | #include <arch.h> |
#include <funcpoint.h> | | #include <funcpoint.h> |
#include <loader.h> | | #include <loader.h> |
| | |
/* IF set, does a little timing on the archetype load. */ | | /* IF TIME_ARCH_LOAD set, does a little timing on the archetype load. */ |
#define TIME_ARCH_LOAD 0 | | #ifdef TIME_ARCH_LOAD |
| | #ifdef GETTIMEOFDAY_TWO_ARGS |
| | #define GETTIMEOFDAY(last_time) gettimeofday(last_time, (struct timezone *) NULL); |
| | #else |
| | #define GETTIMEOFDAY(last_time) gettimeofday(last_time); |
| | #endif |
| | #endif |
| | |
static archetype *arch_table[ARCHTABLE]; | | static archetype *arch_table[ARCHTABLE]; |
int arch_cmp=0; /* How many strcmp's */ | | int arch_cmp=0; /* How many strcmp's */ |
| | |
FILE *fp; | | FILE *fp; |
char filename[MAX_BUF]; | | char filename[MAX_BUF]; |
int comp; | | int comp; |
#if TIME_ARCH_LOAD | | #ifdef TIME_ARCH_LOAD |
struct timeval tv1,tv2; | | struct timeval tv1,tv2; |
#endif | | #endif |
| | |
| | |
} | | } |
clear_archetable(); | | clear_archetable(); |
LOG(llevDebug," arch-pass 1..."); | | LOG(llevDebug," arch-pass 1..."); |
#if TIME_ARCH_LOAD
| | #ifdef TIME_ARCH_LOAD |
GETTIMEOFDAY(&tv1); | | GETTIMEOFDAY(&tv1); |
#endif | | #endif |
first_arch_pass(fp); | | first_arch_pass(fp); |
#if TIME_ARCH_LOAD | | #ifdef TIME_ARCH_LOAD |
{ int sec, usec; | | { int sec, usec; |
GETTIMEOFDAY(&tv2);
| | GETTIMEOFDAY(&tv2);
|
sec = tv2.tv_sec - tv1.tv_sec; | | sec = tv2.tv_sec - tv1.tv_sec; |