Esempio n. 1
0
// encode_symbol
Val encode_symbol(Val symbol)
{
    Val stream = make_string_output_stream();

    Val package = symbol_package(symbol);
    if (PACKAGE_cl == package ||
        PACKAGE_si == package ||
        PACKAGE_ext == package ||
        PACKAGE_clos == package ||
        PACKAGE_keyword == package )
    {
        // no package name
    }
    else
    {
        encode_symbol_aux(stream, package_pretty_name(package));
        write_char('_', stream);
    }
    encode_symbol_aux(stream, symbol_name(symbol));
    return get_output_stream_string(stream);
} // encode_symbol
Esempio n. 2
0
BOOL is_keyword(Symbol sym)
{
    return eq(pkg_kw, symbol_package(sym));
}