Result:
found 674 distributions and 1899 files matching your query ! ( run in 0.476 )


SearchSDK

 view release on metacpan or  search on metacpan

SearchSDK.pm  view on Meta::CPAN

	     avs_search_getdata
	     avs_search_getdatalen
	     avs_search_getdate
	     avs_search_getdocid
	     avs_search_getrelevance
	     avs_setdocdata
	     avs_setdocdate
	     avs_setdocdatetime
	     avs_setparseflags
	     avs_setrankval
	     avs_startdoc

SearchSDK.pm  view on Meta::CPAN


avs_search_getdocidlen(searchHdl)

avs_search_getrelevance(psearchHdl)

avs_setdocdata(idx, pDocData, len)

avs_setdocdate(idx, year, month, day)

avs_setdocdatetime(idx, year, month, day, hour, minute, second)

 view all matches for this distribution


Serge

 view release on metacpan or  search on metacpan

lib/Serge/Engine/Plugin/parse_php_xhtml.pm  view on Meta::CPAN


    $self->{errors}->{$self->get_current_file_rel} = $message;
    die $message;
}

my $in_cdata;
my $in_tag;
my $in_attr;
sub fix_php_blocks {
    my ($self, $s, $textref) = @_;

    #print $-[0].':'.$+[0]."\n";

    if ($s eq '<![CDATA[') {
        if ($in_cdata) {
            my $error = "Premature '<![CDATA['";
            $self->die_with_error($error, $textref);
        } else {
            $in_cdata = 1;
        }
    } elsif ($s eq ']]>') {
        if (!$in_cdata) {
            my $error = "Premature ']]>'";
            $self->die_with_error($error, $textref);
        } else {
            $in_cdata = undef;
        }
    } elsif ($s eq '<') {
        if (!$in_cdata) {
            if ($in_tag) {
                my $error = "Premature '<'";
                $self->die_with_error($error, $textref);
            } else {
                $in_tag = 1;
            }
        }
    } elsif ($s eq '>') {
        if (!$in_cdata) {
            if (!$in_tag) {
                my $error = "Premature '>'";
                $self->die_with_error($error, $textref);
            } elsif ($in_attr) {
                my $error = "Premature '>' before '\"'";

lib/Serge/Engine/Plugin/parse_php_xhtml.pm  view on Meta::CPAN

            } else {
                $in_tag = undef;
            }
        }
    } elsif ($s eq '"') {
        if (!$in_cdata && $in_tag) {
            $in_attr = !$in_attr;
        }
    } else { # PHP block
        if (!$in_cdata && $in_tag && !$in_attr) {
            $s = " $s=\"\" ";
        }
    }

    return $s;

lib/Serge/Engine/Plugin/parse_php_xhtml.pm  view on Meta::CPAN


    # Now we should properly handle the situation when PHP blocks are inside the <...>
    # This violates the XML rules, so we should dance around this, converting
    # all '__PHP__BLOCK__#__' to ' __PHP__BLOCK__#__="" '. Yeah, weird.

    $in_cdata = undef;
    $in_tag = undef;
    $in_attr = undef;

    $text =~ s/(<\!\[CDATA\[|\]\]>|<|>|"|__PHP__BLOCK__\d+__)/$self->fix_php_blocks($1, \$text)/ge;

lib/Serge/Engine/Plugin/parse_php_xhtml.pm  view on Meta::CPAN


    return ($will_translate or $some_child_will_translate or $prohibit_translation or $prohibit_children_translation, $contains_translatables);
}

sub render_tag_recursively {
    my ($self, $name, $subtree, $callbackref, $lang, $prohibit, $cdata, $context) = @_;
    my $attrs = $subtree->[0];

    my $translate = (exists $attrs->{'.translate'}) && (!exists $attrs->{'.prohibit'}) && !$prohibit;

    # if translation is prohibited for an entire subtree, or if the node is going to be translated
    # as a whole, then prohibit translation of children
    my $prohibit_children = $prohibit || $translate;

    $cdata = 1 if (($name eq '__CDATA') || ($name eq '__COMMENT'));

    # if context or hint attribute is defined, use that instead of current value, even if the new value is empty;
    # for values that represent empty strings, use `undef`

    if (exists $attrs->{context}) {

lib/Serge/Engine/Plugin/parse_php_xhtml.pm  view on Meta::CPAN

        my $tagname = $subtree->[1 + $i*2];
        my $tagtree = $subtree->[1 + $i*2 + 1];

        if ($tagname ne '0') {
            # if we are going to translate this tag as a whole, then prohibit translation for the entire subtree
            $inner_xml .= $self->render_tag_recursively($tagname, $tagtree, $callbackref, $lang, $prohibit_children, $cdata, $context);
        } else {
            # tagtree holds a string for text nodes

            my $str = $tagtree;

            # Escaping unsafe xml chars (excluding quotes)

            xml_escape_strref(\$str, 1) unless $cdata;

            # Reconstructing original XML with PHP blocks and symbolic entities

            $self->reconstruct_xml(\$str);

 view all matches for this distribution


Signature-Attribute-Alias

 view release on metacpan or  search on metacpan

lib/Signature/Attribute/Alias.xs  view on Meta::CPAN

  *padentry = svp ? SvREFCNT_inc(*svp) : &PL_sv_undef;

  return o->op_next;
}

static void apply_Alias(pTHX_ struct XPSSignatureParamContext *ctx, SV *attrvalue, void **attrdata_ptr, void *funcdata)
{
  PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[ctx->padix];
  if(PadnamePV(pn)[0] != '$')
    croak("Can only apply the :Alias attribute to scalar parameters");
  if(ctx->is_named)
    croak("Cannot apply the :Alias attribute to a named parameter");
}

static void post_defop_Alias(pTHX_ struct XPSSignatureParamContext *ctx, void *attrdata, void *funcdata)
{
  if(ctx->defop)
    croak("Cannot apply the :Alias attribute to a parameter with a defaulting expression");

  OP *varop = ctx->varop;

 view all matches for this distribution


Signature-Attribute-Checked

 view release on metacpan or  search on metacpan

lib/Signature/Attribute/Checked.xs  view on Meta::CPAN


#include "compilerun_sv.c.inc"

#include "DataChecks.h"

static void apply_Checked(pTHX_ struct XPSSignatureParamContext *ctx, SV *attrvalue, void **attrdata_ptr, void *funcdata)
{
  PADNAME *pn = PadnamelistARRAY(PL_comppad_name)[ctx->padix];
  if(PadnamePV(pn)[0] != '$')
    croak("Can only apply the :Checked attribute to scalar parameters");

lib/Signature/Attribute/Checked.xs  view on Meta::CPAN

  op->op_targ = padix;
  return op;
}
#endif

static void post_defop_Checked(pTHX_ struct XPSSignatureParamContext *ctx, void *attrdata, void *funcdata)
{
  struct DataChecks_Checker *checker = attrdata;

  OP *assertop = make_assertop(checker, newPADxVOP(OP_PADSV, 0, ctx->padix));

  ctx->op = op_append_elem(OP_SCOPE,
    ctx->op, assertop);
}

static void free_Checked(pTHX_ struct XPSSignatureParamContext *ctx, void *attrdata, void *funcdata)
{
  struct DataChecks_Checker *checker = attrdata;
  free_checkdata(checker);
}

 view all matches for this distribution


Silicon-Chip

 view release on metacpan or  search on metacpan

lib/Silicon/Chip.pm  view on Meta::CPAN

  my $pageWidth = $W + 1;                                                       # Width of input, output and non io gates as laid out.

  if (defined($title))                                                          # Title if known
   {$s->text(x=>$pageWidth, y=>0.5, fill=>"darkGreen", text_anchor=>"end",
      stroke_width=>Fw, font_size=>Fs, z=>-1,
      cdata=>$title);
   }

  if (defined($steps))                                                          # Number of steps taken if known
   {$s->text(x=>$pageWidth, y=>1.5, fill=>"darkGreen", text_anchor=>"end",
      stroke_width=>Fw, font_size=>Fs, z=>-1,
      cdata=>"$steps steps");
   }

  for my $P(sort keys %p)                                                       # Each gate with text describing it
   {my $p = $p{$P};
    my $x = $p->x;

lib/Silicon/Chip.pm  view on Meta::CPAN

       fill              =>"black",
       stroke_width      => Fw,
       font_size         => Fs,
       text_anchor       => $g->io != gateOuterOutput ? "start": "end",
       dominant_baseline => "hanging",
       cdata             => $v ? "1" : "0");
     }

    if (defined(my $t = $$changed{$g->output}) and !$g->io)                     # Gate change time if known for a non io gate
     {$s->text(
       x                 => $w + ($g->io != gateOuterOutput ? $x : $x + 1),
       y                 => 1 + $y,
       fill              =>"black",
       stroke_width      => fw,
       font_size         => fs,
       text_anchor       => "end",
       cdata             => $t+1);
     }

    my sub ot($$$$)                                                             # Output svg text
     {my ($dy, $fill, $pos, $text) = @_;
      $s->text(x                 => $x+$w/2,
               y                 => $y+$dy,
               fill              => $fill,
               text_anchor       => "middle",
               dominant_baseline => $pos,
               cdata             => $text);
      }

    ot(5/12, "red",      "auto",    $g->type);                                  # Type of gate
    ot(7/12, "darkblue", "hanging", $g->output);

lib/Silicon/Chip.pm  view on Meta::CPAN

            fill         => "black",
            stroke_width => fw,
            font_size    => fs,
            text_anchor  => "middle",
            $bottom ? () : (dominant_baseline=>"hanging"),
            cdata        =>  $v ? "1" : "0");
         }
       }
     }
   }
  my $t = $s->print;

