mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 17:30:53 +08:00
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);
|
|
} |