Expando Node for Text. More...
#include <stdint.h>
Include dependency graph for node_text.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Typedefs | |
| typedef uint8_t | NodeTextTermFlags |
Enumerations | |
| enum | NodeTextTermFlag { NTE_NONE = 0 , NTE_AMPERSAND = 1U << 0 , NTE_GREATER = 1U << 1 , NTE_QUESTION = 1U << 2 } |
| Special characters that end a text string. More... | |
Functions | |
| struct ExpandoNode * | node_text_new (const char *text) |
| Create a new Text ExpandoNode. | |
| struct ExpandoNode * | node_text_parse (const char *str, NodeTextTermFlags term_chars, const char **parsed_until) |
| Extract a block of text. | |
Expando Node for Text.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file node_text.h.
| typedef uint8_t NodeTextTermFlags |
Definition at line 39 of file node_text.h.
| enum NodeTextTermFlag |
Special characters that end a text string.
| Enumerator | |
|---|---|
| NTE_NONE | No flags are set. |
| NTE_AMPERSAND | '&' Ampersand |
| NTE_GREATER | '>' Greater than |
| NTE_QUESTION | '?' Question mark |
Definition at line 32 of file node_text.h.
| struct ExpandoNode * node_text_new | ( | const char * | text | ) |
Create a new Text ExpandoNode.
| text | Text to store |
| ptr | New Text ExpandoNode |
Definition at line 59 of file node_text.c.
Here is the call graph for this function:
Here is the caller graph for this function:| struct ExpandoNode * node_text_parse | ( | const char * | str, |
| NodeTextTermFlags | term_chars, | ||
| const char ** | parsed_until ) |
Extract a block of text.
| [in] | str | String to parse |
| [in] | term_chars | Terminator characters, e.g. NTE_GREATER |
| [out] | parsed_until | First character after parsed text |
| ptr | New Text ExpandoNode |
Parse as much text as possible until the end of the line, or a terminator character is matched.
May return NULL if a terminator character is found immediately.
\ before a character makes it literal %% is interpreted as a literal % character Definition at line 86 of file node_text.c.
Here is the call graph for this function:
Here is the caller graph for this function: