nyctergatis.com

Contact

Projects
Sysquake Remote Live
NME
PDF
Hike
Sudoku
GifBuilder
jpeglib for Palm OS
MySQL Client
Cross-GCC for Mac OS
NMEPluginWiki.c File Reference

NME optional plugin for wiki extensions (collect metadata). More...

#include "NMEPluginWiki.h"
#include <string.h>
#include <stdio.h>

Go to the source code of this file.

Defines

#define isWhiteSpace(c)   ((c) <= ' ' && (c) >= '\0')
#define isDigit(c)   ((c) >= '0' && (c) <= '9')
#define isAlpha(c)   ((c) >= 'a' && (c) <= 'z' || (c) >= 'A' && (c) <= 'Z')
#define digit(c)   ((c) - '0')
#define lower(c)   ((c) >= 'A' && (c) <= 'Z' ? (c) + 32 : (c))

Functions

NMEErr NMEPluginKeywords (NMEConstText name, NMEInt nameLen, NMEConstText data, NMEInt dataLen, NMEContext *context, void *userData)
 Plugin implementation for keywords (plugin's data: comma-separated keywords); write each keyword on a separate line (should be used with NMEOutputFormatNull)
NMEErr NMEPluginExecute (NMEConstText name, NMEInt nameLen, NMEConstText data, NMEInt dataLen, NMEContext *context, void *userData)
 Plugin implementation for execute (plugin's data: method name and arguments); write data without leading and trailing spaces on a separate line (should be used with NMEOutputFormatNull)
static NMEBoolean matchTemplate (NMEConstText data, NMEInt dataLen, NMEInt i, NMEConstText template)
 Check if the text at a given offset matches a template; what follows immediately (if not end of text) must not be a digit or a letter.
static void writeInt (NMEInt n, NMEInt padding, NMEContext *context)
 Write an unsigned integer of up to 4 digits.
NMEErr NMEPluginDate (NMEConstText name, NMEInt nameLen, NMEConstText data, NMEInt dataLen, NMEContext *context, void *userData)
 Plugin implementation for date (plugin's data: date and time); write each date on a separate line (should be used with NMEOutputFormatNull)

Detailed Description

NME optional plugin for wiki extensions (collect metadata).

Author:
Yves Piguet.

Definition in file NMEPluginWiki.c.


Function Documentation

static NMEBoolean matchTemplate ( NMEConstText  data,
NMEInt  dataLen,
NMEInt  i,
NMEConstText  template 
) [static]

Check if the text at a given offset matches a template; what follows immediately (if not end of text) must not be a digit or a letter.

Parameters:
[in]datatext
[in]dataLenlength of data in bytes
[in]ioffset in data
[in]templatetemplate null-terminated string; '0' matches digits, 'a' matches characters, and anything else matches itself
Returns:
TRUE if match, else FALSE

Definition at line 84 of file NMEPluginWiki.c.

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

Plugin implementation for date (plugin's data: date and time); write each date on a separate line (should be used with NMEOutputFormatNull)

Parameters:
[in]nameplugin name, such as "keywords"
[in]nameLenlength of name
[in]datadata text
[in]dataLenlength of data
[in,out]contextcurrent context
[in]userDatacomma-separated lowercase month names (multiple of 12 values for multiple languages, etc., such as "january,february,...,december,janvier,f\xc3\xa9vrier,...")
Returns:
error code (kNMEErrOk for success)
Test:
    << date 2 oct 2003 >>
    << date 2 oct 2003 12:45 >>
    << date 2 oct 2003 3 pm >>

Definition at line 117 of file NMEPluginWiki.c.

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

Plugin implementation for execute (plugin's data: method name and arguments); write data without leading and trailing spaces on a separate line (should be used with NMEOutputFormatNull)

Parameters:
[in]nameplugin name, such as "execute"
[in]nameLenlength of name
[in]datadata text
[in]dataLenlength of data
[in,out]contextcurrent context
[in]userDatapointer passed from the parser, as specified in NMEPlugin
Returns:
error code (kNMEErrOk for success)
Test:
    << execute makeCalendar 2009 12 >>

Definition at line 51 of file NMEPluginWiki.c.

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

Plugin implementation for keywords (plugin's data: comma-separated keywords); write each keyword on a separate line (should be used with NMEOutputFormatNull)

Parameters:
[in]nameplugin name, such as "keywords"
[in]nameLenlength of name
[in]datadata text
[in]dataLenlength of data
[in,out]contextcurrent context
[in]userDatapointer passed from the parser, as specified in NMEPlugin
Returns:
error code (kNMEErrOk for success)
Test:
    << keywords wiki, creole, markup >>

Definition at line 20 of file NMEPluginWiki.c.

static void writeInt ( NMEInt  n,
NMEInt  padding,
NMEContext context 
) [static]

Write an unsigned integer of up to 4 digits.

Parameters:
[in]paddingif positive, number of digits including leading zeros

Definition at line 101 of file NMEPluginWiki.c.

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