Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, March 29, 2024

File: [Platon] / libplaton / platon / html / read.h (download)

Revision 1.11, Wed Apr 23 19:28:35 2003 UTC (20 years, 11 months ago) by nepto


Changes since 1.10: +2 -2 lines

E-mail addresses update to @platon.sk ones.

/**
 * HTML file reading
 *
 * @file    platon/html/read.h
 * @author    Ondrej Jombik <nepto@platon.sk>
 * @version    \$Platon: libplaton/platon/html/read.h,v 1.10 2003/04/23 19:01:36 nepto Exp $
 * @date    2000-2003
 *
 * Function in this file can be used for fast and simple SGML/HTML files
 * reading. Usage with platon/html/Tag.h is recommended.
 */

#ifndef _PLATON_HTML_READ_H
#define _PLATON_HTML_READ_H

/** HTML tag starting character */
#ifndef HTML_TAG_BEGIN
#  define HTML_TAG_BEGIN '<'
#endif

/** HTML tag ending character */
#ifndef HTML_TAG_END
#  define HTML_TAG_END '>'
#endif

/**
 * Return codes for html_read() function
 * @see    html_read()
 */
enum html_reads
{
    HTML_ERROR,    /**< Error occured */
    HTML_EOF,    /**< End of HTML file reached */
    HTML_TAG,    /**< Tag returned */
    HTML_TEXT    /**< Text returned */
};

#ifdef __cplusplus
extern "C" {
#endif

    /**
     * Read next tag or text from stream
     *
     * @param    f    stream
     * @param    p    string where to store read data
     * @param    len    maximum len of data
     * @return    @ref html_reads enumeration
     *
     * Into p will be stored either text or tag with maximum length len. If
     * tag, than also with @ref HTML_TAG_BEGIN and @ref HTML_TAG_END
     * characters.
     */
    enum html_reads html_read(FILE *f, char *p, int len);

#ifdef __cplusplus
}
#endif

#endif /* #ifndef _PLATON_HTML_READ_H */


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top