From: b Date: Tue, 9 Jan 2024 00:14:37 +0000 (+0000) Subject: adapt to new version of write_data_file() X-Git-Tag: v1.0.4~1 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=2d37dbabd46a064f734275af06f466d0ac903068;p=ott%2Fpost adapt to new version of write_data_file() --- diff --git a/botm-common b/botm-common index 6b789b4..8dbd1b4 160000 --- a/botm-common +++ b/botm-common @@ -1 +1 @@ -Subproject commit 6b789b4bd0ac1d87d3a2d8598ad229298e2c4777 +Subproject commit 8dbd1b461e07f2894c4fcacacd681ab7c34b6bcb diff --git a/makefile.1.mak b/makefile.1.mak index 110dbda..5ced71e 100644 --- a/makefile.1.mak +++ b/makefile.1.mak @@ -101,8 +101,6 @@ $(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt configure.pl exec: $(EXEC) $(CHMOD) +x $(EXEC) -wrap_exec: - setuid: $(SETUID) $(CHMOD) u+s,g+s $(SETUID) @@ -128,7 +126,7 @@ install: all cp_bin cp_lib clean: $(RM) -f configure.pl $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c) -PHONY: all clean install cp_bin cp_lib +PHONY: all clean install setuid exec mktree cp_bin cp_lib diff --git a/post_common.1.pm b/post_common.1.pm index 9658d3e..cc174f8 100644 --- a/post_common.1.pm +++ b/post_common.1.pm @@ -1864,7 +1864,11 @@ sub bbcode_to_html { if ($print) { print "BBTREE:\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%bbtree); + write_data_file( + \*STDOUT, \%bbtree, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\nGenerate HTML from BBcode tree:\n"; } ($level, $ind, $sub_ind) = bbtree_start(\%bbtree, $print); diff --git a/preview.1.pl b/preview.1.pl index 826f966..5c5f0a4 100644 --- a/preview.1.pl +++ b/preview.1.pl @@ -152,7 +152,11 @@ unless ($options{'quiet'} ne '') { print "PREVIEW $$ $time - $timetext\n\n"; if ($options{'verbose'} ne '') { print "OPTIONS:\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%options); + write_data_file( + \*STDOUT, \%options, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\n"; } } @@ -220,14 +224,22 @@ foreach my $arg (@ARGV) { } } if ($options{'verbose'} ne '') { - write_data_file(\*STDOUT, 'console_out', 0, \%data); + write_data_file( + \*STDOUT, \%data, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\n"; } %post = prepare_post(\%options, \%data); if ($options{'verbose'} ne '') { print "POST\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%post); + write_data_file( + \*STDOUT, \%post, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\n"; } diff --git a/sendpost.1.pl b/sendpost.1.pl index 6c1e4b4..ac19a13 100644 --- a/sendpost.1.pl +++ b/sendpost.1.pl @@ -148,7 +148,11 @@ unless ($options{'quiet'} ne '') { print "POST BOT $$ $time - $timetext\n\n"; if ($options{'verbose'} ne '') { print "OPTIONS:\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%options); + write_data_file( + \*STDOUT, \%options, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\n"; } } @@ -190,14 +194,22 @@ foreach my $arg (@ARGV) { } } if ($options{'verbose'} ne '') { - write_data_file(\*STDOUT, 'console_out', 0, \%data); + write_data_file( + \*STDOUT, \%data, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\n"; } my %post = prepare_post(\%options, \%data); if ($options{'verbose'} ne '') { print "POST\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%post); + write_data_file( + \*STDOUT, \%post, 'console_out', + 0, 0, 0, + '>>', 1 + ); print "\n"; } @@ -273,7 +285,11 @@ sub post_to_mirror { print "GET edit page"; if ($cmd_options->{'verbose'} ne '') { print ": $edit_url SAVE $tmp_path\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%wget_options); + write_data_file( + \*STDOUT, \%wget_options, 'console_out', + 0, 0, 0, + '>>', 1 + ); } else { print "\n"; @@ -300,7 +316,11 @@ sub post_to_mirror { %header = read_header_file($fh, ENCODING_MIRROR()); if ($cmd_options->{'verbose'} ne '') { print "HEADER\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%header); + write_data_file( + \*STDOUT, \%header, 'console_out', + 0, 0, 0, + '>>', 1 + ); } if ($header{':status-code'} != 200) { @@ -322,7 +342,11 @@ sub post_to_mirror { } if ($cmd_options->{'verbose'} ne '') { print "PREVIOUS POST\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%previous_post); + write_data_file( + \*STDOUT, \%previous_post, 'console_out', + 0, 0, 0 + '>>', 1 + ); print "\n"; } } @@ -369,12 +393,21 @@ sub post_to_mirror { unless ($cmd_options->{'quiet'} ne '') { if ($cmd_options->{'verbose'} ne '') { print "POST DATA\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%post_data); + write_data_file( + \*STDOUT, \%post_data, 'console_out', + 0, 0, 0, + '>>', 1 + ); } print "SUBMIT post"; if ($cmd_options->{'verbose'} ne '') { print ": $post_url SAVE $tmp_path\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%wget_options); + write_data_file( + \*STDOUT, \%wget_options, 'console_out', + 0, 0, 0, + '>>', 1 + ); + } else { print "\n"; @@ -401,7 +434,11 @@ sub post_to_mirror { %header = read_header_file($fh, ENCODING_MIRROR()); if ($cmd_options->{'verbose'} ne '') { print "HEADER\n"; - write_data_file(\*STDOUT, 'console_out', 0, \%header); + write_data_file( + \*STDOUT, \%header, 'console_out', + 0, 0, 0, + '>>', 1 + ); } if ($header{':status-code'} != 200) {