lib/Silicon/Chip.pm  view on Meta::CPAN

  my sub wt($;$)                                                                # Write titles on following lines
   {my ($t, $T) = @_;                                                           # Value, title to write
    if (defined($t))                                                            # Value to write
     {$py += Tl;                                                                # Position to write at
      my $s = $t; $s .= " $T" if $T;                                            # Text to write
      $svg->text(x => $width, y => $py, cdata => $s,                            # Write text
        fill=>"darkGreen", text_anchor=>"end", stroke_width=>Tw, font_size=>Ts);
     }
   }

  wt($chip->title);                                                             # Title if known

lib/Silicon/Chip.pm  view on Meta::CPAN

       fill              =>"black",
       stroke_width      => Fw,
       font_size         => Fs,
       text_anchor       => "start",
       dominant_baseline => "hanging",
       cdata             => $v ? "1" : "0");
     }

    if (defined(my $t = $p->changed) and !$p->inPin and !$p->outPin)            # Gate change time if known for a non io gate
     {$svg->text(
       x                 => $p->x + $p->width,
       y                 => $p->y + 1,
       fill              => "darkBlue",
       stroke_width      => fw,
       font_size         => fs,
       text_anchor       => "end",
       cdata             => $t+1);
     }

    my sub ot($$$$)                                                             # Output svg text
     {my ($dy, $fill, $pos, $text) = @_;
      $svg->text(x                 => $p->x+$p->width/2,
                 y                 => $p->y+$dy,
                 fill              => $fill,
                 text_anchor       => "middle",
                 dominant_baseline => $pos,
                 cdata             => $text);
      }

    ot(5/12, "red",      "auto",    $p->type);                                  # Type of gate
    ot(7/12, "darkblue", "hanging", $p->output);

lib/Silicon/Chip.pm  view on Meta::CPAN

          fill              => "darkRed",
          stroke_width      => fw,
          font_size         => fs,
          text_anchor       => "middle",
          dominant_baseline => "hanging",
          cdata             => $v ? "1" : "0");
       }
     }
   }

  if (debugMask)                                                                # Show fiber names - useful when debugging bus lines

lib/Silicon/Chip.pm  view on Meta::CPAN

            fill              =>"black",
            stroke_width      => fw,
            font_size         => fs,
            text_anchor       => 'middle',
            dominant_baseline => 'auto',
            cdata             => $n,
           )# if $n eq "a4" || $n eq "a4";
         }
        if (defined(my $n = $fibers[$i][$j][1]))                                # Vertical
         {$svg->text(
            x                 => $i+1/2,

lib/Silicon/Chip.pm  view on Meta::CPAN

            fill              =>"red",
            stroke_width      => fw,
            font_size         => fs,
            text_anchor       => 'middle',
            dominant_baseline => 'hanging',
            cdata             => $n,
           )# if $n eq "a4" || $n eq "a4";
         }
       }
     }
   }

 view all matches for this distribution


Socket-Class

 view release on metacpan or  search on metacpan

xs/sc_ssl/openssl/source/apps/pkcs12.c  view on Meta::CPAN

			if (options & INFO) {
				BIO_printf(bio_err, "PKCS7 Encrypted data: ");
				alg_print(bio_err, 
					p7->d.encrypted->enc_data->algorithm);
			}
			bags = PKCS12_unpack_p7encdata(p7, pass, passlen);
		} else continue;
		if (!bags) goto err;
	    	if (!dump_certs_pkeys_bags (out, bags, pass, passlen, 
						 options, pempass)) {
			sk_PKCS12_SAFEBAG_pop_free (bags, PKCS12_SAFEBAG_free);

 view all matches for this distribution


Solstice

 view release on metacpan or  search on metacpan

lib/Solstice/StringLibrary.pm  view on Meta::CPAN

use Exporter;

our @ISA = qw(Exporter);
our ($VERSION) = ('$Revision: 2418 $' =~ /^\$Revision:\s*([\d.]*)/);

our @EXPORT = qw|htmltounicode truncstr truncemail fixstrlen encode decode unrender scrubhtml convertspaces strtoascii strtourl strtofilename strtojavascript trimstr htmltotext extracttext scrubcdata urlclean fixlinewidth|;
our %EXPORT_TAGS = ( all => [ qw|
    htmltounicode
    truncstr
    truncemail
    fixstrlen

lib/Solstice/StringLibrary.pm  view on Meta::CPAN

    strtofilename
    strtojavascript
    trimstr
    htmltotext
    extracttext
    scrubcdata
    urlclean
    fixlinewidth
| ] );

our @EXPORT_OK = ( @{ $EXPORT_TAGS{all} } );

lib/Solstice/StringLibrary.pm  view on Meta::CPAN

        s/(?:\s|&#09;|&#10;|&#13;|&#32;)+$//;
    }
    return $string;
}

=item scrubcdata($string)

This will return a string with ]]> escaped, so it will be cdata safe.

=cut

sub scrubcdata {
    my $string = shift;
    return undef unless defined $string;

    $string =~ s/]]>/]]&gt;/g;
    return $string;

 view all matches for this distribution


Spreadsheet-Compare

 view release on metacpan or  search on metacpan

lib/Spreadsheet/Compare/Reader/CSV.pm  view on Meta::CPAN

    $debug and DEBUG "chunking side $self->{index}";
    my $skipper = $self->skipper;
    while ( my $rec = $self->_read_record ) {
        next if $skipper and $skipper->($rec);
        my $cname = $self->chunker->($rec);
        my $cdata = $self->_chunk_data->{$cname} //= [];
        push @$cdata, delete( $rec->{__INFO__} );
    }

    $debug and DEBUG "found chunks:", sub { Dump( [ sort keys $self->_chunk_data->%* ] ) };

    my $fh = $self->filehandle;

lib/Spreadsheet/Compare/Reader/CSV.pm  view on Meta::CPAN


    my $result = $self->result;
    my $count  = 0;

    if ( $self->chunker ) {
        my $cdata = $self->_chunk_data;
        my $cname = ( sort keys %$cdata )[0];
        my $chunk = delete $cdata->{$cname};
        $self->{__ro__exhausted} = 1 unless keys %$cdata;
        $debug and DEBUG "Fetching data for chunk $cname";
        for my $rec_info (@$chunk) {
            if ( my $rec = $self->_read_record($rec_info) ) {
                push @$result, $rec;
                $count++;

 view all matches for this distribution


Spreadsheet-HTML

 view release on metacpan or  search on metacpan

lib/Spreadsheet/HTML.pm  view on Meta::CPAN

    }

    if ($args{scroll}) {
        my ($js, %new_args) = Spreadsheet::HTML::Presets::Scroll::scroll(
            %args,
            data => [ map [ map $_->{cdata}, @$_ ], @{ $args{data} } ],
        );
        for (keys %args) {
            if (ref $args{$_} eq 'HASH') {
                $new_args{$_} = { %{ $new_args{$_} || {} }, %{ $args{$_} || {} } };
            }

lib/Spreadsheet/HTML.pm  view on Meta::CPAN

            pop  @{ $data->[$row] } for $args->{_max_cols} .. $#{ $data->[$row] };                 # truncate
        }

        for my $col (0 .. $#{ $data->[$row] }) {

            my ( $cdata, $attr ) = ( $data->[$row][$col], undef );
            for ($tag, "-c$col", "-r$row", "-r${row}c${col}") {
                next unless exists $args->{$_};
                ( $cdata, $attr ) = _extrapolate( $cdata, $attr, $args->{$_} );
            }

            do{ no warnings;
                $cdata = HTML::Entities::encode_entities( $cdata, $args->{encodes} ) if $args->{encode} || exists $args->{encodes};
                $cdata =~ s/^\s*$/$empty/g;
            };

            $data->[$row][$col] = { 
                tag => $tag, 
                (defined( $cdata ) ? (cdata => $cdata) : ()), 
                (keys( %$attr )    ? (attr => $attr)   : ()),
            };
        }
        $tag = 'td';
    }

lib/Spreadsheet/HTML.pm  view on Meta::CPAN

}

sub _make_table {
    my %args = @_;

    my @cdata = ( _tag( %args, tag => 'caption' ) || (), _colgroup( %args ) );

    if ($args{tgroups}) {

        my @body = @{ $args{data} };
        my $head = shift @body unless $args{matrix} and scalar @{ $args{data} } > 2;
        my $foot = pop @body if !$args{matrix} and $args{tgroups} > 1 and scalar @{ $args{data} } > 2;

        my $head_row  = { tag => 'tr', attr => $args{'thead.tr'}, cdata => $head };
        my $foot_row  = { tag => 'tr', attr => $args{'tfoot.tr'}, cdata => $foot };
        my $body_rows = [ map { tag => 'tr', attr => $args{tr}, cdata => $_ }, @body ];

        if (int($args{group} || 0) > 1) {
            $body_rows = [
                map [ @$body_rows[$_ .. $_ + $args{group} - 1] ],
                _range( 0, $#$body_rows, $args{group} )

lib/Spreadsheet/HTML.pm  view on Meta::CPAN

            pop @{ $body_rows->[-1] } while !defined $body_rows->[-1][-1];
        } else {
            $body_rows = [ $body_rows ];
        }

        push @cdata, (
            ( $head ? { tag => 'thead', attr => $args{thead}, cdata => $head_row } : () ),
            ( $foot ? { tag => 'tfoot', attr => $args{tfoot}, cdata => $foot_row } : () ),
            ( map     { tag => 'tbody', attr => $args{tbody}, cdata => $_ }, @$body_rows ),
        );


    } else {
        push @cdata, map { tag => 'tr', attr => $args{tr}, cdata => $_ }, @{ $args{data} };
    }

    return $args{_auto}->tag( tag => 'table', attr => $args{table}, cdata => \@cdata );
}

sub _args {
    my ($self,@data,$data,@args,$args);
    $self = shift if UNIVERSAL::isa( $_[0], __PACKAGE__ );

lib/Spreadsheet/HTML.pm  view on Meta::CPAN


    return ( $self, [ map [@$_], @$data], $args );
}

sub _extrapolate {
    my ( $cdata, $attr, $thingy ) = @_;
    my $new_attr;
    $thingy = [ $thingy ] unless ref( $thingy ) eq 'ARRAY';
    for (@{ $thingy }) {
        if (ref($_) eq 'CODE') {
            $cdata = $_->($cdata);
        } elsif (ref($_) eq 'HASH') {
            $new_attr = $_;
        }
    }
    $attr = { %{ $attr || {} }, %{ $new_attr || {} } };
    return ( $cdata, $attr );
}

sub _colgroup {
    my %args = @_;

lib/Spreadsheet/HTML.pm  view on Meta::CPAN


        if (ref $args{colgroup} eq 'ARRAY') {
            @colgroup = map {
                tag   => 'colgroup',
                attr  => $_,
                cdata => [ map { tag => 'col', attr => $_ }, @{ $args{col} } ]
            }, @{ $args{colgroup} }; 
        } else {
            @colgroup = {
                tag   => 'colgroup',
                attr  => $args{colgroup},
                cdata => [ map { tag => 'col', attr => $_ }, @{ $args{col} } ]
            }; 
        }

    } else {

lib/Spreadsheet/HTML.pm  view on Meta::CPAN


sub _tag {
    my %args = @_;
    my $thingy = $args{ $args{tag} };
    return unless defined $thingy;
    my $tag = { tag => $args{tag}, cdata => $thingy };
    if (ref $thingy eq 'HASH') {
        $tag->{cdata} = ( keys   %$thingy )[0];
        $tag->{attr}  = ( values %$thingy )[0];
    }
    return $tag;
}

 view all matches for this distribution


Spreadsheet-ParseXLSX

 view release on metacpan or  search on metacpan

lib/Spreadsheet/ParseXLSX.pm  view on Meta::CPAN


Michael Daum <daum@michaeldaumconsulting.com>

=item *

Nick Moore <nick.moore@strategicdata.com.au>

=item *

oharakouhei <gofue0723@gmail.com>

 view all matches for this distribution


Starlink-AST

 view release on metacpan or  search on metacpan

ast/src/plot.c  view on Meta::CPAN

   Box_ubnd[ 1 ] = astMAX( y, Box_ubnd[ 1 ] );

}

static void AxPlot( AstPlot *this, int axis, const double *start, double length,
                    int ink, AstPlotCurveData *cdata, const char *method, const char *class, int *status ){
/*
*
*  Name:
*     AxPlot

ast/src/plot.c  view on Meta::CPAN

*     Private function.

*  Synopsis:
*     #include "plot.h"
*     void AxPlot( AstPlot *this, int axis, const double *start, double length,
*                  int ink, AstPlotCurveData *cdata, const char *method, const char *class, int *status )

*  Class Membership:
*     Plot member function.

*  Description:

ast/src/plot.c  view on Meta::CPAN

*        The length of the section of the curve to be drawn, given as an
*        increment along the axis specified by parameter "axis".
*     ink
*        If zero, the curve is not actually drawn, but information about
*        the breaks is still returned. If non-zero, the curve is also drawn.
*     cdata
*        A pointer to a structure in which to return information about the
*        breaks in the curve.
*     method
*        Pointer to a string holding the name of the calling method.
*        This is only for use in constructing error messages.

ast/src/plot.c  view on Meta::CPAN

*        Pointer to the inherited status variable.

*  Notes:
*     -  No curve is draw if the "start" array contains any bad values
*     (i.e. values equal to AST__BAD), or if the "length" value is bad,
*     or if a NULL pointer is supplied for "cdata". No errors are reported
*     in these cases.
*/

/* Local Variables: */
   astDECLARE_GLOBALS      /* Pointer to thread-specific global data */

ast/src/plot.c  view on Meta::CPAN

          axis, AST__DBL_DIG, start[0], AST__DBL_DIG, start[1], AST__DBL_DIG, length );
   getchar();
#endif


/* Initialise any supplied cdata structure to hold safe values. */
   if( cdata ){
      cdata->length = 0.0;
      cdata->out = 1;
      cdata->nbrk = 0;
   }

/* Get the number of axes in the current Frame. */
   naxes = astGetNout( this );

ast/src/plot.c  view on Meta::CPAN

   }

/* Check the "length" parameter for bad values. */
   if( length == AST__BAD ) ok = 0;

/* Check that the "cdata" pointer can be used. */
   if( !cdata ) ok = 0;

/* Only proceed if the parameters are OK, and there has been no error. */
   if( ok && astOK ){

/* Establish the correct graphical attributes as defined by attributes

ast/src/plot.c  view on Meta::CPAN

      Crv_xlo = this->xlo;
      Crv_xhi = this->xhi;
      Crv_ylo = this->ylo;
      Crv_yhi = this->yhi;
      Crv_out = 1;
      Crv_xbrk = cdata->xbrk;
      Crv_ybrk = cdata->ybrk;
      Crv_vxbrk = cdata->vxbrk;
      Crv_vybrk = cdata->vybrk;
      Crv_clip = astGetClip( this ) & 1;

/* Set up a list of points spread evenly over the curve. */
      for( i = 0; i < CRV_NPNT; i++ ){
        d[ i ] = ( (double) i)/( (double) CRV_NSEG );

ast/src/plot.c  view on Meta::CPAN

         }
      }

/* Store extra information about the curve in the returned structure, and
   purge any zero length sections. */
      if( cdata ){
         cdata->length = Crv_len;
         cdata->out = Crv_out;
         cdata->nbrk = Crv_nbrk;
         PurgeCdata( cdata, status );
      }

/* Annul the Frame and Mapping. */
      Map1_frame = astAnnul( Map1_frame );
      Map1_map = astAnnul( Map1_map );

ast/src/plot.c  view on Meta::CPAN

*/

/* Local Variables: */
   astDECLARE_GLOBALS      /* Pointer to thread-specific global data */
   AstPlot *this;          /* Plot with no more than 2 current axes */
   AstPlotCurveData cdata; /* Structure to receive break information */
   const char *class;      /* Object class */
   const char *method;     /* Current method */
   int inval;              /* Were any bad regions found? */
   int naxes;              /* No. of axes in the base Frame */

ast/src/plot.c  view on Meta::CPAN


/* We first draw the intersections of the regions containing valid
   physical coordinates with the edges of the plotting area. First do
   the bottom edge. */
   LinePlot( this, this->xlo, this->ylo, this->xhi, this->ylo,
             1, &cdata, method, class, status );

/* Now do the right-hand edge. */
   LinePlot( this, this->xhi, this->ylo, this->xhi, this->yhi,
             1, &cdata, method, class, status );

/* Now do the top edge. */
   LinePlot( this, this->xhi, this->yhi, this->xlo, this->yhi,
             1, &cdata, method, class, status );

/* Now do the left-hand edge. */
   LinePlot( this, this->xlo, this->yhi, this->xlo, this->ylo,
             1, &cdata, method, class, status );

/* Now draw a curve following the boundary through the interior of the
   plotting area. If the current Frame in the Plot is a Region, we use a
   shorter method if possible. If this is not possible, we use a longer
   method. */

ast/src/plot.c  view on Meta::CPAN

/* Return the answer. */
   return ret;

}

static AstPlotCurveData **CleanCdata( AstPlotCurveData **cdata, int *status ){
/*
*  Name:
*     CleanCdata

*  Purpose:

ast/src/plot.c  view on Meta::CPAN

*  Type:
*     Private function.

*  Synopsis:
*     #include "plot.h"
*     AstPlotCurveData **CleanCdata( AstPlotCurveData **cdata, int *status )

*  Class Membership:
*     Plot member function.

*  Description:
*     This function releases the memory used to hold the curve break
*     information returned by function DrawGrid, and returns a NULL pointer.

*  Parameters:
*     cdata
*        Pointer to the information to be freed.
*     status
*        Pointer to the inherited status variable.

*  Returned Value:

ast/src/plot.c  view on Meta::CPAN

*     occurred.

*/

/* Return if a NULL pointer has been supplied. */
   if( !cdata ) return NULL;

/* Release each of the two structures in turn (if they exist). */
   (void) astFree( (void *) cdata[ 0 ] );
   (void) astFree( (void *) cdata[ 1 ] );

/* Release the memory used to hold the two AstPlotCurveData pointers. */
   (void) astFree( (void *) cdata );

/* Return. */
   return NULL;

}

ast/src/plot.c  view on Meta::CPAN

/* Return. */
   return;
}

static void CurvePlot( AstPlot *this, const double *start, const double *finish,
                     int ink, AstPlotCurveData *cdata, const char *method,
                     const char *class, int *status ){
/*
*
*  Name:
*     CurvePlot

ast/src/plot.c  view on Meta::CPAN

*     Private function.

*  Synopsis:
*     #include "plot.h"
*     void CurvePlot( AstPlot *this, const double *start, const double *finish,
*                   int ink, AstPlotCurveData *cdata, const char *method,
*                   const char *class, int *status )

*  Class Membership:
*     Plot member function.

ast/src/plot.c  view on Meta::CPAN

*        A pointer to a an array holding the coordinates of the finish of the
*        curve within the current Frame of the Plot.
*     ink
*        If zero, the curve is not actually drawn, but information about
*        the breaks is still returned. If non-zero, the curve is also drawn.
*     cdata
*        A pointer to a structure in which to return information about the
*        breaks in the curve.
*     method
*        Pointer to a string holding the name of the calling method.
*        This is only for use in constructing error messages.

ast/src/plot.c  view on Meta::CPAN

*     status
*        Pointer to the inherited status variable.

*  Notes:
*     -  No curve is draw if the "start" or "finish" arrays contains any bad
*     values, or if a NULL pointer is supplied for "cdata". No errors are
*     reported in these cases.
*/

/* Local Variables: */
   astDECLARE_GLOBALS      /* Pointer to thread-specific global data */

ast/src/plot.c  view on Meta::CPAN

         ok = 0;
         break;
      }
   }

/* Check that the "cdata" pointer can be used. */
   if( !cdata ) ok = 0;

/* Only proceed if the parameters are OK, and there has been no error. */
   if( ok && astOK ){

/* Establish the correct graphical attributes as defined by attributes

ast/src/plot.c  view on Meta::CPAN

      Crv_xlo = this->xlo;
      Crv_xhi = this->xhi;
      Crv_ylo = this->ylo;
      Crv_yhi = this->yhi;
      Crv_out = 1;
      Crv_xbrk = cdata->xbrk;
      Crv_ybrk = cdata->ybrk;
      Crv_vxbrk = cdata->vxbrk;
      Crv_vybrk = cdata->vybrk;
      Crv_clip = astGetClip( this ) & 1;

/* Set up a list of points spread evenly over the curve. */
      for( i = 0; i < CRV_NPNT; i++ ){
        d[ i ] = ( (double) i)/( (double) CRV_NSEG );

ast/src/plot.c  view on Meta::CPAN

         }
      }

/* Store extra information about the curve in the returned structure, and
   purge any zero length sections. */
      if( cdata ){
         cdata->length = Crv_len;
         cdata->out = Crv_out;
         cdata->nbrk = Crv_nbrk;
         PurgeCdata( cdata, status );
      }

/* Annul the Frame and Mapping. */
      Map3_frame = astAnnul( Map3_frame );
      Map3_map = astAnnul( Map3_map );

ast/src/plot.c  view on Meta::CPAN


*/

/* Local Variables: */
   AstFrame *frm;         /* Pointer to current Frame */
   AstPlotCurveData cdata;/* Somewhere to put the unneeded curve information */
   TickInfo *info;        /* Pointer to the TickInfo for the current axis */
   double *value;         /* Current tick value */
   double bot;            /* Lowest axis value to be displayed */
   double diff;           /* Difference between adjacent tick marks */
   double udiff;          /* Used section length */

ast/src/plot.c  view on Meta::CPAN

   axis value. */
               if( tick == 0 ) {
                  udiff = *value - bot;
                  if( udiff > diff ) udiff = diff;
                  if( udiff > 0.0 ) {
                     AxPlot( this, axis, start, -udiff, 1, &cdata, method,
                             class, status );
                  }
               }

/* Limit the length of the section so that it does not extend beyond the

ast/src/plot.c  view on Meta::CPAN

               if( udiff > 0.0 ) {

/* Draw a curve parallel to the current axis, starting at the tick mark,
   with length equal to the gap between tick marks. Do not draw sections
   of the curve which are outside the primary domains of the physical axes. */
                  AxPlot( this, axis, start, udiff, 1, &cdata, method,
                          class, status );
               }

            }

ast/src/plot.c  view on Meta::CPAN

   last tick isn't at the upper visible bound. Limit the length of this
   section so that it does not extend beyond the maximum axis value. */
            udiff = top - start[ axis ];
            if( udiff > diff ) udiff = diff;
            if( udiff > 0.0 ) {
               AxPlot( this, axis, start, udiff, 1, &cdata, method,
                       class, status );
            }
         }
      }

ast/src/plot.c  view on Meta::CPAN

*     for any reason, then a NULL pointer is returned.

*/

/* Local Variables: */
   AstPlotCurveData **cdata;/* The returned pointer */
   AstPlotCurveData *cdt;   /* Pointer to break info. for current tick mark */
   AstPlotCurveData tcdt;   /* Pointer to break info. for current curve section */
   TickInfo *info;          /* Tick mark information for a single axis */
   double start[ 2 ];       /* Strting position for current curve section */
   double total_length;     /* Total curve length for all axis ticks */

ast/src/plot.c  view on Meta::CPAN

/* Check the global status. */
   if( !astOK ) return NULL;

/* Allocate memory to hold two pointers, each pointing to an array of
   AstPlotCurveData structure. */
   cdata = (AstPlotCurveData **) astMalloc( 2*sizeof( AstPlotCurveData *) );

/* If succesful, initialise the pointers. */
   if( astOK ){
      cdata[ 0 ] = NULL;
      cdata[ 1 ] = NULL;

/* Draw the curves marking the major tick values on each axis. If no grid is
   required, we still do this in order to get information about the breaks
   in the curves which will be used later to decide where to put the labels,
   but we use "invisible ink". */

ast/src/plot.c  view on Meta::CPAN

         info = grid[ i ];

/* Allocate memory to hold information describing the breaks in each tick
   mark curve. This takes the form of an array of AstPlotCurveData structures,
   one for each tick mark. */
         cdata[ i ] = (AstPlotCurveData *) astMalloc( sizeof(AstPlotCurveData)*
                                               (size_t) info->nmajor );

/* Check the pointer can be used. */
         if( astOK ){

/* Initialise a pointer to the first AstPlotCurveData structure for this axis. */
            cdt = cdata[ i ];
            total_length = 0.0;

/* Do each tick mark. */
            for( j = 0; j < info->nmajor; j++ ){

ast/src/plot.c  view on Meta::CPAN

      }

   }

/* If an error has occurred, clean up the returned structures. */
   if( !astOK ) cdata = CleanCdata( cdata, status );

/* Return. */
   return cdata;

}

static int DrawRegion( AstPlot *this, AstFrame *frm, const char *method,
                       const char *class, int *status ){

ast/src/plot.c  view on Meta::CPAN


*/

/* Local Variables: */
   AstMapping *map;        /* Mapping with Region masking included */
   AstPlotCurveData cdata; /* Stores information about curve breaks */
   AstRegion **comps;      /* List of component Regions */
   astDECLARE_GLOBALS      /* Pointer to thread-specific global data */
   double d[ CRV_NPNT ];   /* Offsets to evenly spaced points along curve */
   double tol;             /* Absolute tolerance value */
   double x[ CRV_NPNT ];   /* X coords at evenly spaced points along curve */

ast/src/plot.c  view on Meta::CPAN

      Crv_xlo = this->xlo;
      Crv_xhi = this->xhi;
      Crv_ylo = this->ylo;
      Crv_yhi = this->yhi;
      Crv_out = 1;
      Crv_xbrk = cdata.xbrk;
      Crv_ybrk = cdata.ybrk;
      Crv_vxbrk = cdata.vxbrk;
      Crv_vybrk = cdata.vybrk;
      Crv_clip = astGetClip( this ) & 1;

/* Attempt to split the Region into a set of disjoint component Regions. */
      comps = astRegSplit( (AstRegion *) frm, &ncomp );

ast/src/plot.c  view on Meta::CPAN

/* Invoke the active GRF EBuf function. */
   GEBuf( this, "astEBuf", astGetClass( this ), status );
}

static int EdgeLabels( AstPlot *this, int ink, TickInfo **grid,
                       AstPlotCurveData **cdata, int force, const char *method,
                       const char *class, int *status ){
/*
*
*  Name:
*     EdgeLabels

ast/src/plot.c  view on Meta::CPAN

*     Private function.

*  Synopsis:
*     #include "plot.h"
*     int EdgeLabels( AstPlot *this, int ink, TickInfo **grid,
*                     AstPlotCurveData **cdata, int force, const char *method,
*                     const char *class, int *status )

*  Class Membership:
*     Plot member function.

ast/src/plot.c  view on Meta::CPAN

*        value.
*     grid
*        A pointer to an array of two TickInfo pointers (one for each axis),
*        each pointing to a TickInfo structure holding information about
*        tick marks on the axis. See function GridLines.
*     cdata
*        A pointer to an array of two AstPlotCurveData pointers (one for each axis),
*        each pointing to an array of AstPlotCurveData structure (one for each
*        major tick value on the axis), holding information about breaks
*        in the curves drawn to mark the major tick values. See function
*        DrawGrid.

ast/src/plot.c  view on Meta::CPAN

      info = grid[ axis ];

/* Get a pointer to the structure containing information describing the
   breaks in the curve which is parallel to the other axis and passes
   through the first major tick mark. */
      cdt = cdata[ axis ];

/* Initialise the pointer to the list of text strings to be drawn. */
      labellist = NULL;

/* Initialise the number of labels which can be placed on the near edge of

ast/src/plot.c  view on Meta::CPAN

*/

/* Local Variables: */
   astDECLARE_GLOBALS      /* Pointer to thread-specific global data */
   AstPlot *this;          /* Plot with 2d current Frame */
   AstPlotCurveData **cdata;/* Pointer to info. about breaks in curves */
   TickInfo **grid;        /* Pointer to info. about tick marks */
   const char *class;      /* Object class */
   const char *method;     /* Current method */
   double cen[ 2 ];        /* Position of first tick mark */
   double gap[ 2 ];        /* Gap between tick marks */

ast/src/plot.c  view on Meta::CPAN

      drawgrid = 0;
   }

/* Draw the curves marking the major tick values on each axis. Information
   is returned describing the positions of the breaks in these curves. */
   cdata = DrawGrid( this, grid, ( ink && drawgrid ), method, class, status );

