mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 11:57:43 +08:00
9697f95b8f
This reverts commit 15d999759e
.
24 lines
488 B
C++
24 lines
488 B
C++
#include "StdAfx.h"
|
|
#include "global.h"
|
|
|
|
global::global()
|
|
{
|
|
const char* filepath = acl_process_path();
|
|
ACL_VSTRING* path = acl_vstring_alloc(256);
|
|
acl_sane_dirname(path, filepath);
|
|
path_ = acl_vstring_str(path);
|
|
acl_vstring_free(path);
|
|
}
|
|
|
|
global::~global()
|
|
{
|
|
|
|
}
|
|
|
|
void global::get_filename(const char* filepath, acl::string& buf)
|
|
{
|
|
ACL_VSTRING* bp = acl_vstring_alloc(256);
|
|
acl_sane_basename(bp, filepath);
|
|
buf = acl_vstring_str(bp);
|
|
acl_vstring_free(bp);
|
|
} |