|
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.
- Copyright:
- 2009-2013, Yves Piguet.
Definition in file NMEPluginWiki.c.
Function Documentation
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] | data | text |
[in] | dataLen | length of data in bytes |
[in] | i | offset in data |
[in] | template | template 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.
Plugin implementation for date (plugin's data: date and time); write each date on a separate line (should be used with NMEOutputFormatNull)
- Parameters:
-
[in] | name | plugin name, such as "keywords" |
[in] | nameLen | length of name |
[in] | data | data text |
[in] | dataLen | length of data |
[in,out] | context | current context |
[in] | userData | comma-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.
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] | name | plugin name, such as "execute" |
[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:
<< execute makeCalendar 2009 12 >>
Definition at line 51 of file NMEPluginWiki.c.
Plugin implementation for keywords (plugin's data: comma-separated keywords); write each keyword on a separate line (should be used with NMEOutputFormatNull)
- Parameters:
-
[in] | name | plugin name, such as "keywords" |
[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:
<< keywords wiki, creole, markup >>
Definition at line 20 of file NMEPluginWiki.c.
Write an unsigned integer of up to 4 digits.
- Parameters:
-
[in] | padding | if 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.
|
|