]> bicyclesonthemoon.info Git - ott/post/commitdiff
adapt to new version of write_data_file()
authorb <rowerynaksiezycu@gmail.com>
Tue, 9 Jan 2024 00:14:37 +0000 (00:14 +0000)
committerb <rowerynaksiezycu@gmail.com>
Tue, 9 Jan 2024 00:14:37 +0000 (00:14 +0000)
botm-common
makefile.1.mak
post_common.1.pm
preview.1.pl
sendpost.1.pl

index 6b789b4bd0ac1d87d3a2d8598ad229298e2c4777..8dbd1b461e07f2894c4fcacacd681ab7c34b6bcb 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 6b789b4bd0ac1d87d3a2d8598ad229298e2c4777
+Subproject commit 8dbd1b461e07f2894c4fcacacd681ab7c34b6bcb
index 110dbdaef0b0c304a89f65436d2b9ff6d56fde72..5ced71e49b04bb723cb8333181ba866461efdda7 100644 (file)
@@ -101,8 +101,6 @@ $(PERL_WRAP_EXEC): %: exec/exec.c exec/settings.txt configure.pl
 exec: $(EXEC)\r
        $(CHMOD) +x $(EXEC)\r
 \r
-wrap_exec: \r
-\r
 setuid: $(SETUID)\r
        $(CHMOD) u+s,g+s $(SETUID)\r
 \r
@@ -128,7 +126,7 @@ install: all cp_bin cp_lib
 clean:\r
        $(RM) -f configure.pl $(TO_GENERATE) $(PERL_WRAP_EXEC) $(PERL_WRAP_EXEC:=.c)\r
 \r
-PHONY: all clean install cp_bin cp_lib\r
+PHONY: all clean install setuid exec mktree cp_bin cp_lib\r
 \r
 \r
 \r
index 9658d3ebdeb9aec87620220b7b527c541976792e..cc174f8569f9525851c253c3734a3e7127889777 100644 (file)
@@ -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);
index 826f9669147b2287e6a97597e8d91b99042f0256..5c5f0a489f56ecefd5e278a11f725543fe7aadf2 100644 (file)
@@ -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";
        }
        
index 6c1e4b44d40fd7415d77160c0dab6c568de2fdc5..ac19a13020104907df20b17dbffa58ee5c750759 100644 (file)
@@ -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) {