/* See if labels and tick marks will be drawn round the edges of the
   plotting area, rather than within it (no labels are actually drawn
   yet). Interior labels can always be produced, in which case edgeticks
   is set explicitly to zero to indicate that ticks will be internal.

ast/src/plot.c  view on Meta::CPAN

   clredge = 0;
   labelling = astGetLabelling( this );
   if( labelling ){
      edgeticks = 0;
   } else {
      edgeticks = EdgeLabels( this, 0, grid, cdata, 0, method, class, status );

/* If the external labelling was requested, but could not be produced... */
      if( !edgeticks ) {

/* and if the Edge attributes have not been set... */

ast/src/plot.c  view on Meta::CPAN

            oldedge1 = astGetEdge( this, 1 );
            astSetEdge( this, 0, oldedge1 );
            astSetEdge( this, 1, oldedge0 );

/* See if exterior labels could be drawn with these new edges. */
            edgeticks = EdgeLabels( this, 0, grid, cdata, 0, method, class, status );

/* If this would allow us to use the requested labelling scheme, retain
   the new Edge values, setting a flag to indicate that they will need to be
   cleared before returning. Otherwise, clear them. */
            if( edgeticks ) {

ast/src/plot.c  view on Meta::CPAN


/* If edge ticks can still not be produced, but the ForceExterior attribute
   has a non-zero value, attempt to create exterior labels even though it
   looks like there may be insufficient of them to justify their use. */
   if( !edgeticks && astGetForceExterior( this ) ) {
      edgeticks = EdgeLabels( this, 0, grid, cdata, 1, method, class, status );
   }

/* We may also need to swap edge values when using interior labelling in
   order to ensure that the text labels are placed on appropriate edges of
   the plotting box. */
   if( !edgeticks && !astTestEdge( this, 0 ) && !astTestEdge( this, 1 ) ) {
      if( swapEdges( this, grid, cdata, status ) ) {
         oldedge0 = astGetEdge( this, 0 );
         oldedge1 = astGetEdge( this, 1 );
         astSetEdge( this, 0, oldedge1 );
         astSetEdge( this, 1, oldedge0 );
         clredge = 1;

ast/src/plot.c  view on Meta::CPAN

      labelat[ 1 ] = AST__BAD;

/* Otherwise, see where interior labels and tick marks should go (the axis
   values are put in "labelat"). */
   } else {
      useint = Labelat( this, grid, cdata, labelat, method, class, status );

/* If interior labelling does not allow us to draw any more ticks, revert
   to edge labelling if that is what the user requested. */
      if( !useint && !labelling ) {
         labelat[ 0 ] = AST__BAD;
         labelat[ 1 ] = AST__BAD;
         edgeticks = EdgeLabels( this, 0, grid, cdata, 1, method, class, status );
      }
   }

/* See if a border is required. By default, a border is drawn only when
   using exterior labelling. */

ast/src/plot.c  view on Meta::CPAN

/* If required, draw a curve around the edge of the area containing valid
   physical coordinates. */
      if( border ) (void) astBorder( this );

/* Draw the numerical labels at the major tick values. */
      Labels( this, grid, cdata, gap, labelat, method, class, status );

/* Draw the textual labels for each axis and a title. */
      TextLabels( this, edgeticks, dounits, method, class, status );
   }

ast/src/plot.c  view on Meta::CPAN

   SetUsedGrid( this_nd, drawgrid, status );
   SetUsedLabelling( this_nd, edgeticks ? 0 : 1, status );
   SetUsedBorder( this_nd, border, status );

/* Free the memory used to hold information about the curves. */
   cdata = CleanCdata( cdata, status );

/* Free the memory used to hold information about the tick marks. */
   grid = CleanGrid( grid, status );

/* If required clear attributes. */

ast/src/plot.c  view on Meta::CPAN


/* Return the result. */
   return result;
}

static int Labelat( AstPlot *this, TickInfo **grid, AstPlotCurveData **cdata,
                    double *labelat, const char *method, const char *class,
                    int *status ){
/*
*
*  Name:

ast/src/plot.c  view on Meta::CPAN

*  Type:
*     Private function.

*  Synopsis:
*     #include "plot.h"
*     int Labelat( AstPlot *this, TickInfo **grid, AstPlotCurveData **cdata,
*                  double *labelat, const char *method, const char *class )

*  Class Membership:
*     Plot member function.

ast/src/plot.c  view on Meta::CPAN

*        A pointer to the Plot.
*     grid
*        A pointer to an array of two TickInfo pointers (one for each axis),
*        each pointing to a TickInfo structure holding information about
*        tick values on the axis. See function GridLines.
*     cdata
*        A pointer to an array of two AstPlotCurveData pointers (one for each axis),
*        each pointing to an array of AstPlotCurveData structure (one for each
*        major tick value on the axis), holding information about breaks
*        in the curves drawn to mark the major tick values. See function
*        DrawGrid.

ast/src/plot.c  view on Meta::CPAN

   equal to zero. */
      lim = 1.0E-6*fabs( value[ 1 ] - value [ 0 ] );

/* Get a pointer to the structure containing information describing the
   breaks in the curve which passes through the first major tick mark. */
      cdt = cdata[ 1 - axis ];

/* Initialise the effective length of the longest and shortest curves, and
   the curve passing through the origin. */
      maxlen = -1.0;
      minlen = DBL_MAX;

ast/src/plot.c  view on Meta::CPAN

/* Return. */
   return result;

}

static void Labels( AstPlot *this, TickInfo **grid, AstPlotCurveData **cdata,
                    double *gap, double *labelat, const char *method,
                    const char *class, int *status ){
/*
*
*  Name:

ast/src/plot.c  view on Meta::CPAN

*  Type:
*     Private function.

*  Synopsis:
*     #include "plot.h"
*     void Labels( AstPlot *this, TickInfo **grid, AstPlotCurveData **cdata,
*                  double *gap, double *labelat, const char *method,
*                  const char *class, int *status )

*  Class Membership:
*     Plot member function.

ast/src/plot.c  view on Meta::CPAN

*        A pointer to the Plot.
*     grid
*        A pointer to an array of two TickInfo pointers (one for each axis),
*        each pointing to a TickInfo structure holding information about
*        tick values on the axis. See function GridLines.
*     cdata
*        A pointer to an array of two AstPlotCurveData pointers (one for each axis),
*        each pointing to an array of AstPlotCurveData structure (one for each
*        major tick value on the axis), holding information about breaks
*        in the curves drawn to mark the major tick values. See function
*        DrawGrid.

ast/src/plot.c  view on Meta::CPAN

   (void) Overlap( this, 0, 0, NULL, 0.0, 0.0, NULL, 0.0, 0.0, NULL,
                   method, class, status );

/* If required, draw the labels around the edges of the plotting area. */
   if( labelat[ 0 ] == AST__BAD || labelat[ 1 ] == AST__BAD ){
      (void) EdgeLabels( this, 1, grid, cdata, 1, method, class, status );

/* Otherwise, draw labels within the interior of the plotting area. */
   } else {

/* Find the scale factors for the two axes which scale graphics coordinates

ast/src/plot.c  view on Meta::CPAN

   return;

}

static void LinePlot( AstPlot *this, double xa, double ya, double xb,
                      double yb, int ink, AstPlotCurveData *cdata,
                      const char *method, const char *class, int *status ){
/*
*
*  Name:
*     LinePlot

ast/src/plot.c  view on Meta::CPAN

*     Private function.

*  Synopsis:
*     #include "plot.h"
*     void LinePlot( AstPlot *this, double xa, double ya, double xb,
*                    double yb, int ink, AstPlotCurveData *cdata,
*                    const char *method, const char *class, int *status )

*  Class Membership:
*     Plot member function.

ast/src/plot.c  view on Meta::CPAN

*     yb
*        The graphics Y coordinate at the end of the line.
*     ink
*        If zero, the line is not actually drawn, but information about
*        the breaks is still returned. If non-zero, the line is also drawn.
*     cdata
*        A pointer to a structure in which to return information about the
*        breaks in the line.
*     method
*        Pointer to a string holding the name of the calling method.
*        This is only for use in constructing error messages.

ast/src/plot.c  view on Meta::CPAN

*     status
*        Pointer to the inherited status variable.

*  Notes:
*     -  No curve is draw if any of the start or end positions are bad
*     (i.e. equal to AST__BAD), or if a NULL pointer is supplied for "cdata".
*     No errors are reported in these cases.
*/

/* Local Variables: */
   astDECLARE_GLOBALS      /* Pointer to thread-specific global data */

ast/src/plot.c  view on Meta::CPAN

   astGET_GLOBALS(this);

/* Check the supplied values are usable. */
   if( xa == AST__BAD || ya == AST__BAD ||
       xb == AST__BAD || yb == AST__BAD ||
      !cdata ) return;

/* Convert the tolerance from relative to absolute graphics coordinates. */
   tol = astGetTol( this )*astMAX( this->xhi - this->xlo, this->yhi - this->ylo );

/* Ensure the globals holding the scaling from graphics coords to equally

ast/src/plot.c  view on Meta::CPAN

   Crv_xlo = this->xlo;
   Crv_xhi = this->xhi;
   Crv_ylo = this->ylo;
   Crv_yhi = this->yhi;
   Crv_out = 1;
   Crv_xbrk = cdata->xbrk;
   Crv_ybrk = cdata->ybrk;
   Crv_vxbrk = cdata->vxbrk;
   Crv_vybrk = cdata->vybrk;
   Crv_clip = astGetClip( this ) & 1;

/* Create a set of evenly spaced values between 0.0 and 1.0. These are the
   offsets the edge of the plotting zone at which the mapping is tested. */
   for( i = 0; i < CRV_NPNT; i++ ){

ast/src/plot.c  view on Meta::CPAN

      }
   }

/* Store extra information about the curve in the returned structure, and
   purge any zero length sections. */
   if( cdata ){
      cdata->length = Crv_len;
      cdata->out = Crv_out;
      cdata->nbrk = Crv_nbrk;
      PurgeCdata( cdata, status );
   }

/* Annul the Mapping. */
   Map2_map = astAnnul( Map2_map );

ast/src/plot.c  view on Meta::CPAN

/* Return the result. */
   return result;

}

static void PurgeCdata( AstPlotCurveData *cdata, int *status ){
/*
*
*  Name:
*     AstPlotCurveData

ast/src/plot.c  view on Meta::CPAN

*  Type:
*     Private function.

*  Synopsis:
*     #include "plot.h"
*     void PurgeCdata( AstPlotCurveData *cdata )

*  Class Membership:
*     Plot member function.

*  Description:
*     This function removes any zero length sections from the supplied
*     AstPlotCurveData struture, which describes a multi-section curve.

*  Parameters:
*     cdata
*        A pointer to the structure containing information about the
*        breaks in a curve.

*/

/* Local Variables: */
   int brk;                       /*Break index */
   int i;                       /*Break index */

/* Check the global error status. */
   if ( !astOK || !cdata ) return;

/* Loop round all breaks. */
   brk = 0;
   while( brk < cdata->nbrk ) {

/* If this break and the next one are co-incident, remove both breaks. */
      if( cdata->xbrk[ brk ] == cdata->xbrk[ brk + 1 ] &&
          cdata->ybrk[ brk ] == cdata->ybrk[ brk + 1 ] ) {

/* Shuffle down the higher elements of all the arrays in the curve data. */
         for( i = brk + 2; i < cdata->nbrk; i++ ){
            cdata->xbrk[ i - 2 ] = cdata->xbrk[ i ];
            cdata->ybrk[ i - 2 ] = cdata->ybrk[ i ];
            cdata->vxbrk[ i - 2 ] = cdata->vxbrk[ i ];
            cdata->vybrk[ i - 2 ] = cdata->vybrk[ i ];
         }

/*  Decrement the number of breaks in the curve data. */
         cdata->nbrk -= 2;

/* If the section is not zero length, move on to the next pair of breaks. */
      } else {
         brk += 2;
      }

ast/src/plot.c  view on Meta::CPAN


/* Return the result.*/
   return stripescapes_buff;
}

static int swapEdges( AstPlot *this, TickInfo **grid, AstPlotCurveData **cdata, int *status ) {
/*
*  Name:
*     swapEdges

*  Purpose:

ast/src/plot.c  view on Meta::CPAN

*  Type:
*     Private function.

*  Synopsis:
*     #include "plot.h"
*     int swapEdges( AstPlot *this, TickInfo **grid, AstPlotCurveData **cdata, int *status )

*  Class Membership:
*     Plot member function.

*  Description:

ast/src/plot.c  view on Meta::CPAN

*        A pointer to the Plot.
*     grid
*        A pointer to an array of two TickInfo pointers (one for each axis),
*        each pointing to a TickInfo structure holding information about
*        tick marks on the axis. See function GridLines.
*     cdata
*        A pointer to an array of two AstPlotCurveData pointers (one for each axis),
*        each pointing to an array of AstPlotCurveData structure (one for each
*        major tick value on the axis), holding information about breaks
*        in the curves drawn to mark the major tick values. See function
*        DrawGrid.

ast/src/plot.c  view on Meta::CPAN

   info = grid[ 0 ];

/* Get a pointer to the structure containing information describing
   the breaks in the curve which is parallel to axis 1 and passes
   through the first major tick mark on axis 0. */
   cdt = cdata[ 0 ];

/* Initialise the graphiocs X and Y bounds of the area covered by the
   axis. */
   xmax = -1.0E10;
   xmin = 1.0E10;

 view all matches for this distribution


Statistics-NiceR

 view release on metacpan or  search on metacpan

lib/Statistics/NiceR/DataConvert/PDL.c.tmpl  view on Meta::CPAN

	datatype = R_to_PDL_type(TYPEOF(r_array)); /* TODO : R_to_PDL_type */

	p = PDL->pdlnew();
	PDL->setdims (p, dims, ndims);  /* set dims */
	p->datatype = datatype;         /* and data type */
	PDL->allocdata (p);             /* allocate the data chunk */

	Safefree(dims);

	switch(datatype) {
{{{

lib/Statistics/NiceR/DataConvert/PDL.c.tmpl  view on Meta::CPAN

	datatype = R_to_PDL_type(TYPEOF(r_vector)); /* TODO : R_to_PDL_type */

	p = PDL->pdlnew();
	PDL->setdims (p, dims, ndims);  /* set dims */
	p->datatype = datatype;         /* and data type */
	PDL->allocdata (p);             /* allocate the data chunk */

	Safefree(dims);

	switch(datatype) {
{{{

 view all matches for this distribution


StorageDisplay

 view release on metacpan or  search on metacpan

lib/StorageDisplay/Collect.pm  view on Meta::CPAN

        _attr_collectors_by_provide => {},
    };

    bless $self, $class;

    foreach my $cdata (@collectors) {
        my $cn = $cdata->{name};
        $cn->new($cdata, $self);
    }
    return $self;
}

sub registerCollectorModule {

lib/StorageDisplay/Collect.pm  view on Meta::CPAN

        my $state = 0;
        my $wwid = {};
        my $guid = {};

        my $data = undef;
        my $secdata = undef;

        my $closure=sub {} ;
        my $subclosure=sub {} ;
        while(defined(my $line=<$dh>)) {
            chomp($line);

lib/StorageDisplay/Collect.pm  view on Meta::CPAN

            } elsif ($line =~ /^IR (Volume) information$/
                     || $line =~ /^Physical (device) information$/) {
                my $section = lc($1).'s';
                $subclosure->($data);
                $closure->($data);
                $secdata=[];
                $subclosure = sub { };
                $closure=sub {
                    my $data = shift;
                    if (exists($l->{$section})) {
                        print STDERR "E: sas2ircu: duplicate section: $line\n";
                    }
                    $l->{$section}=$secdata;
                    return
                };
            } elsif ($line =~ /^IR volume ([^\s])+$/) {
                my $name = $1;
                $subclosure->($data);
                $data = {
                    name => $name,
                };
                $subclosure = sub {
                    my $data = shift;
                    push @$secdata, $data;
                };
            } elsif ($line =~ /^Device is a Hard disk$/) {
                $subclosure->($data);
                $data = {};
                $subclosure = sub {
                    my $data = shift;
                    push @$secdata, $data;
                };
            } elsif ($line =~ /^Initiator at ID .*$/) {
            } elsif ($line =~ /^SAS2IRCU: .* Completed Successfully.$/) {
            } elsif ($line =~ /^[^\s]/) {
                if ($state != 0) {

 view all matches for this distribution


Strehler

 view release on metacpan or  search on metacpan

lib/Strehler/public/strehler/js/jquery.js  view on Meta::CPAN

		},

		// Contents
		"empty": function( elem ) {
			// http://www.w3.org/TR/selectors/#empty-pseudo
			// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
			//   but not by others (comment: 8; processing instruction: 7; etc.)
			// nodeType < 6 works because attributes (2) do not appear as children
			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
				if ( elem.nodeType < 6 ) {
					return false;

 view all matches for this distribution


String-BOM

 view release on metacpan or  search on metacpan

t/00.load.t  view on Meta::CPAN

ok(!defined &strip_bom_from_string, 'does not import ungiven');
ok(!defined &fake, 'doe not import non existant');

#### string tests ####

ok(string_has_bom("\x00\x00\xfe\xff miscdata") eq 'UTF-32','string_has_bom() UTF-32');
ok(string_has_bom("\xff\xfe\x00\x00 miscdata") eq 'UTF-32','string_has_bom() UTF-32');
ok(string_has_bom("\xfe\xff miscdata") eq 'UTF-16','string_has_bom() UTF-16');
ok(string_has_bom("\xff\xfe miscdata") eq 'UTF-16','string_has_bom() UTF-16');
ok(string_has_bom("\xef\xbb\xbf miscdata") eq 'UTF-8','string_has_bom() UTF-8');

ok(!String::BOM::string_has_bom("miscdata\x00\x00\xfe\xff miscdata"),'!string_has_bom() UTF-32 like');
ok(!String::BOM::string_has_bom("miscdata\xff\xfe\x00\x00 miscdata"),'!string_has_bom() UTF-32 like');
ok(!String::BOM::string_has_bom("miscdata\xfe\xff miscdata"),'!string_has_bom() UTF-16 like');
ok(!String::BOM::string_has_bom("miscdata\xff\xfe miscdata"),'!string_has_bom() UTF-16 like');
ok(!String::BOM::string_has_bom("miscdata\xef\xbb\xbf miscdata"),'!string_has_bom() UTF-8 like');

#### file tests  ####

eval "require File::Slurp;";
SKIP: {
    skip 'Please install File::Slurp', 71 if $@;
    my %files = (
        '.bom_UTF-32.1' => "\x00\x00\xfe\xff miscdata",
        '.bom_UTF-32.2' => "\xff\xfe\x00\x00 miscdata",
        '.bom_UTF-16.1' => "\xfe\xff miscdata",
        '.bom_UTF-16.2' => "\xff\xfe miscdata",
        '.bom_UTF-8.1' => "\xef\xbb\xbf miscdata",
    );
    for my $file (sort keys %files) {
        unlink $file, "$file.none";
        # TODO: peter out if -e either
        File::Slurp::write_file($file,$files{$file});  
        File::Slurp::write_file("$file.none","miscdata$files{$file}");  
        # TODO: pwter out if !-e either
        
        my ($name) = $file =~ m{\.bom\_(UTF-[0-9]+)\.[0-9]+};
        ok(String::BOM::file_has_bom($file) eq $name, "file_has_bom() $file");
        ok(!String::BOM::file_has_bom("$file.none"), "!file_has_bom() $file.none");

t/00.load.t  view on Meta::CPAN

        ok(!String::BOM::strip_bom_from_file("$file.open_will_fail"), "!strip_bom_from_file() $file.open_will_fail");
        ok(!String::BOM::file_has_bom($file), "!file_has_bom() after strip $file");
        ok(!String::BOM::file_has_bom("$file.none"), "!file_has_bom() (still) after strip $file.none");
        
        File::Slurp::write_file($file,$files{$file});  
        File::Slurp::write_file("$file.none","miscdata$files{$file}");
        ok(String::BOM::strip_bom_from_file($file,1), "strip_bom_from_file() $file");
        ok(String::BOM::strip_bom_from_file("$file.none",1), "strip_bom_from_file() $file.none");
        ok(-e "$file.bak", ".bak file preserved when requested when changed");
        ok(!-e "$file.none.bak", "there is no .bak to preserve when requested when there is no change");
    }

 view all matches for this distribution


String-Dirify

 view release on metacpan or  search on metacpan

t/general.t  view on Meta::CPAN

my($sd) = String::Dirify -> new();

ok($sd -> dirify("\xc0\xe0\xdf\xff\xd4")     eq 'aassyo', 'Test 2: High ASCII chars');
ok($sd -> dirify('!Q@W#E$R%T^Y')             eq 'qwerty', 'Test 3: Punctuation');
ok($sd -> dirify('<html>html&amp;ok</html>') eq 'htmlok', 'Test 4: HTML');
ok($sd -> dirify('<![CDATA[x]]>')            eq 'cdatax', 'Test 5: CDATA');
ok(String::Dirify -> dirify('not.obj')       eq 'notobj', 'Test 6: Object-free');

 view all matches for this distribution


Svg-Simple

 view release on metacpan or  search on metacpan

lib/Svg/Simple.pm  view on Meta::CPAN

  my @f = (@w, opacity=>1, fill=>'black');

  for my $i(0..$X)                                                              # X lines
   {my $c = $i*$g;
    $svg->line(x1=>$c, x2=>$c, y1=>0, y2=>$y, @w);
    $svg->text(@f, x => $c, y => 0, cdata => $i) unless $i == $X;
   }

  for my $i(0..$Y)                                                              # Y lines
   {my $c = $i*$g;
    $svg->line(y1=>$c, y2=>$c, x1=>0, x2=>$x, @w);
    $svg->text(@f, x => 0, y => $c, cdata => $i) unless $i == $Y;
   }
 }

sub print($%)                                                                   # Print resulting L<svg> string.
 {my ($svg, %options) = @_;                                                     # Svg, svg options

lib/Svg/Simple.pm  view on Meta::CPAN

     %o = (%o, %options);                                                       # Add supplied options

  for my $k(sort keys %o)                                                       # Process each option
   {my $v = $o{$k};
    my $K = $k =~ s(_) (-)r;                                                    # Underscore _ in option names becomes hyphen -
    next if $k =~ m(\Acdata\Z)i;
    push @s, qq($K="$v");
   }

  my $n = $AUTOLOAD =~ s(\A.*::) ()r;                                           # Name of element

lib/Svg/Simple.pm  view on Meta::CPAN

    if ($n =~ m(\Arect\Z)i)
     {$X = max $X, $w + $options{x}+$options{width};
      $Y = max $Y, $w + $options{y}+$options{height};
     }
    if ($n =~ m(\Atext\Z)i)
     {$X = max $X, $options{x} + $w * length($options{cdata});
      $Y = max $Y, $options{y};
     }
    $svg->mX = max $svg->mX, $X;
    $svg->mY = max $svg->mY, $Y;
   };

lib/Svg/Simple.pm  view on Meta::CPAN

  if (defined(my $Z = $options{z}))                                             # Override Z order
   {$svg->z->{$z = $Z}++;
   }

  my $p = join " ", @s;                                                         # Options
  if (defined(my $t = $options{cdata}))
   {push $svg->code->@*, ["<$n $p>$t</$n>", $z]                                 # Internal text
   }
  else
   {push $svg->code->@*, ["<$n $p/>",       $z]                                 # No internal text
   }

lib/Svg/Simple.pm  view on Meta::CPAN

Write L<Scalar Vector Graphics|https://en.wikipedia.org/wiki/Scalable_Vector_Graphics> using Perl syntax as in:

  my $s = Svg::Simple::new();

  $s->text(x=>10, y=>10,
    cdata             =>"Hello World",
    text_anchor       =>"middle",
    alignment_baseline=>"middle",
    font_size         => 3.6,
    font_family       =>"Arial",
    fill              =>"black");

lib/Svg/Simple.pm  view on Meta::CPAN


   {my $s = Svg::Simple::new();  # 𝗘𝘅𝗮𝗺𝗽𝗹𝗲


    $s->text(x=>10, y=>10,
      cdata             =>"Hello World",
      text_anchor       =>"middle",
      alignment_baseline=>"middle",
      font_size         => 3.6,
      font_family       =>"Arial",
      fill              =>"black");

lib/Svg/Simple.pm  view on Meta::CPAN


if (1)                                                                          #Tnew
 {my $s = Svg::Simple::new();

  $s->text(x=>10, y=>10,
    cdata             =>"Hello World",
    text_anchor       =>"middle",
    alignment_baseline=>"middle",
    font_size         => 3.6,
    font_family       =>"Arial",
    fill              =>"black");

 view all matches for this distribution


Syndication-NITF

 view release on metacpan or  search on metacpan

NITF.pm  view on Meta::CPAN


=item *

Return a reference to an array of elements:

  my $identifiedcontentlist = $head->getdocdata->getidentifiedcontentList;

The array can be referenced as @$identifiedcontentlist, or an individual element can be
referenced as $identifiedcontentlist->[N].

=item *

Return the size of a list of elements:

  my $iclcount = $head->getdocdata->getidentifiedcontentCount;

=item *


Get an attribute of an element (as text):

NITF.pm  view on Meta::CPAN

	my ($self, $node) = @_;
	$self->{_singleElements}->{title} = OPTIONAL;
	$self->{_multiElements}->{meta} = ZEROORMORE;
	$self->{_singleElements}->{tobject} = OPTIONAL;
	$self->{_singleElements}->{iim} = OPTIONAL;
	$self->{_singleElements}->{docdata} = OPTIONAL;
	$self->{_multiElements}->{pubdata} = ZEROORMORE;
	$self->{_realname}->{revisionhistory} = "revision-history";
	$self->{_multiElements}->{"revision-history"} = ZEROORMORE;
}

NITF.pm  view on Meta::CPAN

	$self->{_attributes}->{num} = REQUIRED; # IIM field number
	$self->{_attributes}->{value} = IMPLIED; # IIM field value
}

#
# Syndication::NITF::docdata -- Document metadata
#
package Syndication::NITF::docdata;
use Carp;
@ISA = qw( Syndication::NITF::GlobalAttributesNode );

sub _init {
	my ($self, $node) = @_;

 view all matches for this distribution


Syntax-Highlight-Engine-Kate

 view release on metacpan or  search on metacpan

lib/Syntax/Highlight/Engine/Kate/HTML.pm  view on Meta::CPAN

      return 1
   }
   # String => ']]>'
   # attribute => 'CDATA'
   # context => '#pop'
   # endRegion => 'cdata'
   # type => 'StringDetect'
   if ($self->testStringDetect($text, ']]>', 0, 0, 0, undef, 0, '#pop', 'CDATA')) {
      return 1
   }
   # String => ']]&gt;'

lib/Syntax/Highlight/Engine/Kate/HTML.pm  view on Meta::CPAN

   if ($self->testStringDetect($text, '<!--', 0, 0, 0, undef, 0, 'Comment', 'Comment')) {
      return 1
   }
   # String => '<![CDATA['
   # attribute => 'CDATA'
   # beginRegion => 'cdata'
   # context => 'CDATA'
   # type => 'StringDetect'
   if ($self->testStringDetect($text, '<![CDATA[', 0, 0, 0, undef, 0, 'CDATA', 'CDATA')) {
      return 1
   }

 view all matches for this distribution


Syntax-Highlight-Universal

 view release on metacpan or  search on metacpan

colorer/xml/xmldom.h  view on Meta::CPAN


protected:

  const String *data;

  CharacterData(int type, const String *_data): Node(type, new DString("#cdata")), data(_data) {};
  ~CharacterData(){ delete data; };
  friend class Document;
};

/**

 view all matches for this distribution


Syntax-Kamelon

 view release on metacpan or  search on metacpan

lib/Syntax/Kamelon/XML/djangotemplate.xml  view on Meta::CPAN


  <context name="FindHTML" attribute="Normal Text" lineEndContext="#stay">
    <DetectSpaces/>
    <DetectIdentifier/>
    <StringDetect attribute="Comment" context="Comment" String="&lt;!--" beginRegion="comment" />
    <StringDetect attribute="CDATA" context="CDATA" String="&lt;![CDATA[" beginRegion="cdata" />
    <RegExpr attribute="Doctype" context="Doctype" String="&lt;!DOCTYPE\s+" beginRegion="doctype" />
    <RegExpr attribute="Processing Instruction" context="PI" String="&lt;\?[\w:-]*" beginRegion="pi" />
    <RegExpr attribute="Element" context="CSS" String="&lt;style\b" insensitive="true" beginRegion="style" />
    <RegExpr attribute="Element" context="JS" String="&lt;script\b" insensitive="true" beginRegion="script" />
    <RegExpr attribute="Element" context="El Open" String="&lt;pre\b" insensitive="true" beginRegion="pre" />

lib/Syntax/Kamelon/XML/djangotemplate.xml  view on Meta::CPAN

  </context>

  <context name="CDATA" attribute="Normal Text" lineEndContext="#stay">
    <DetectSpaces/>
    <DetectIdentifier/>
    <StringDetect attribute="CDATA" context="#pop" String="]]&gt;" endRegion="cdata" />
    <StringDetect attribute="EntityRef" context="#stay" String="]]&amp;gt;" />
  </context>

  <context name="PI" attribute="Normal Text" lineEndContext="#stay">
    <Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1="&gt;" endRegion="pi" />

 view all matches for this distribution


TAP-Formatter-JUnit

 view release on metacpan or  search on metacpan

lib/TAP/Formatter/JUnit/Session.pm  view on Meta::CPAN


            # create a failure/error element if the test was bogus
            my $failure;
            my $bogosity = $self->_check_for_test_bogosity($result);
            if ($bogosity) {
                my $cdata = $self->_cdata($content);
                my $level = $bogosity->{level};
                $failure  = $xml->$level( {
                    type    => $bogosity->{type},
                    message => $bogosity->{message},
                }, $cdata );
            }

            # add this test to the XML stream
            my $case = $xml->testcase(
                {

lib/TAP/Formatter/JUnit/Session.pm  view on Meta::CPAN

        $die_msg  = "Dubious, test returned $status";
    }

    # add system-out/system-err data, as raw CDATA
    my $sys_out = 'system-out';
    $sys_out = $xml->$sys_out($captured ? $self->_cdata($captured) : undef);

    my $sys_err = 'system-err';
    $sys_err = $xml->$sys_err($die_msg ? $self->_cdata("$die_msg\n") : undef);

    # update the testsuite with aggregate info on this test suite
    #
    # tests     - total number of tests run
    # time      - wallclock time taken for test run (floating point)

lib/TAP/Formatter/JUnit/Session.pm  view on Meta::CPAN

}

###############################################################################
# Creates a CDATA block for the given data (which is made squeaky clean first,
# so that JUnit parsers like Hudson's don't choke).
sub _cdata {
    my ($self, $data) = @_;
    $data = _squeaky_clean($data);
    return $self->xml->xmlcdata($data);
}

###############################################################################
# Clean a string to the point that JUnit can't possibly have a problem with it.
sub _squeaky_clean {

 view all matches for this distribution


TAP-Formatter-JUnitREGRU

 view release on metacpan or  search on metacpan

lib/TAP/Formatter/JUnitREGRU/Session.pm  view on Meta::CPAN


            # create a failure/error element if the test was bogus
            my $failure;
            my $bogosity = $self->_check_for_test_bogosity($result);
            if ($bogosity) {
                my $cdata = $self->_cdata($content);
                my $level = $bogosity->{level};
                $failure  = $xml->$level( {
                    type    => $bogosity->{type},
                    message => $bogosity->{message},
                }, $cdata );
            }

            # add this test to the XML stream
            my $case = $xml->testcase(
                {

lib/TAP/Formatter/JUnitREGRU/Session.pm  view on Meta::CPAN

        $die_msg  = "Dubious, test returned $status";
    }

    # add system-out/system-err data, as raw CDATA
    my $sys_out = 'system-out';
    $sys_out = $xml->$sys_out($captured ? $self->_cdata($captured) : undef);

    my $sys_err = 'system-err';
    $sys_err = $xml->$sys_err($die_msg ? $self->_cdata("$die_msg\n") : undef);

    # update the testsuite with aggregate info on this test suite
    #
    # tests     - total number of tests run
    # time      - wallclock time taken for test run (floating point)

lib/TAP/Formatter/JUnitREGRU/Session.pm  view on Meta::CPAN

}

###############################################################################
# Creates a CDATA block for the given data (which is made squeaky clean first,
# so that JUnit parsers like Hudson's don't choke).
sub _cdata {
    my ($self, $data) = @_;
    $data = _squeaky_clean($data);
    return $self->xml->xmlcdata($data);
}

###############################################################################
# Clean a string to the point that JUnit can't possibly have a problem with it.
sub _squeaky_clean {

 view all matches for this distribution


TM

 view release on metacpan or  search on metacpan

lib/TM/Tau/Filter/Analyze.pm  view on Meta::CPAN


nr_assoc_types (measure)

nr_basename_types (measure)

nr_occdata_types (measure)

nr_occref_types (measure)

nr_scopes (measure)

 view all matches for this distribution


TT2-Play-Area

 view release on metacpan or  search on metacpan

lib/auto/TT2/Play/Area/public/codemirror/mode/tiki/tiki.js  view on Meta::CPAN

    }
    if (err) setStyle = "error";
    return cont(endcloseplugin(err));
  }
  else if (type == "string") {
    if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata");
    if (curState.tokenize == inText) popContext();
    return cont();
  }
  else return cont();
}

 view all matches for this distribution


Tag-Reader-Perl

 view release on metacpan or  search on metacpan

Perl.pm  view on Meta::CPAN

				&& join($EMPTY_STR,
				@{$self->{'data'}}[-2 .. -1])
				eq q{--})

				# CDATA.
				|| ($self->{'tag_type'} =~ /^!\[cdata\[/ms
				&& join($EMPTY_STR,
				@{$self->{'data'}}[-2 .. -1])
				eq ']]')) {

				$self->{'stay'} = 98;

Perl.pm  view on Meta::CPAN


 Tag types are:
 - '[\w:]+' - element name.
 - '/[\w:]+' - end of element name.
 - '!data' - data
 - '![cdata[' - cdata
 - '!--' - comment
 - '?\w+' - instruction
 - '![\w+' - conditional
 - '!attlist' - DTD attlist
 - '!element' - DTD element

 view all matches for this distribution


Tags-Output-Indent

 view release on metacpan or  search on metacpan

Indent.pm  view on Meta::CPAN


	# Attribute delimeter.
	$self->{'attr_delimeter'} = '"';

	# Indent CDATA section.
	$self->{'cdata_indent'} = 0;

	# CDATA callback.
	$self->{'cdata_callback'} = undef;

	# Data callback.
	$self->{'data_callback'} = \&encode_char_entities;

	# Callback to instruction.

Indent.pm  view on Meta::CPAN


	return;
}

# CData.
sub _put_cdata {
	my ($self, @cdata) = @_;

	# Flush tmp code.
	if (scalar @{$self->{'tmp_code'}}) {
		$self->_print_tag('>');
	}

	# Added begin of cdata section.
	unshift @cdata, '<![CDATA[';

	# Check to bad cdata.
	if ((join $EMPTY_STR, @cdata) =~ /]]>$/ms) {
		err 'Bad CDATA section.';
	}

	# Added end of cdata section.
	push @cdata, ']]>';

	# Process data callback.
	$self->_process_callback(\@cdata, 'cdata_callback');

	$self->_newline;
	$self->{'preserve_obj'}->save_previous;

	# TODO Proc tohle nejde volat primo?
	my $tmp = $self->{'indent_block'}->indent(
		\@cdata, $self->{'indent'}->get,
		$self->{'cdata_indent'} == 1 ? 0 : 1,
	);

	# To flush code.
	$self->_flush_code($tmp);

Indent.pm  view on Meta::CPAN

=item * C<auto_flush>

 Auto flush flag.
 Default is 0.

=item * C<cdata_indent>

 Flag, that means indent CDATA section.
 Default value is no-indent (0).

=item * C<cdata_callback>

 Subroutine for output processing of cdata.
 Input argument is reference to array.
 Default value is undef.
 Example is similar as 'data_callback'.

=item * C<data_callback>

 view all matches for this distribution


Tags-Output-LibXML

 view release on metacpan or  search on metacpan

LibXML.pm  view on Meta::CPAN

# Default parameters.
sub _default_parameters {
	my $self = shift;

	# CDATA callback.
	$self->{'cdata_callback'} = undef;

	# Data callback.
	$self->{'data_callback'} = undef;

	# Document encoding.

LibXML.pm  view on Meta::CPAN

	unshift @{$self->{'printed_tags'}}, $begin_node;
	return;
}

# CData.
sub _put_cdata {
	my ($self, @cdata) = @_;
	$self->_process_callback(\@cdata, 'cdata_callback');
	my $cdata = join($EMPTY_STR, @cdata);
	my $cdata_node = $self->{'doc'}->createCDATASection($cdata);
	$self->{'printed_tags'}->[0]->addChild($cdata_node);
	return;
}

# Comment.
sub _put_comment {

LibXML.pm  view on Meta::CPAN


 Constructor.

=over 8

=item * C<cdata_callback>

 Subroutine for output processing of cdata.
 Input argument is reference to array.
 Default value is undef.
 Example is similar as 'data_callback'.

=item * C<data_callback>

 Subroutine for output processing of data, cdata and raw data.
 Input argument is reference to array.
 Default value is undef.

 Example:
 'data_callback' => sub {

 view all matches for this distribution


Tags-Output-PYX

 view release on metacpan or  search on metacpan

PYX.pm  view on Meta::CPAN

	unshift @{$self->{'printed_tags'}}, $tag;
	return;
}

# CData.
sub _put_cdata {
	my ($self, @cdata) = @_;
	$self->_put_data(@cdata);
	return;
}

# Comment.
sub _put_comment {

 view all matches for this distribution


Tags

 view release on metacpan or  search on metacpan

Tags.pm  view on Meta::CPAN


 Data:
 a - $attr, $value
 b - $element
 c - @comment
 cd - @cdata
 d - @data
 e - $element
 i - $target, $code
 r - @raw_data

 view all matches for this distribution


( run in 0.476 second using v1.01-cache-2.11-cpan-454fe037f31 )