2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/v2/engine/modules/path.c
Jurko Gospodnetić 6383f7f161 Boost Jam code cleanup - wrapped up timestamp values inside a timstamp structure instead of using a raw time_t value as another preparation step towards implementing support for timestamps with resolution finer than 1 second. All timestamp manipulation now done using the new timestamp_XXX() API.
File timestamps displayed with -d+3 debug output now presented in UTC (+0000) timezone.

Other related minor stylistic changes:
  - timestamp_from_target() renamed to timestamp_from_path()
  - timestamp_from_target() parameter order switched
  - comment updates
  - added some const function parameter modifiers
  - some header #include directives reordered alphabetically

[SVN r79501]
2012-07-14 16:11:16 +00:00

23 lines
628 B
C

/* Copyright Vladimir Prus 2003. Distributed under the Boost */
/* Software License, Version 1.0. (See accompanying */
/* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */
#include "../native.h"
#include "../object.h"
#include "../timestamp.h"
LIST * path_exists( FRAME * frame, int flags )
{
timestamp time;
timestamp_from_path( &time, list_front( lol_get( frame->args, 0 ) ) );
return timestamp_empty( &time ) ? L0 : list_new( object_new( "true" ) );
}
void init_path()
{
char const * args[] = { "location", 0 };
declare_native_rule( "path", "exists", args, path_exists, 1 );
}