bagder: curl-www/legal dilemma.pl,NONE,1.1

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/legal
In directory labb:/tmp/cvs-serv2839

Added Files:
	dilemma.pl 
Log Message:
fix the dilemma doc


--- NEW FILE: dilemma.pl ---
#!/usr/bin/perl
while(<STDIN>) {
    if($_ =~ s/((http|ftp):\/\/([A-Za-z0-9.\/_%\#-]*[0-9A-Za-z\/]))/<a href=\"$2:\/\/$3\">$1<\/a>/g) {
    }
    else {
        # convert <> to html-codes
        $_ =~ s/\</&lt;/g;
        $_ =~ s/\>/&gt;/g;

        # empty lines become &nbsp;
        $_ =~ s/^[ \t]*$/\&nbsp;/g;

        # trailing backslashes become \&nbsp;
        $_ =~ s/\\$/\\&nbsp;/;

        # convert the begining of a "C comment" to a html code to prevent the
        # cpp to barf
        $_ =~ s/\/\*/&\#47;*/g;
    }
    print $_;
}

_______________________________________________
http://cool.haxx.se/mailman/listinfo/curl-www-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.