commit f86e34f88c8deeb38bb4f546e7421ffd6933f513
parent 4696810e4b8813fed008242933c9024c3e0f7214
Author: gottox@rootkit.lan <gottox@rootkit.lan>
Date: Fri, 14 Dec 2007 12:48:19 +0100
moving functions
Diffstat:
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/cmarkdown.c b/cmarkdown.c
@@ -24,7 +24,6 @@ struct Tag {
void eprint(const char *format, ...); /* Prints error and exits */
-void hprint(const char *begin, const char *end); /* escapes HTML and prints it to stdout*/
unsigned int doamp(const char *begin, const char *end, int first);
/* Parser for & */
unsigned int dohtml(const char *begin, const char *end, int first);
@@ -45,6 +44,7 @@ unsigned int dosurround(const char *begin, const char *end, int first);
/* Parser for surrounding tags */
unsigned int dounderline(const char *begin, const char *end, int first);
/* Parser for underline tags */
+void hprint(const char *begin, const char *end); /* escapes HTML and prints it to stdout*/
void process(const char *begin, const char *end, int isblock);
/* Processes range between begin and end. */
@@ -117,19 +117,6 @@ eprint(const char *format, ...) {
exit(EXIT_FAILURE);
}
-void
-hprint(const char *begin, const char *end) {
- const char *p;
-
- for(p = begin; p && p != end; p++) {
- if(*p == '&') fputs("&",stdout);
- else if(*p == '"') fputs(""",stdout);
- else if(*p == '>') fputs(">",stdout);
- else if(*p == '<') fputs("<",stdout);
- else putchar(*p);
- }
-}
-
unsigned int
doamp(const char *begin, const char *end, int first) {
const char *p;
@@ -476,6 +463,24 @@ dounderline(const char *begin, const char *end, int first) {
}
void
+hprint(const char *begin, const char *end) {
+ const char *p;
+
+ for(p = begin; p && p != end; p++) {
+ if(*p == '&')
+ fputs("&",stdout);
+ else if(*p == '"')
+ fputs(""",stdout);
+ else if(*p == '>')
+ fputs(">",stdout);
+ else if(*p == '<')
+ fputs("<",stdout);
+ else
+ putchar(*p);
+ }
+}
+
+void
process(const char *begin, const char *end, int isblock) {
const char *p, *q;
int affected;