MCPcopy Create free account
hub / github.com/boostorg/build / var_edit_file

Function var_edit_file

src/engine/function.cpp:784–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782 */
783
784static void var_edit_file( char const * in, string * out, VAR_EDITS * edits )
785{
786 if ( edits->filemods )
787 {
788 PATHNAME pathname;
789
790 /* Parse apart original filename, putting parts into "pathname". */
791 path_parse( in, &pathname );
792
793 /* Replace any pathname with edits->f */
794 if ( edits->f.f_grist .ptr ) pathname.f_grist = edits->f.f_grist;
795 if ( edits->f.f_root .ptr ) pathname.f_root = edits->f.f_root;
796 if ( edits->f.f_dir .ptr ) pathname.f_dir = edits->f.f_dir;
797 if ( edits->f.f_base .ptr ) pathname.f_base = edits->f.f_base;
798 if ( edits->f.f_suffix.ptr ) pathname.f_suffix = edits->f.f_suffix;
799 if ( edits->f.f_member.ptr ) pathname.f_member = edits->f.f_member;
800
801 /* If requested, modify pathname to point to parent. */
802 if ( edits->parent )
803 path_parent( &pathname );
804
805 /* Put filename back together. */
806 path_build( &pathname, out );
807 }
808 else
809 string_append( out, in );
810}
811
812
813#if defined( OS_CYGWIN ) || defined( OS_VMS )

Callers 2

apply_modifiers_emptyFunction · 0.85

Calls 4

path_parseFunction · 0.85
path_parentFunction · 0.85
path_buildFunction · 0.85
string_appendFunction · 0.85

Tested by

no test coverage detected