Skip to content

Commit

Permalink
fix code indentation in a test program in configure; tweak title
Browse files Browse the repository at this point in the history
generation in xmlpage to stop gcc & clang from complaining about
dangling elses
  • Loading branch information
Orc committed Oct 27, 2022
1 parent 7afa5c6 commit 262c7c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions configure.inc
Original file line number Diff line number Diff line change
Expand Up @@ -364,15 +364,17 @@ AC_PROG_CC () {
test "$AC_CC" && return 0

cat > ngc$$.c << \EOF
void say(char*);
void
say(char*);
int main(void)
{
say("hello, sailor");
}
EOF
cat > ngf$$.c << \EOF
#include <stdio.h>
void say(char* message)
void
say(char* message)
{
puts(message);
}
Expand Down
10 changes: 6 additions & 4 deletions xmlpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ mkd_xhtmlpage(Document *p, mkd_flag_t* flags, FILE *out)
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n") );

DO_OR_DIE( fprintf(out, "<head>\n") );
DO_OR_DIE( fprintf(out, "<title>") );

if ( title = DOCUMENT_TITLE(p) )
DO_OR_DIE( fprintf(out, "%s", title) );
DO_OR_DIE( fprintf(out, "</title>\n") );

title = DOCUMENT_TITLE(p);

DO_OR_DIE( fprintf(out, "<title>%s</title>", title ? title : "") );

DO_OR_DIE( mkd_generatecss(p, out) );

DO_OR_DIE( fprintf(out, "</head>\n"
"<body>\n") );

Expand Down

0 comments on commit 262c7c7

Please sign in to comment.