Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[5d2657]: ref_c_symbols.xml Maximize Restore History

Download this file

ref_c_symbols.xml    148 lines (119 with data), 6.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [
<!ENTITY % eclent SYSTEM "ecl.ent">
%eclent;
]>
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
<chapter>
<title>Symbols and compilation</title>
<section xml:id="ansi.symbols.c-dict">
<title>C Reference</title>
<toc/>
<refentry>
<refnamediv>
<refname><function>ecl_make_keyword</function></refname>
<refpurpose>Find a lisp keyword</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Function</title>
<funcsynopsis>
<funcprototype>
<?dbhtml funcsynopsis-style='ansi'?>
<funcdef>cl_object <function>ecl_make_keyword</function></funcdef>
<paramdef><type>char *</type> <parameter>name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>Many Lisp functions take keyword arguments. When invoking a function with keyword arguments we need keywords, which are a kind of symbols that live in the <literal>KEYWORD</literal> package. This function does the task of finding or creating those keywords from C strings.</para>
<itemizedlist>
<listitem><para>It is usually safe to store the resulting pointer, because keywords are always referenced by their package and will not be garbage collected (unless of course, you decide to delete it).</para></listitem>
<listitem><para>Remember that the case of the string is significant. <code>ecl_make_keyword("TO")</code> with return <literal>:TO</literal>, while <code>ecl_make_keyword("to")</code> returns a completely different keywod, <literal>:|to|</literal>. In short, you usually want to use uppercase.</para></listitem>
</itemizedlist>
</refsect1>
<refsect1>
<title>Example</title>
<para>The following example converts a section of a string to uppercase characters:</para>
<programlisting>
cl_object start = ecl_make_keyword("START");
cl_object end = ecl_make_keyword("END");
...
sup = cl_string_upcase(4, s, start, ecl_make_fixnum(2),
end, ecl_make_fixnum(6));
...
</programlisting>
</refsect1>
</refentry>
<refentry>
<refnamediv>
<refname><function>ecl_make_symbol</function></refname>
<refpurpose>Find a lisp symbol</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Function</title>
<funcsynopsis>
<funcprototype>
<?dbhtml funcsynopsis-style='ansi'?>
<funcdef>cl_object <function>ecl_make_symbol</function></funcdef>
<paramdef><type>const char *</type> <parameter>name</parameter></paramdef>
<paramdef><type>const char *</type> <parameter>package_name</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>This function finds or create a symbol in the given package. First of all, it tries to find the package named by <replaceable>package_name</replaceable>. If it does not exist, an error is signaled. Then, a symbol with the suppled <replaceable>name</replaceable> is searched in the given package. If the symbol exists, it is returned. If it does not exist, using <function>INTERN</function>.</para>
</refsect1>
</refentry>
<refentry>
<refnamediv>
<refname>ANSI Dictionary</refname>
<refpurpose>&ANSI-C-Dict;</refpurpose>
</refnamediv>
<refsynopsisdiv>
<simplelist columns="2" type="horiz">
<member>Lisp symbol</member>
<member>C function</member>
<member><ulink url="&clhs;f_boundp.htm"><symbol>boundp</symbol></ulink></member>
<member><code>cl_object cl_boundp(cl_object symbolp)</code></member>
<member><ulink url="&clhs;f_cp_sym.htm"><symbol>copy-symbol</symbol></ulink></member>
<member><code>cl_object cl_copy_symbol(cl_narg narg, cl_object symbol, ...)</code></member>
<member><ulink url="&clhs;f_get.htm"><symbol>get</symbol></ulink></member>
<member><code>cl_object cl_get(cl_object symbol, cl_object indicator)</code></member>
<member><ulink url="&clhs;f_gensym.htm"><symbol>gensym</symbol></ulink></member>
<member><code>cl_object cl_gensym(cl_narg narg, ...)</code></member>
<member><ulink url="&clhs;f_gentem.htm"><symbol>gentemp</symbol></ulink></member>
<member><code>cl_object cl_gentemp(cl_narg narg, ...)</code></member>
<member><ulink url="&clhs;f_kwdp.htm"><symbol>keywordp</symbol></ulink></member>
<member><code>cl_object cl_keywordp(cl_object object)</code></member>
<member><ulink url="&clhs;f_mk_sym.htm"><symbol>make-symbol</symbol></ulink></member>
<member><code>cl_object cl_make_symbol(cl_object name)</code></member>
<member><ulink url="&clhs;f_makunb.htm"><symbol>makunbound</symbol></ulink></member>
<member><code>cl_object cl_makunbound(cl_object makunbound)</code></member>
<member><ulink url="&clhs;f_rempro.htm"><symbol>remprop</symbol></ulink></member>
<member><code>cl_object cl_remprop(cl_object symbol, cl_object indicator)</code></member>
<member><ulink url="&clhs;f_set.htm"><symbol>set</symbol></ulink></member>
<member><code>cl_object cl_set(cl_object symbol, cl_object value)</code></member>
<member><ulink url="&clhs;f_symbol.htm"><symbol>symbolp</symbol></ulink></member>
<member><code>cl_object cl_symbolp(cl_object object)</code></member>
<member><ulink url="&clhs;f_symb_1.htm"><symbol>symbol-function</symbol></ulink></member>
<member><code>cl_object cl_symbol_function(cl_object symbol)</code></member>
<member><ulink url="&clhs;f_symb_2.htm"><symbol>symbol-name</symbol></ulink></member>
<member><code>cl_object cl_symbol_name(cl_object symbol)</code></member>
<member><ulink url="&clhs;f_symb_3.htm"><symbol>symbol-package</symbol></ulink></member>
<member><code>cl_object cl_symbol_package(cl_object symbol)</code></member>
<member><ulink url="&clhs;f_symb_4.htm"><symbol>symbol-plist</symbol></ulink></member>
<member><code>cl_object cl_symbol_plist(cl_object symbol)</code></member>
<member><ulink url="&clhs;f_symb_5.htm"><symbol>symbol-value</symbol></ulink></member>
<member><code>cl_object cl_symbol_value(cl_object symbol)</code></member>
</simplelist>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para></para>
</refsect1>
</refentry>
</section>
</chapter>
</book>