Minor doc & portability fixes
This commit is contained in:
parent
7b0ba45346
commit
0c59b56ee8
4 changed files with 11 additions and 6 deletions
|
|
@ -366,7 +366,7 @@ here anyway because the L<FU> supervisor uses them:
|
|||
=item fdpass_send($send_fd, $pass_fd, $message)
|
||||
|
||||
Send a message and a file descriptor (C<$pass_fd>) over the given socket
|
||||
(<$send_fd>). C<$message> must not be empty, even if you don't intend to do
|
||||
(C<$send_fd>). C<$message> must not be empty, even if you don't intend to do
|
||||
anything with it on receipt. Both C<$send_fd> and C<$pass_fd> must be numeric
|
||||
file descriptors, as obtained by C<fileno()>.
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ changes, see the main L<FU> module for details.
|
|||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use FU::XMLWriter ':html5';
|
||||
use FU::XMLWriter ':html5_';
|
||||
|
||||
my $html_string = html_ sub {
|
||||
head_ sub {
|
||||
|
|
@ -108,7 +108,7 @@ changes, see the main L<FU> module for details.
|
|||
|
||||
# Or XML:
|
||||
|
||||
use FU::XMLWriter ':xml';
|
||||
use FU::XMLWriter ':xml_';
|
||||
|
||||
my $xml_string = xml_ sub {
|
||||
tag_ feed => xmlns => 'http://www.w3.org/2005/Atom',
|
||||
|
|
@ -268,12 +268,12 @@ and C<"> are replaced with their XML entity.
|
|||
All of the functions mentioned in this document can be imported individually.
|
||||
There are also two import groups:
|
||||
|
||||
use FU::XMLWriter ':html';
|
||||
use FU::XMLWriter ':html_';
|
||||
|
||||
Exports C<tag_()>, C<html_()>, C<lit_()>, C<txt_()> and all of the C<<
|
||||
<html-tag>_ >> functions mentioned above.
|
||||
|
||||
use FU::XMLWriter ':xml';
|
||||
use FU::XMLWriter ':xml_';
|
||||
|
||||
Exports C<xml_()>, C<tag_()>, C<lit_()> and C<txt_()>.
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ WriteMakefile(
|
|||
dynamic_config => 0,
|
||||
resources => {
|
||||
repository => 'https://code.blicky.net/yorhel/fu',
|
||||
bugtracker => 'https://code.blicky.net/yorhel/fu/issues',
|
||||
},
|
||||
no_index => {
|
||||
file => 'bench.PL',
|
||||
},
|
||||
},
|
||||
depend => { '$(OBJECT)', 'c/*.c' },
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ static void fuxmlwr_escape(pTHX_ fuxmlwr *wr, SV *sv) {
|
|||
const unsigned char *str = (unsigned char *)SvPV_const(sv, len);
|
||||
const unsigned char *tmp, *end = str + len;
|
||||
unsigned char x = 0;
|
||||
unsigned char *buf;
|
||||
int utf8 = SvUTF8(sv);
|
||||
|
||||
while (str < end) {
|
||||
|
|
@ -55,7 +56,7 @@ static void fuxmlwr_escape(pTHX_ fuxmlwr *wr, SV *sv) {
|
|||
case '&': fustr_write(&wr->out, "&", 5); break;
|
||||
case '"': fustr_write(&wr->out, """, 6); break;
|
||||
default:
|
||||
unsigned char *buf = (unsigned char *)fustr_write_buf(&wr->out, 2);
|
||||
buf = (unsigned char *)fustr_write_buf(&wr->out, 2);
|
||||
buf[0] = 0xc0 | (x >> 6);
|
||||
buf[1] = 0x80 | (x & 0x3f);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue