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

Function var_edit_file

v2/engine/function.c:717–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715 */
716
717static void var_edit_file( char const * in, string * out, VAR_EDITS * edits )
718{
719 if ( edits->filemods )
720 {
721 PATHNAME pathname;
722
723 /* Parse apart original filename, putting parts into "pathname". */
724 path_parse( in, &pathname );
725
726 /* Replace any pathname with edits->f */
727 if ( edits->f.f_grist .ptr ) pathname.f_grist = edits->f.f_grist;
728 if ( edits->f.f_root .ptr ) pathname.f_root = edits->f.f_root;
729 if ( edits->f.f_dir .ptr ) pathname.f_dir = edits->f.f_dir;
730 if ( edits->f.f_base .ptr ) pathname.f_base = edits->f.f_base;
731 if ( edits->f.f_suffix.ptr ) pathname.f_suffix = edits->f.f_suffix;
732 if ( edits->f.f_member.ptr ) pathname.f_member = edits->f.f_member;
733
734 /* If requested, modify pathname to point to parent. */
735 if ( edits->parent )
736 path_parent( &pathname );
737
738 /* Put filename back together. */
739 path_build( &pathname, out );
740 }
741 else
742 string_append( out, in );
743}
744
745/*
746 * var_edit_cyg2win() - conversion of a cygwin to a Windows path.

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