The qDecoder Project: C/C++ Library

- Main Page
- Data Structures
- Files

- File List
- Globals

# qHtml.c File Reference

HTML documentation API. More...

## Functions
bool | qHtmlPrintf (FILE *stream, int mode, const char *format,...)
| Print out HTML contents into stream.
bool | qHtmlPuts (FILE *stream, int mode, char *buf)
| Puts a string on the stream.
bool | qHtmlIsEmail (const char *email)
| Test for an email-address formatted string.
bool | qHtmlIsUrl (const char *url)
| Test for an URL formatted string.

## Detailed Description

HTML documentation API.

## Function Documentation

bool qHtmlPrintf | ( | FILE * | stream,
|  | int | mode,
|  | const char * | format,
|  |  | ... |
| ) |  |  |

Print out HTML contents into stream.

Parameters:

  | stream | output stream such like stdout
  | mode | conversion mode
  | format | string format

Returns:
  true if successful, otherwise returns false

       Mode 00 : Same as printf()
       Mode 10  :Mode 0 + Convert

       Mode 01 : Print HTML TAG using &lt and &gt
       Mode 11 : Print HTML TAG + Convert

       Mode 02 : Print HTML TAG + Auto Link
       Mode 12 : Print HTML TAG + Auto Link + Convert

       Mode 03 : Print HTML TAG + Auto Link(_top)
       Mode 13 : Print HTML TAG + Auto Link(_top) + Convert
       Mode 23 : Print HTML TAG + Auto Link(new window)
       Mode 33 : Print HTML TAG + Auto Link(new window) + Convert

       Mode 04 : Ignore HTML TAG
       Mode 14 : Ignore HTML TAG + Convert

       Mode 05 : Ignore HTML TAG + Auto Link
       Mode 15 : Ignore HTML TAG + Auto Link + Convert

       Mode 06 : Ignore HTML TAG + Auto Link(_top)
       Mode 16 : Ignore HTML TAG + Auto Link(_top) + Convert
       Mode 26 : Ignore HTML TAG + Auto Link(new window)
       Mode 36 : Ignore HTML TAG + Auto Link(new window) + Convert

       Convert : " "   -> " "
                 "  "  -> " &nbsp;"
                 "   " -> " &nbsp;&nbsp;"
                 "\n"   -> "<br>\n"
                 "\r\n" -> "<br>\n"

bool qHtmlPuts | ( | FILE * | stream,
|  | int | mode,
|  | char * | buf |
| ) |  |  |

Puts a string on the stream.

Parameters:

  | stream | output stream such like stdout
  | mode | conversion mode
  | buf | source string

Returns:
  true if successful, otherwise returns false

Note:
  It modify argument string.

bool qHtmlIsEmail | ( | const char * | email | ) |

Test for an email-address formatted string.

Parameters:

  | email | email-address formatted string

Returns:
  true if successful, otherwise returns false

bool qHtmlIsUrl | ( | const char * | url | ) |

Test for an URL formatted string.

Parameters:

  | url | URL formatted string

Returns:
  true if successful, otherwise returns false

[Home] [About] [Examples] [Changes] [Download] [SVN Repository] [Install] [Reference]