Debian Codegraph @

docs/html/htlib.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>Making programs against the TiCables library</title>
5
6 <style type="TEXT/CSS">
7 <!--
8 BODY {FONT-FAMILY: Verdana,Arial,Helvetica,Sans-Serif; BACKGROUND-COLOR: #FFFFFF; FONT-SIZE: 10pt}
9 TD {FONT-SIZE: 10pt}
10 H1 {FONT-SIZE: 18pt}
11 H3 {FONT-SIZE: 13pt}
12 PRE {FONT-FAMILY: Courier New; FONT-SIZE: 9pt}
13 CODE {FONT-FAMILY: Courier New; FONT-SIZE: 9pt}
14 -->
15 </style>
16 </head>
17 <body bgcolor="#ffffff" text="#000000" alink="#ff0000" vlink="#0000ff">
18
19 <h1> How to make a program against the ticonv library </h1>
20
21 <hr>
22 <pre>&nbsp;<em>&nbsp;</em></pre>
23 You will find in the <i>test</i> folder of the libary source archive a
24 test/example program which uses this library.<br>
25 Below is listed a light version of this program to make it clearer:
26 <pre>#include &lt;stdio.h&gt;
27 #include &lt;string.h&gt;
28 #include &lt;glib.h&gt;
29 #include &lt;ticonv.h&gt;
30
31 int main(int argc, char **argv)
32 {
33 char ti92_varname[9] = { 0 };
34 char *utf8;
35
36 utf8 = ticonv_varname_to_utf8(CALC_TI92, ti92_varname, -1);
37 printf("UTF-8 varname: &lt;%s&gt; (%i)\n", ti92_varname, (int)strlen(ti92_varname));
38 ticonv_utf8_free(utf8);
39 }</pre>
40 That's all !<br><br>
41 <strong>NOTE</strong>: for this example to work, you probably have to add compiler options related to the include path and library path, e.g.
42 <pre>gcc -I/usr/include/tilp2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Os -g -Wall -W &lt;...&gt;.c -o &lt;...&gt; -lglib-2.0 -lticonv</pre>
43 or better
44 <pre>gcc -Os -g -Wall -W `pkg-config --cflags --libs ticonv` ticonv.c -o ticonv</pre>
45 <h3><a href="index.html">Return to the main index</a> </h3>
46 </body>
47 </html>