本文整理汇总了C++中Pathname::device方法的典型用法代码示例。如果您正苦于以下问题:C++ Pathname::device方法的具体用法?C++ Pathname::device怎么用?C++ Pathname::device使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pathname
的用法示例。
在下文中一共展示了Pathname::device方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void Autoload::load()
{
Thread * const thread = current_thread();
void * last_special_binding = thread->last_special_binding();
thread->bind_special(S_current_readtable, thread->symbol_value(S_standard_readtable));
thread->bind_special(S_current_package, make_value(PACKAGE_SYS));
thread->bind_special(S_read_base, FIXNUM_TEN);
if (thread->symbol_value(S_autoload_verbose) != NIL)
{
String * prefix = new String(xcl_home());
prefix->append_char('/');
if (_filename == NULL)
prefix->append("lisp/");
Pathname * defaults = check_pathname(parse_namestring(prefix));
Value device = defaults->device();
Value directory = defaults->directory();
Value name;
if (_filename)
name = make_value(new_simple_string(_filename));
else
name = make_value(the_symbol(operator_name())->name()->downcase());
Value type = make_simple_string("xcl");
Pathname * pathname = new Pathname(NIL, device, directory, name, type, NIL);
if (CL_probe_file(make_value(pathname)) == NIL)
{
type = make_simple_string("lisp");
pathname = new Pathname(NIL, device, directory, name, type, NIL);
}
AbstractString * namestring = pathname->namestring();
AnsiStream * out = check_ansi_stream(thread->symbol_value(S_standard_output));
String * message = new String("; Autoloading ");
message->append(::prin1_to_string(operator_name())->as_c_string());
message->append(" from ");
message->append(namestring);
message->append(" ...\n");
out->fresh_line();
out->write_string(message);
CL_load(make_value(namestring));
message = new String("; Autoloaded ");
message->append(namestring);
message->append("\n");
out->fresh_line();
out->write_string(message);
}
else if (_filename)
{
SYS_load_system_file(make_value(_filename));
}
else
{
String * namestring = new String("lisp/");
namestring->append(the_symbol(operator_name())->name()->downcase());
SYS_load_system_file(make_value(namestring));
}
thread->set_last_special_binding(last_special_binding);
}