nyctergatis.com

Contact

Projects
Sysquake Remote Live
NME
PDF
Hike
Sudoku
GifBuilder
jpeglib for Palm OS
MySQL Client
Cross-GCC for Mac OS

NMEPluginTOC.c File Reference


Detailed Description

NME optional plugin for table of contents in HTML.

Author:
Yves Piguet. Copyright 2007-2008, Yves Piguet.

Definition in file NMEPluginTOC.c.

#include "NMEPluginTOC.h"

Go to the source code of this file.


Defines

#define isBlankOrEol(c)   ((c) == ' ' || (c) == '\t' || (c) == 10 || (c) == 13)
 Test if a character is a space, tab, cr or lf.

Functions

static void switchOutputFormatTOC (HookTOCData *hookData, NMEBoolean heading)
 Switch output on for titles and off for everything else).
static NMEErr parHookTOC (NMEInt level, NMEInt item, NMEBoolean enter, NMEConstText markup, NMEInt srcIndex, NMEContext *context, void *data)
 Paragraph hook for TOC (switch output on for titles and off for everything else).
void NMESetTOCOutputFormat (NMEOutputFormat *f, HookTOCData *d)
 Set output format structure for TOC generation.
NMEErr NMEPluginTOC (NMEConstText name, NMEInt nameLen, NMEConstText data, NMEInt dataLen, NMEContext *context, void *userData)
 Plugin implementation for calendar using table markup (plugin's data: year month).

Function Documentation

NMEErr NMEPluginTOC ( NMEConstText  name,
NMEInt  nameLen,
NMEConstText  data,
NMEInt  dataLen,
NMEContext context,
void *  userData 
)

Plugin implementation for calendar using table markup (plugin's data: year month).

Parameters:
[in] name plugin name, such as "calendar"
[in] nameLen length of name
[in] data data text
[in] dataLen length of data
[in,out] context current context
[in] userData pointer passed from the parser, as specified in NMEPlugin
Returns:
error code (kNMEErrOk for success)
Test:
    << toc level
    >>
or
    << toc level1 level2
    >>
or
    << toc level1 level2 title
    >>

Definition at line 85 of file NMEPluginTOC.c.

void NMESetTOCOutputFormat ( NMEOutputFormat f,
HookTOCData d 
)

Set output format structure for TOC generation.

Parameters:
[in] f address of output format structure, whose contents are filled
[out] d paragraph hook user data

Definition at line 76 of file NMEPluginTOC.c.

static NMEErr parHookTOC ( NMEInt  level,
NMEInt  item,
NMEBoolean  enter,
NMEConstText  markup,
NMEInt  srcIndex,
NMEContext context,
void *  data 
) [static]

Paragraph hook for TOC (switch output on for titles and off for everything else).

Parameters:
[in] level heading or list level (1 = topmost)
[in] item list item or heading counter
[in] enter TRUE when entering construct, FALSE when exiting
[in] markup null-terminated string for initial markup ("p" for par, "*" for unnumbered list of any level, "//" for italic, "{{{" for preformatted)
[in] srcIndex current index in source code
[in,out] context current context
[in,out] data value specific to the callback
Returns:
error code (kNMEErrOk for success)

Definition at line 28 of file NMEPluginTOC.c.

static void switchOutputFormatTOC ( HookTOCData hookData,
NMEBoolean  heading 
) [static]

Switch output on for titles and off for everything else).

Parameters:
[in,out] hookData hook user data
[in] heading TRUE for heading start, FALSE for heading end

Definition at line 48 of file NMEPluginTOC.c.

Generated by Doxygen.
Copyright 2007-2008, Yves Piguet.
All rights reserved.