* timestamp_done() - free timestamp tables
*
* Internal routines:
- * time_enter() - internal worker callback for scanning archives &
- * directories
* free_timestamps() - worker function for freeing timestamp table contents
*/
#include "hash.h"
#include "object.h"
#include "pathsys.h"
-#include "strings.h"
+#include "jam_strings.h"
#include "output.h"
static struct hash * bindhash = 0;
-static void time_enter( void *, OBJECT *, int const found,
- timestamp const * const );
-
-static const char * time_progress[] =
-{
- "INIT",
- "NOENTRY",
- "SPOTTED",
- "MISSING",
- "FOUND"
-};
-
#ifdef OS_NT
/*
int timestamp_cmp( timestamp const * const lhs, timestamp const * const rhs )
{
- return lhs->secs == rhs->secs
+ return int(
+ lhs->secs == rhs->secs
? lhs->nsecs - rhs->nsecs
- : lhs->secs - rhs->secs;
+ : lhs->secs - rhs->secs );
}
{
PROFILE_ENTER( timestamp );
- PATHNAME f1;
- PATHNAME f2;
- int found;
- BINDING * b;
- string buf[ 1 ];
-
-
if ( file_time( path, time ) < 0 )
timestamp_clear( time );
}
-/*
- * time_enter() - internal worker callback for scanning archives & directories
- */
-
-static void time_enter( void * closure, OBJECT * target, int const found,
- timestamp const * const time )
-{
- int item_found;
- BINDING * b;
- struct hash * const bindhash = (struct hash *)closure;
-
- target = path_as_key( target );
-
- b = (BINDING *)hash_insert( bindhash, target, &item_found );
- if ( !item_found )
- {
- b->name = object_copy( target );
- b->flags = 0;
- }
-
- timestamp_copy( &b->time, time );
- b->progress = found ? BIND_FOUND : BIND_SPOTTED;
-
- if ( DEBUG_BINDSCAN )
- out_printf( "time ( %s ) : %s\n", object_str( target ), time_progress[
- b->progress ] );
-
- object_free( target );
-}
-
-
/*
* free_timestamps() - worker function for freeing timestamp table contents
*/