X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fhtml.c;h=3f7416290b070d92c94db48c8f8dbf7688fa03b8;hb=027eba771a7ef9d25e97f0026d6469ea34c06523;hp=c647f34b5726cd86f71281a6772118d38d962081;hpb=4944c86a9318bc5b5578ab145a95c116ffd2c9fd;p=pspp-builds.git diff --git a/src/html.c b/src/html.c index c647f34b..3f741629 100644 --- a/src/html.c +++ b/src/html.c @@ -21,6 +21,7 @@ #if !NO_HTML #include +#include "htmlP.h" #include #include #include @@ -35,7 +36,6 @@ #include "error.h" #include "filename.h" #include "getline.h" -#include "htmlP.h" #include "output.h" #include "som.h" #include "tab.h" @@ -45,19 +45,19 @@ static int postopen (struct file_ext *); static int preclose (struct file_ext *); -int +static int html_open_global (struct outp_class *this unused) { return 1; } -int +static int html_close_global (struct outp_class *this unused) { return 1; } -int +static int html_preopen_driver (struct outp_driver *this) { struct html_driver_ext *x; @@ -87,7 +87,7 @@ html_preopen_driver (struct outp_driver *this) return 1; } -int +static int html_postopen_driver (struct outp_driver *this) { struct html_driver_ext *x = this->ext; @@ -105,7 +105,7 @@ html_postopen_driver (struct outp_driver *this) return 1; } -int +static int html_close_driver (struct outp_driver *this) { struct html_driver_ext *x = this->ext; @@ -141,7 +141,7 @@ static struct outp_option option_tab[] = }; static struct outp_option_info option_info; -void +static void html_option (struct outp_driver *this, const char *key, const struct string *val) { struct html_driver_ext *x = this->ext; @@ -174,10 +174,6 @@ html_option (struct outp_driver *this, const char *key, const struct string *val *dest = xstrdup (ds_value (val)); } break; -#if __CHECKER__ - case 42000: - assert (0); -#endif default: assert (0); } @@ -362,7 +358,7 @@ preclose (struct file_ext *f) return 1; } -int +static int html_open_page (struct outp_driver *this) { struct html_driver_ext *x = this->ext; @@ -382,7 +378,7 @@ html_open_page (struct outp_driver *this) return !ferror (x->file.file); } -int +static int html_close_page (struct outp_driver *this) { struct html_driver_ext *x = this->ext; @@ -394,7 +390,7 @@ html_close_page (struct outp_driver *this) static void output_tab_table (struct outp_driver *, struct tab_table *); -void +static void html_submit (struct outp_driver *this, struct som_table *s) { extern struct som_table_class tab_table_class; @@ -556,18 +552,19 @@ output_tab_table (struct outp_driver *this, struct tab_table *t) strcpy (cp, ">"); fputs (header, x->file.file); - { - char *s = ls_value (cc); - size_t l = ls_length (cc); - - while (l && isspace ((unsigned char) *s)) - { - l--; - s++; - } + if ( ! (*ct & TAB_EMPTY) ) + { + char *s = ls_value (cc); + size_t l = ls_length (cc); + + while (l && isspace ((unsigned char) *s)) + { + l--; + s++; + } - escape_string (x->file.file, s, l); - } + escape_string (x->file.file, s, l); + } fprintf (x->file.file, "\n", tag); }