Feature baremetal removal (#140)

* Removed all BAREMETAL ifdefs

* Cleaned up subfolders

* Fixed regression

* Re-added underscores

* Fixed merge conflicts

* Assume RASCSI is always defined

* Fixed mege issue

* Re-added result message

* Fix typo

Co-authored-by: akuker <34318535+akuker@users.noreply.github.com>
This commit is contained in:
uweseimet
2021-07-20 15:32:44 +02:00
committed by GitHub
parent 0032ce5010
commit 3c5a0003a4
23 changed files with 22 additions and 1907 deletions

View File

@@ -84,80 +84,6 @@ void FASTCALL Filepath::SetPath(LPCSTR path)
Split();
}
#ifdef BAREMETAL
//---------------------------------------------------------------------------
//
// 互換関数(dirname) 結果は直ぐにコピーせよ
//
//---------------------------------------------------------------------------
static char dirtmp[2];
char* dirname(char *path)
{
char *p;
if( path == NULL || *path == '\0' ) {
dirtmp[0] = '.';
dirtmp[1] = '\0';
return dirtmp;
}
p = path + strlen(path) - 1;
while( *p == '/' ) {
if( p == path )
return path;
*p-- = '\0';
}
while( p >= path && *p != '/' ) {
p--;
}
if (p < path) {
dirtmp[0] = '.';
dirtmp[1] = '\0';
return dirtmp;
}
if (p == path) {
dirtmp[0] = '/';
dirtmp[1] = '\0';
return dirtmp;
}
*p = 0;
return path;
}
//---------------------------------------------------------------------------
//
// 互換関数(basename) 結果は直ぐにコピーせよ
//
//---------------------------------------------------------------------------
static char basetmp[2];
char* basename(char *path)
{
char *p;
if( path == NULL || *path == '\0' ) {
basetmp[0] = '/';
basetmp[1] = '\0';
return basetmp;
}
p = path + strlen(path) - 1;
while( *p == '/' ) {
if( p == path ) {
return path;
}
*p-- = '\0';
}
while( p >= path && *p != '/' ) {
p--;
}
return p + 1;
}
#endif // BAREMETAL
//---------------------------------------------------------------------------
//
// パス分離