MCPcopy Create free account
hub / github.com/JACoders/OpenJK / PC_ConvertPath

Function PC_ConvertPath

codemp/botlib/l_precomp.cpp:961–984  ·  view source on GitHub ↗

end of the function PC_ExpandDefineIntoSource ============================================================================ Parameter: - Returns: - Changes Globals: - ============================================================================

Source from the content-addressed store, hash-verified

959// Changes Globals: -
960//============================================================================
961void PC_ConvertPath(char *path)
962{
963 char *ptr;
964
965 //remove double path seperators
966 for (ptr = path; *ptr;)
967 {
968 if ((*ptr == '\\' || *ptr == '/') &&
969 (*(ptr+1) == '\\' || *(ptr+1) == '/'))
970 {
971 memmove(ptr, ptr+1, strlen(ptr));
972 } //end if
973 else
974 {
975 ptr++;
976 } //end else
977 } //end while
978 //set OS dependent path seperators
979 for (ptr = path; *ptr;)
980 {
981 if (*ptr == '/' || *ptr == '\\') *ptr = PATHSEPERATOR_CHAR;
982 ptr++;
983 } //end while
984} //end of the function PC_ConvertPath
985//============================================================================
986//
987// Parameter: -

Callers 1

PC_Directive_includeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected