From: b Date: Thu, 4 Jan 2024 13:09:33 +0000 (+0000) Subject: removed old functions X-Git-Tag: v1.0.0~25 X-Git-Url: http://bicyclesonthemoon.info/git-projects/?a=commitdiff_plain;h=9bac4ea203e099591a51c43a739174b6c22dd211;p=botm%2Foldlogs removed old functions --- diff --git a/bsta_lib.1.pm b/bsta_lib.1.pm index b7bcd32..884614c 100644 --- a/bsta_lib.1.pm +++ b/bsta_lib.1.pm @@ -49,16 +49,6 @@ our @EXPORT_OK = ( 'write_index', 'ong', 'eval_bb', 'bb_to_bbcode', 'bb_to_html' - - , - 'readdatafile', 'writedatafile', 'printdatafile', # TO REMOVE - 'entityencode', # TO REMOVE - 'printdatafileht', # TO REMOVE ??? - 'gethttpheader', 'getcgi', # TO REMOVE - 'urldecode', # TO REMOVE - 'urlencode', # TO REMOVE - 'linehtml', # TO REMOVE - 'bb2ht', 'bb2bb' # TO REMOVE ); ###PERL_LIB: use lib /botm/lib/bsta @@ -419,121 +409,6 @@ sub merge_settings { return %final_settings; } -# TO REMOVE -# function to encode entities, decimal, -sub entityencode { - (my $t, my $all) = @_; - return html_entity_encode_dec($t, 1, $all); -} - -# TO REMOVE -# function to get values of http header fields. Returns a hash. names of header -# fields are lowercase -sub gethttpheader { - (my $env) = @_; - - return read_header_env($env); -} - -# TO REMOVE -# The function to get CGI parameters from string. -# Format is: name=url_encoded_value&name=url_encoded_value& ... &name=url_encoded_value -sub getcgi { - return url_query_decode($_[0]); -} - -# TO REMOVE -# Function for decoding URL-encoded text -sub urldecode { - return url_decode($_[0]); -} - -# TO REMOVE -# Function to read data from datafiles. -# Very similar to http header file reading. (function readheaderfile() in proxy -# library) -# -# Differences: -# -# 1. After field name and colon there must be exactly one whitespace (space or -# tab). Any other leading or trailing whitespace (but not the newline character -# at the end of the line) is treated as part of the field value. -# -# 2. Instead of colon an equal sign can be used. The number of whitespaces after -# it is then zero and not one. -# -# 3. When header field is split into multiple lines the next lines must start -# with exactly one whitespace (tab or space) Any other leading or trailing -# whitespace (but not the newline character at the end of the line) is treated -# as part of the field value. the lines will be joined with a newline between -# them. -# -# 4. When the same field name appears it replaces the previous one. -# -# 5. Line separator is LF and not CR LF. The CR character is treated as part of -# the field value. -# -# 6. After the end of header (double newline) all next lines are treated as the -# value of the "content" field. -# -# Returns a hash containing the values. -# Names are case sensitive and are converted to lowercase -# -# Argument can be a path or a file handle. In case of a file handle it will just -# read the file. In case of path it opens the file before reading and closes -# after. On failure (file not open) returns empty hash. -# -sub readdatafile { - (my $datapath) = @_; - - return read_data_file($datapath); -} - -# TO REMOVE -# the function to write data to datafiles (see readdatafile() description) -# -# First argument can be a path or a file handle. In case of a file handle it -# will just write the file. In case of path it opens the file before writing and -# closes after. -# -# On failure (file not open) returns 0. -# On success returns 1. -# -sub writedatafile { - (my $headerpath, my %header) = @_; - - return write_data_file($headerpath, '', 0, \%header); -} - -# TO REMOVE -# the function to print data to stdout (see readdatafile() description) -# -# On success returns 1. -# -sub printdatafile { - (my %header) = @_; - - return write_data_file(\*STDOUT, '', 0, \%header); -} - -# TO REMOVE -# the function to print data to stdout as html (see readdatafile() description) -# -# On success returns 1. -# -sub printdatafileht { - (my %header) = @_; - - print_html_data(\*STDOUT, \%header); - return 1; -} - -# TO REMOVE -sub urlencode { - (my $t, my $all) = @_; - return url_encode($t, '', $all); -} - # BB code stuff # different & simpler implementation than in post library @@ -823,16 +698,6 @@ sub bb_to_bbcode { return $ht; } -# TO REMOVE -sub bb2ht { - return bb_to_html(@_); -} - -# TO REMOVE -sub bb2bb { - return bb_to_bbcode(@_); -} - sub eval_bb { (my $bb, my $full_url) = @_; my $value; @@ -901,11 +766,6 @@ sub html_encode_line { return $html; } -# TO REMOVE -sub linehtml { - return html_encode_line($_[0], 1); -} - sub debug { (my $print, my $text) = @_;