273 lines
4.2 KiB
HTML
273 lines
4.2 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>cole Library</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.41"><LINK
|
|
REL="HOME"
|
|
TITLE="cole Library Reference Manual"
|
|
HREF="index.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="How to compile cole"
|
|
HREF="how-to-compile.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="API"
|
|
HREF="cole-api.html"></HEAD
|
|
><BODY
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>cole Library Reference Manual</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="how-to-compile.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
></TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="cole-api.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="CHAPTER"
|
|
><H1
|
|
><A
|
|
NAME="LIBCOLE"
|
|
>Chapter 3. cole Library</A
|
|
></H1
|
|
><DIV
|
|
CLASS="TOC"
|
|
><DL
|
|
><DT
|
|
><B
|
|
>Table of Contents</B
|
|
></DT
|
|
><DT
|
|
><A
|
|
HREF="cole-api.html"
|
|
>API</A
|
|
> — Public cole API for the present release.</DT
|
|
><DT
|
|
><A
|
|
HREF="cole-internals.html"
|
|
>Internals</A
|
|
> — cole internals - don't trust in anything here, because it may (and will) change.</DT
|
|
></DL
|
|
></DIV
|
|
><P
|
|
> This is the documentation autogenerated from the source code. It have the cole <A
|
|
HREF="cole-api.html"
|
|
>API</A
|
|
> for this release, and some internal structures and internal calls.
|
|
</P
|
|
><P
|
|
> Note: what Microsoft calls <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>stream</B
|
|
></TT
|
|
> is called <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>file</B
|
|
></TT
|
|
> in this project, <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>storage</B
|
|
></TT
|
|
> is called <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>directory</B
|
|
></TT
|
|
> and <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>docfile</B
|
|
></TT
|
|
> (a Structured Storage file) is called <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>filesystem</B
|
|
></TT
|
|
>.
|
|
</P
|
|
><P
|
|
> The files in the subdirectory <TT
|
|
CLASS="FILENAME"
|
|
>examples</TT
|
|
> in the source code show the complete public <A
|
|
HREF="cole-api.html"
|
|
>API</A
|
|
> in action. Briefly, if you know how to use the <TT
|
|
CLASS="FILENAME"
|
|
>stdio.h</TT
|
|
> ANSI C calls, cole API will be very easy for you.</P
|
|
><P
|
|
> If you use <TT
|
|
CLASS="FILENAME"
|
|
>autoconf</TT
|
|
> in your own proyect, the included file <TT
|
|
CLASS="FILENAME"
|
|
>cole.m4</TT
|
|
> may be useful for you. It contains the m4 macro AM_PATH_COLE that detect the presense or ausence of the cole library in the system being configured. To use it:</P
|
|
><P
|
|
></P
|
|
><OL
|
|
TYPE="1"
|
|
><LI
|
|
><P
|
|
> If cole is not installed in your system (i.e. <TT
|
|
CLASS="FILENAME"
|
|
>aclocal</TT
|
|
> can't find <TT
|
|
CLASS="FILENAME"
|
|
>cole.m4</TT
|
|
>), add the content of <TT
|
|
CLASS="FILENAME"
|
|
>cole.m4</TT
|
|
> to your own <TT
|
|
CLASS="FILENAME"
|
|
>acinclude.m4</TT
|
|
> file (create it in case you haven't one).
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> Add a line like <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>AM_PATH_COLE(2.0.0, [LIBS="$LIBS $COLE_LIBS" CFLAGS="$CFLAGS $COLE_CFLAGS"])</B
|
|
></TT
|
|
> to your <TT
|
|
CLASS="FILENAME"
|
|
>configure.in</TT
|
|
> file. Here we are requesting for cole release 2.0.0, and adding the necessary flags to LIBS and CFLAGS.
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> Run <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>aclocal</B
|
|
></TT
|
|
> to generate the file <TT
|
|
CLASS="FILENAME"
|
|
>aclocal.m4</TT
|
|
>. This file will have many m4 macros, incluiding the cole m4 macro, and
|
|
</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
> Run <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>autoconf</B
|
|
></TT
|
|
> to generate the script <TT
|
|
CLASS="FILENAME"
|
|
>configure</TT
|
|
>.
|
|
</P
|
|
></LI
|
|
></OL
|
|
><P
|
|
> Many <A
|
|
HREF="cole-api.html"
|
|
>API</A
|
|
> calls take an argument at the end called <A
|
|
HREF="cole-api.html#COLERRNO"
|
|
><TT
|
|
CLASS="PARAMETER"
|
|
><I
|
|
>colerrno</I
|
|
></TT
|
|
></A
|
|
>. If it's not NULL and the call failed, it store the error code for fail, if any (if the call was successfully ended, its value is not modified).</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="how-to-compile.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="cole-api.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>How to compile cole</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
> </TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>API</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |