mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-23 20:11:44 +01:00
updated, non-tested version
This commit is contained in:
@@ -18,7 +18,7 @@ char buf[MEM_USE];
|
|||||||
|
|
||||||
int get_line(FILE * fl, char *buf);
|
int get_line(FILE * fl, char *buf);
|
||||||
void skip_spaces(char **string);
|
void skip_spaces(char **string);
|
||||||
void parse_webster_html(void);
|
void parse_webster_html(char *arg);
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int pid = 0;
|
int pid = 0;
|
||||||
@@ -82,13 +82,13 @@ void parse_webster_html(char *arg) {
|
|||||||
q = outline;
|
q = outline;
|
||||||
|
|
||||||
while (*p != '<')
|
while (*p != '<')
|
||||||
q++ = p++;
|
*q++ = *p++;
|
||||||
|
|
||||||
if (!strncmp(p, "<br>", 4) || !strncmp(p, "<p>", 3) || !strncmp(p, "<div class=\"sds-list\">", 24) || !strncmp(p, "<div class=\"sds-list\">", 25))
|
if (!strncmp(p, "<br>", 4) || !strncmp(p, "<p>", 3) || !strncmp(p, "<div class=\"sds-list\">", 24) || !strncmp(p, "<div class=\"sds-list\">", 25))
|
||||||
q++ = '\n';
|
*q++ = '\n';
|
||||||
// if it's not a <br> tag or a <div class="sds-list"> or <div class="ds-list"> tag, ignore it.
|
// if it's not a <br> tag or a <div class="sds-list"> or <div class="ds-list"> tag, ignore it.
|
||||||
|
|
||||||
q++='\0';
|
*q++='\0';
|
||||||
fprintf(outfile, "%s", outline);
|
fprintf(outfile, "%s", outline);
|
||||||
|
|
||||||
if (!strncmp(p, "</table>", 8))
|
if (!strncmp(p, "</table>", 8))
|
||||||
|
|||||||
Reference in New Issue
Block a user