Result:
found more than 415 distributions - search limited to the first 2001 files matching your query ( run in 0.963 )


CPU-Z80-Assembler

 view release on metacpan or  search on metacpan

lib/CPU/Z80/Assembler.pm  view on Meta::CPAN

The list is passed to C<z80lexer>, that in turn calls C<z80preprocessor> to 
handle file includes, and then splits the input into tokens.

The stream of tokens is passed on to L<CPU:Z80::Assembler::Parser|CPU:Z80::Assembler::Parser> that parses the 
input and generates the object image in L<CPU::Z80::Assembler::Program|CPU::Z80::Assembler::Program>. 
Assembly macro expansion is handled at this stage by L<CPU::Z80::Assembler::Macro|CPU::Z80::Assembler::Macro>.

The assembly program is composed by a list of L<CPU::Z80::Assembler::Segment|CPU::Z80::Assembler::Segment>, each 
representing one named section of code. Each segment is composed by a list of L<CPU::Z80::Assembler::Opcode|CPU::Z80::Assembler::Opcode>, each representing one assembly instruction.

The output object code is returned as a string.

lib/CPU/Z80/Assembler.pm  view on Meta::CPAN


=head3 include

Recursively include another file at the current source file.

=head2 Macros

Macros are supported. See L<CPU::Z80::Assembler::Macro|CPU::Z80::Assembler::Macro> for details.

=head1 BUGS and FEEDBACK

We welcome feedback about our code, including constructive criticism.
Bug reports should be made using L<http://rt.cpan.org/>.

=head1 SEE ALSO

L<CPU::Z80::Assembler::Macro|CPU::Z80::Assembler::Macro>
L<CPU::Z80::Assembler::Parser|CPU::Z80::Assembler::Parser>
L<CPU::Emulator::Z80|CPU::Emulator::Z80>

=head1 AUTHORS, COPYRIGHT and LICENCE

 view all matches for this distribution


CSAF

 view release on metacpan or  search on metacpan

lib/CSAF/Util/CWE.pm  view on Meta::CPAN

    'CWE-147' => q"Improper Neutralization of Input Terminators",
    'CWE-148' => q"Improper Neutralization of Input Leaders",
    'CWE-149' => q"Improper Neutralization of Quoting Syntax",
    'CWE-150' => q"Improper Neutralization of Escape, Meta, or Control Sequences",
    'CWE-151' => q"Improper Neutralization of Comment Delimiters",
    'CWE-152' => q"Improper Neutralization of Macro Symbols",
    'CWE-153' => q"Improper Neutralization of Substitution Characters",
    'CWE-154' => q"Improper Neutralization of Variable Name Delimiters",
    'CWE-155' => q"Improper Neutralization of Wildcards or Matching Symbols",
    'CWE-156' => q"Improper Neutralization of Whitespace",
    'CWE-157' => q"Failure to Sanitize Paired Delimiters",

 view all matches for this distribution


CSS-Sass

 view release on metacpan or  search on metacpan

libsass/win/libsass.vcxproj  view on Meta::CPAN

    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <TargetName>sassc</TargetName>
    <OutDir>$(SolutionDir)bin\Debug\</OutDir>
    <IntDir>$(SolutionDir)bin\Debug\obj\</IntDir>

 view all matches for this distribution


CVSS

 view release on metacpan or  search on metacpan

lib/CVSS/v4.pm  view on Meta::CPAN

        && !($self->M('AV') eq 'N' && $self->M('PR') eq 'N' && $self->M('UI') eq 'N')
        && !($self->M('AV') eq 'P'));

    $eq1 = 2 if ($self->M('AV') eq 'P' || !($self->M('AV') eq 'N' || $self->M('PR') eq 'N' || $self->M('UI') eq 'N'));

    DEBUG and say STDERR "-- MacroVector - EQ1 : $eq1";


    # EQ2 (Table 25)

    # Levels    Constraints

lib/CVSS/v4.pm  view on Meta::CPAN

    # 1         not (AC:L and AT:N)

    $eq2 = 0 if ($self->M('AC') eq 'L' && $self->M('AT') eq 'N');
    $eq2 = 1 if (!($self->M('AC') eq 'L' && $self->M('AT') eq 'N'));

    DEBUG and say STDERR "-- MacroVector - EQ2 : $eq2";

    # EQ3 (Table 26)
    # Levels    Constraints
    # 0         VC:H and VI:H
    # 1         not (VC:H and VI:H) and (VC:H or VI:H or VA:H)

lib/CVSS/v4.pm  view on Meta::CPAN

        if (!($self->M('VC') eq 'H' && $self->M('VI') eq 'H')
        && ($self->M('VC') eq 'H' || $self->M('VI') eq 'H' || $self->M('VA') eq 'H'));

    $eq3 = 2 if (!($self->M('VC') eq 'H' || $self->M('VI') eq 'H' || $self->M('VA') eq 'H'));

    DEBUG and say STDERR "-- MacroVector - EQ3 : $eq3";


    # EQ4 (Table 27)
    # Levels    Constraints
    # 0         MSI:S or MSA:S

lib/CVSS/v4.pm  view on Meta::CPAN


    $eq4 = 2
        if (!($self->M('MSI') eq 'S' || $self->M('MSA') eq 'S')
        && !(($self->M('SC') eq 'H' || $self->M('SI') eq 'H' || $self->M('SA') eq 'H')));

    DEBUG and say STDERR "-- MacroVector - EQ4 : $eq4";

    # EQ5 (Table 28)

    # Levels    Constraints
    # 0         E:A

lib/CVSS/v4.pm  view on Meta::CPAN


    $eq5 = 0 if ($self->M('E') eq 'A');
    $eq5 = 1 if ($self->M('E') eq 'P');
    $eq5 = 2 if ($self->M('E') eq 'U');

    DEBUG and say STDERR "-- MacroVector - EQ5 : $eq5";

    # EQ6 (Table 29)

    # Levels    Constraints
    # 0         (CR:H and VC:H) or (IR:H and VI:H) or (AR:H and VA:H)

lib/CVSS/v4.pm  view on Meta::CPAN

    $eq6 = 1
        if (!($self->M('CR') eq 'H' && $self->M('VC') eq 'H')
        && !($self->M('IR') eq 'H' && $self->M('VI') eq 'H')
        && !($self->M('AR') eq 'H' && $self->M('VA') eq 'H'));

    DEBUG and say STDERR "-- MacroVector - EQ6 : $eq6";

    my @macro_vector = ($eq1, $eq2, $eq3, $eq4, $eq5, $eq6);
    my $macro_vector = join '', @macro_vector;

    DEBUG and say STDERR "-- MacroVector : $macro_vector";

    my $SEVERITY = {0 => 'HIGH', 1 => 'MEDIUM', 2 => 'LOW'};

    $self->{exploitability} = $SEVERITY->{$eq1};
    DEBUG and say STDERR "-- MacroVector EQ1 - Exploitability : $self->{exploitability}";

    $self->{complexity} = $SEVERITY->{$eq2};
    DEBUG and say STDERR "-- MacroVector EQ2 - Complexity : $self->{complexity}";

    $self->{vulnerable_system} = $SEVERITY->{$eq3};
    DEBUG and say STDERR "-- MacroVector EQ3 - Vulnerable System : $self->{vulnerable_system}";

    $self->{subsequent_system} = $SEVERITY->{$eq4};
    DEBUG and say STDERR "-- MacroVector EQ4 - Subsequent System : $self->{subsequent_system}";

    $self->{exploitation} = $SEVERITY->{$eq5};
    DEBUG and say STDERR "-- MacroVector EQ5 - Exploitation : $self->{exploitation}";

    $self->{security_requirements} = $SEVERITY->{$eq6};
    DEBUG and say STDERR "-- MacroVector EQ6 - Security Requirements : $self->{security_requirements}";

    return wantarray ? @macro_vector : "$macro_vector";

}

lib/CVSS/v4.pm  view on Meta::CPAN

    $self->metrics->{U}  //= 'X';


    # The following defines the index of each metric's values.
    # It is used when looking for the highest vector part of the
    # combinations produced by the MacroVector respective highest vectors.
    my $AV_levels = {N => 0.0, A => 0.1, L => 0.2, P => 0.3};
    my $PR_levels = {N => 0.0, L => 0.1, H => 0.2};
    my $UI_levels = {N => 0.0, P => 0.1, A => 0.2};

    my $AC_levels = {L => 0.0, H => 0.1};

lib/CVSS/v4.pm  view on Meta::CPAN


    my $score_eq4_next_lower_macro = $CVSS_LOOKUP_GLOBAL->{$eq4_next_lower_macro} || 'NaN';
    my $score_eq5_next_lower_macro = $CVSS_LOOKUP_GLOBAL->{$eq5_next_lower_macro} || 'NaN';

    #   b. The severity distance of the to-be scored vector from a
    #      highest severity vector in the same MacroVector is determined.
    my $eq1_maxes     = $MAX_COMPOSED->{eq1}->{$eq1};
    my $eq2_maxes     = $MAX_COMPOSED->{eq2}->{$eq2};
    my $eq3_eq6_maxes = $MAX_COMPOSED->{eq3}->{$eq3}->{$eq6};
    my $eq4_maxes     = $MAX_COMPOSED->{eq4}->{$eq4};
    my $eq5_maxes     = $MAX_COMPOSED->{eq5}->{$eq5};

lib/CVSS/v4.pm  view on Meta::CPAN

    my $max_severity_eq4    = $MAX_SEVERITY->{eq4}->{$eq4} * $step;


    #   c. The proportion of the distance is determined by dividing
    #      the severity distance of the to-be-scored vector by the depth
    #      of the MacroVector.
    #   d. The maximal scoring difference is multiplied by the proportion of
    #      distance.

    my $n_existing_lower = 0;

lib/CVSS/v4.pm  view on Meta::CPAN


    # /

    DEBUG and say STDERR "-- Value: $value - MeanDistance: $mean_distance";

    # 3. The score of the vector is the score of the MacroVector
    #    (i.e. the score of the highest severity vector) minus the mean
    #    distance so computed. This score is rounded to one decimal place.
    $value -= $mean_distance;

    DEBUG and say STDERR "-- Value $value";

 view all matches for this distribution


Cache-FastMmap

 view release on metacpan or  search on metacpan

mmap_cache_internals.h  view on Meta::CPAN

  MU32         p_cur;
  MU32 *       slot_ptr;
  MU32 *       slot_ptr_end;
};

/* Macros to access page entries */
#define PP(p) ((MU32 *)p)

#define P_Magic(p) (*(PP(p)+0))
#define P_NumSlots(p) (*(PP(p)+1))
#define P_FreeSlots(p) (*(PP(p)+2))

mmap_cache_internals.h  view on Meta::CPAN

#define P_NReads(p) (*(PP(p)+6))
#define P_NReadHits(p) (*(PP(p)+7))

#define P_HEADERSIZE 32

/* Macros to access cache slot entries */
#define SP(s) ((MU32 *)s)

/* Offset pointer 'p' by 'o' bytes */
#define PTR_ADD(p,o) ((void *)((char *)p + o))

 view all matches for this distribution


Catalyst-View-Text-MicroTemplate-PerRequest

 view release on metacpan or  search on metacpan

lib/Catalyst/View/Text/MicroTemplate/PerRequest.pm  view on Meta::CPAN

Default value for L</template_factory>.  Useful if you want a global override for
this.

=head2 macros

See L<https://metacpan.org/pod/Text::MicroTemplate::Extended#Macro>

=head2 mt

This is the L<Text::MicroTemplate::Extended> object.  You probably want to leave this
alone but you can set it as you wish as long as you provide a compatible interface.

 view all matches for this distribution


Cfn

 view release on metacpan or  search on metacpan

lib/Cfn/Resource/AWS/CloudFormation/Macro.pm  view on Meta::CPAN

# AWS::CloudFormation::Macro generated from spec 14.3.0
use Moose::Util::TypeConstraints;

coerce 'Cfn::Resource::Properties::AWS::CloudFormation::Macro',
  from 'HashRef',
   via { Cfn::Resource::Properties::AWS::CloudFormation::Macro->new( %$_ ) };

package Cfn::Resource::AWS::CloudFormation::Macro {
  use Moose;
  extends 'Cfn::Resource';
  has Properties => (isa => 'Cfn::Resource::Properties::AWS::CloudFormation::Macro', is => 'rw', coerce => 1);
  
  sub AttributeList {
    [  ]
  }
  sub supported_regions {

lib/Cfn/Resource/AWS/CloudFormation/Macro.pm  view on Meta::CPAN

  }
}



package Cfn::Resource::Properties::AWS::CloudFormation::Macro {
  use Moose;
  use MooseX::StrictConstructor;
  extends 'Cfn::Resource::Properties';
  
  has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');

lib/Cfn/Resource/AWS/CloudFormation/Macro.pm  view on Meta::CPAN


=encoding UTF-8

=head1 NAME

Cfn::Resource::AWS::CloudFormation::Macro - Cfn resource for AWS::CloudFormation::Macro

=head1 DESCRIPTION

This module implements a Perl module that represents the CloudFormation object AWS::CloudFormation::Macro.

See L<Cfn> for more information on how to use it.

=head1 AUTHOR

 view all matches for this distribution


Chemistry-File-PDB

 view release on metacpan or  search on metacpan

PDB.pm  view on Meta::CPAN


our $VERSION = '0.23';
# $Id: PDB.pm,v 1.13 2009/05/10 21:57:32 itubert Exp $

use base qw(Chemistry::File);
use Chemistry::MacroMol;
use Chemistry::Domain;
use Scalar::Util qw(weaken);
use Carp;
use strict;
use warnings;

PDB.pm  view on Meta::CPAN

=head1 SYNOPSIS

    use Chemistry::File::PDB;

    # read a PDB file
    my $macro_mol = Chemistry::MacroMol->read("myfile.pdb");

    # write a PDB file
    $macro_mol->write("out.pdb");

    # read all models in a multi-model file
    my @mols = Chemistry::MacroMol->read("models.pdb");

    # read one model at a time
    my $file = Chemistry::MacroMol->file("models.pdb");
    $file->open;
    while (my $mol = $file->read_mol($file->fh)) {
        # do something with $mol
    }

PDB.pm  view on Meta::CPAN

This module automatically registers the 'pdb' format with Chemistry::Mol,
so that PDB files may be identified and read by Chemistry::Mol->read(). For 
autodetection purpuses, it assumes that files ending in .pdb or having 
a line matching /^(ATOM  |HETATM)/ are PDB files.

The PDB reader and writer is designed for dealing with Chemistry::MacroMol
objects, but it can also create and use Chemistry::Mol objects by throwing some
information away.

=head2 Properties

PDB.pm  view on Meta::CPAN

sub read_mol {
    my ($self, $fh, %options) = @_;
    return if $fh->eof;

    my $domain;
    my $mol_class = $options{mol_class} || "Chemistry::MacroMol";
    my $mol = $mol_class->new;
    my $is_macro = $mol->isa('Chemistry::MacroMol');
    $domain = $mol unless $is_macro;

    local $_;
    my $curr_residue = 0;
    while (<$fh>) {

PDB.pm  view on Meta::CPAN

sub write_string {
    my ($class, $mol, %opts) = @_;
    my $ret = '';
    $ret .= 'TITLE     ' . $mol->name . "\n" if defined $mol->name;
    $ret .= 'REMARK    Generated by ' . __PACKAGE__ . " version $VERSION\n";
    if ($mol->isa("Chemistry::MacroMol")) {
        my $i = 1;
        my $j = 1;
        for my $res ($mol->domains) {
            my $seq_n = $res->attr("pdb/sequence_number");
            $seq_n = $j++ unless defined $seq_n;

PDB.pm  view on Meta::CPAN


0.23

=head1 SEE ALSO

L<Chemistry::MacroMol>, L<Chemistry::Mol>, L<Chemistry::File>,
L<http://www.perlmol.org/>.

The PDB format description at 
L<http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html>

 view all matches for this distribution


Chemistry-File-SLN

 view release on metacpan or  search on metacpan

lib/Chemistry/File/SLN.pm  view on Meta::CPAN

simple structures and some attributes, but it does not support any of the
following:

=over

=item Macro atoms

=item Pattern matching options

=item Markush structures

 view all matches for this distribution


Chemistry-FormulaPattern

 view release on metacpan or  search on metacpan

lib/Chemistry/File/FormulaPattern.pm  view on Meta::CPAN

0.10

=head1 SEE ALSO

L<Chemistry::Pattern>, L<Chemistry::File>, L<Chemistry::Mol>,
L<Chemistry::MacroMol>, L<mok>.

The PerlMol website L<http://www.perlmol.org/>

=head1 AUTHOR

 view all matches for this distribution


Chemistry-Harmonia

 view release on metacpan or  search on metacpan

lib/Chemistry/Harmonia.pm  view on Meta::CPAN

	my $frm = $idb->[$j];
	my $os = $idb->[$j+1];

	my %a = split /_|=/,$os; # Parse to element end OSE

	if($os =~ /~/){ # Macro-substitutions

	    my %ek;
	    my $max_n_ek = 0; # max number of element-pattern in macro-substitutions

	    while( my($e, $v) = each %a ){

 view all matches for this distribution


Chemistry-MacroMol

 view release on metacpan or  search on metacpan

Domain.pm  view on Meta::CPAN


0.06

=head1 SEE ALSO

L<Chemistry::MacroMol>, L<Chemistry::Mol>, L<Chemistry::Atom>, 
L<Chemistry::Bond>

=head1 AUTHOR

Ivan Tubert, E<lt>itub@cpan.orgE<gt>

 view all matches for this distribution


Chemistry-MidasPattern

 view release on metacpan or  search on metacpan

lib/Chemistry/File/MidasPattern.pm  view on Meta::CPAN


    use Chemistry::File::MidasPattern;
    use Chemistry::File::PDB;

    # read a molecule
    my $mol = Chemistry::MacroMol->read("test.pdb");

    # define a pattern matching carbons alpha and beta
    # in all valine residues
    my $str  = ':VAL@CA,CB';
    my $patt = Chemistry::MidasPattern->parse($str, format => 'midas');

lib/Chemistry/File/MidasPattern.pm  view on Meta::CPAN

0.11

=head1 SEE ALSO

L<Chemistry::MidasPattern>, L<Chemistry::File>, L<Chemistry::Mol>,
L<Chemistry::MacroMol>, L<mok>.

The PerlMol website L<http://www.perlmol.org/>

=head1 AUTHOR

 view all matches for this distribution


Chemistry-Mol

 view release on metacpan or  search on metacpan

Tutorial.pod  view on Meta::CPAN

applications you may want to extend the features of the main Chemistry::Mol
class. There are several subclasses of Chemistry::Mol available already:

=over

=item L<Chemistry::MacroMol>

Used for macromolecules.

=item L<Chemistry::Pattern>

Tutorial.pod  view on Meta::CPAN

=back

As an example we'll discuss macromolecules. Future versions of this tutorial
may also include a discussion about patterns and rings.

=head1 Macromolecules

So far we have assumed that we are dealing with molecules of the
L<Chemistry::Mol> class.  However, one of the interesting things about
object-oriented programming is that classes can be extended. For dealing with
macromolecules, we have the MacroMol class, which extends the L<Chemistry::Mol>
class. This means that in practice you can use a L<Chemistry::MacroMol> object
exactly as you would use a L<Chemistry::Mol> object, but with some added
functionality. In fact, the PDB reader can return L<Chemistry::MacroMol>
instead of L<Chemistry::Mol> objects just by changing the first example like
this:

    use Chemistry::MacroMol;
    use Chemistry::File::PDB;
    my $macromol = Chemistry::MacroMol->read("test.pdb");

Now the question is, what is the "added functionality" that MacroMol objects
have on top of the original Chemistry::Mol object?

=head2 The MacroMol object

For the purposes of this module, a macromolecule is considered to be a big
molecule where atoms are divided in I<Domains>. A domain is just a subset of
the atoms in the molecule; in a protein, a domain would be just a residue.

Tutorial.pod  view on Meta::CPAN

L<https://github.com/perlmol/Chemistry-Mol>

=head1 SEE ALSO

L<Chemistry::Mol>, L<Chemistry::Atom>, L<Chemistry::Bond>, L<Chemistry::File>,
L<Chemistry::MacroMol>, L<Chemistry::Domain>.

=head1 AUTHOR

Ivan Tubert-Brohman E<lt>itub@cpan.orgE<gt>

 view all matches for this distribution


Chemistry-MolecularMass

 view release on metacpan or  search on metacpan

MolecularMass/MolecularMass.pm  view on Meta::CPAN

   change the values of old macros. A hash of all macros and a hash
   of all elements can be returned.

   Arbitrary element names can be added, they are expected, however, to
   start with an upper case letter followed by zero or more lower case
   letters. Macros can be any string of characters. Macros are substituted
   only once, so a macro should not evaluate to another macro. Legal
   characters in a formula are: A-Za-z0-9<>{}[]()
   Spaces are not allowed. Parentheses can be nested arbitrarily deep.

   Each MolecularMass object has its own hashes of macros and element 

 view all matches for this distribution


Chemistry-OpenBabel

 view release on metacpan or  search on metacpan

openbabel_perl.cpp  view on Meta::CPAN


#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL

/* SWIG Perl macros */

/* Macro to call an XS function */
#ifdef PERL_OBJECT 
#  define SWIG_CALLXS(_name) _name(cv,pPerl) 
#else 
#  ifndef MULTIPLICITY 
#    define SWIG_CALLXS(_name) _name(cv) 

openbabel_perl.cpp  view on Meta::CPAN

  }
  return SWIG_OK;
}


/* Macros for low-level exception handling */
#define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }


typedef XS(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;

 view all matches for this distribution


Chess-Plisco

 view release on metacpan or  search on metacpan

lib/Chess/Plisco.pm  view on Meta::CPAN

# ABSTRACT: Representation of a chess position with move generator, legality checker etc.

# Welcome to the world of spaghetti code!  It is deliberately ugly because
# trying to avoid function/method call overhead is one of the major goals.
# In the future it may make sense to try to make the code more readable by
# more extensive use of Chess::Plisco::Macro.

package Chess::Plisco;
$Chess::Plisco::VERSION = '0.4';
use strict;
use integer;

lib/Chess/Plisco.pm  view on Meta::CPAN


use Locale::TextDomain qw('Chess-Plisco');
use Scalar::Util qw(reftype);
use Config;

# Macros from Chess::Plisco::Macro are already expanded here!

use base qw(Exporter);

# Colors.
use constant CP_WHITE => 0;

 view all matches for this distribution


Class-CompiledC

 view release on metacpan or  search on metacpan

lib/Class/CompiledC.pm  view on Meta::CPAN

sub __baseref($$);
sub __hashref($);
sub __arrayref($);
sub __coderef($);
sub __fetchSymbolName($);
sub __promoteFieldTypeToMacro($);
sub __parseFieldType;


$re_ft     = qr/^(?:\s*)(int|float|number|string|ref|arrayref|hashref|
                         coderef|object|regexpref|any|uint)(?:\s*)/xi;

lib/Class/CompiledC.pm  view on Meta::CPAN

        __baseref $symbol, 'GLOB' or croak 'not a GLOB reference';

        return *$symbol{NAME};
}

=head3 __promoteFieldTypeToMacro

  __promoteFieldTypeToMacro FIELDTYPE
  Type: Subroutine.
  Export: on request.
  Prototype: none

Takes a fieldtype specfication, and returns a C<C> macro for doing the test.
Does not handle parametric types like C<isa>. See C<__parseFieldType> for that.

=cut

sub __promoteFieldTypeToMacro($)
{
        my $type = shift;

        return '' unless ($type);
        return '' if     ($type =~ /^any$/i);

lib/Class/CompiledC.pm  view on Meta::CPAN

  Type: Subroutine.
  Export: on request.
  Prototype: none

Takes a fieldtype specfication, and returns a C<C> macro for doing the test.
Handles all field types. Delegates most work to the C<__promoteFieldTypeToMacro>
subroutine.

=cut

sub __parseFieldType
{
      local $_ = shift;

      if (/$re_ft/)
      {
             # warn sprintf "yeah %s !", __promoteFieldTypeToMacro $1;
              return __promoteFieldTypeToMacro($1);
      }
      elsif (/$re_ft_isa/)
      {
              croak "fail0r: isa type needs a classname argument\n" unless $1;
              return '__CHECK(__ISA(__ARG0, '."\"$1\"), \"__ISA\")";

lib/Class/CompiledC.pm  view on Meta::CPAN


BEGIN
{
        $EXPORT_TAGS{ref}    = [qw/__arrayref  __coderef __hashref/];
        $EXPORT_TAGS{misc}   = [qw/__fetchSymbolName __baseref __circumPrint/];
        $EXPORT_TAGS{field}  = [qw/__parseFieldType __promoteFieldTypeToMacro/];
        $EXPORT_TAGS{intern} = [qw/__include/];
        $EXPORT_TAGS{all}    = [map {@{$_}} values %EXPORT_TAGS ];
}

=head2 Exportable Symbols

lib/Class/CompiledC.pm  view on Meta::CPAN


=item C<__circumPrint>

=item C<__parseFieldType>

=item C<__promoteFieldTypeToMacro>

=back

=cut

lib/Class/CompiledC.pm  view on Meta::CPAN

     fixed some serious bugs concerning refcounts of non ref values
     fixed (?:Array|Code|Hash)ref type checking code
2.19 Sun Oct 22 19:52:04 CEST 2006 @786 /Internet Time/
     relocated field type parsing into __genBaseCode in anticipation to support
       introspection
     refactored __promoteFieldTypeToMacro sub
     adapted __addParentFields to emit only valid field types
     added inspect method, it returns a hashref with fieldnames as keys and
      field types as values. (you may change that hash but don't expect any
      changes to persist, or even to propagate back and change the class on the
      fly, we are not at this point, and we're not going into this directon)

 view all matches for this distribution


Class-XSAccessor

 view release on metacpan or  search on metacpan

cxsa_main.h  view on Meta::CPAN

};

autoxs_hashkey * get_hashkey(pTHX_ const char* key, const I32 len);
I32 get_internal_array_index(I32 object_ary_idx);

/* Macro to encapsulate fetching of a hashkey struct pointer for the actual
 * XSUBs */
#define CXAH_GET_HASHKEY ((autoxs_hashkey *) XSANY.any_ptr)


/*************************

 view all matches for this distribution


CljPerl

 view release on metacpan or  search on metacpan

lib/CljPerl.pm  view on Meta::CPAN

 * Maps :

	{:key1 value1 :key2 value2 "key3" value3}


=head4 Macro charaters

 * Quote (') :

	'(foo bar)

 view all matches for this distribution


Clownfish-CFC

 view release on metacpan or  search on metacpan

charmonizer.c  view on Meta::CPAN




/***************************************************************************/

#line 21 "src/Charmonizer/Probe/FuncMacro.h"
/* Charmonizer/Probe/FuncMacro.h
 */

#ifndef H_CHAZ_FUNC_MACRO
#define H_CHAZ_FUNC_MACRO

#include <stdio.h>

/* Run the FuncMacro module.
 *
 * If __func__ successfully resolves, this will be defined:
 *
 * HAS_ISO_FUNC_MACRO
 *

charmonizer.c  view on Meta::CPAN

 * following macro will be defined to "inline", otherwise it will be defined
 * to nothing.
 *
 * INLINE
 */
void chaz_FuncMacro_run(void);

#endif /* H_CHAZ_FUNC_MACRO */



charmonizer.c  view on Meta::CPAN




/***************************************************************************/

#line 21 "src/Charmonizer/Probe/VariadicMacros.h"
/* Charmonizer/Probe/VariadicMacros.h
 */

#ifndef H_CHAZ_VARIADIC_MACROS
#define H_CHAZ_VARIADIC_MACROS

#include <stdio.h>

/* Run the VariadicMacros module.
 *
 * If your compiler supports ISO-style variadic macros, this will be defined:
 *
 * HAS_ISO_VARIADIC_MACROS
 *

charmonizer.c  view on Meta::CPAN

 *
 * If you have at least one of the above, this will be defined:
 *
 * HAS_VARIADIC_MACROS
 */
void chaz_VariadicMacros_run(void);

#endif /* H_CHAZ_VARIADIC_MACROS */



charmonizer.c  view on Meta::CPAN




/***************************************************************************/

#line 17 "src/Charmonizer/Probe/FuncMacro.c"
/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Probe/FuncMacro.h" */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>

/* Probe for ISO func macro. */
static int
chaz_FuncMacro_probe_iso() {
    static const char iso_func_code[] =
        CHAZ_QUOTE(  #include <stdio.h>                )
        CHAZ_QUOTE(  int main() {                      )
        CHAZ_QUOTE(      printf("%s", __func__);       )
        CHAZ_QUOTE(      return 0;                     )

charmonizer.c  view on Meta::CPAN


    return success;
}

static int
chaz_FuncMacro_probe_gnu() {
    /* Code for verifying GNU func macro. */
    static const char gnu_func_code[] =
        CHAZ_QUOTE(  #include <stdio.h>                )
        CHAZ_QUOTE(  int main() {                      )
        CHAZ_QUOTE(      printf("%s", __FUNCTION__);   )

charmonizer.c  view on Meta::CPAN

    return success;
}

/* Attempt to verify inline keyword. */
static char*
chaz_FuncMacro_try_inline(const char *keyword, size_t *output_len) {
    static const char inline_code[] =
        CHAZ_QUOTE(  #include <stdio.h>                )
        CHAZ_QUOTE(  static %s int foo() { return 1; } )
        CHAZ_QUOTE(  int main() {                      )
        CHAZ_QUOTE(      printf("%%d", foo());         )

charmonizer.c  view on Meta::CPAN

    sprintf(code, inline_code, keyword);
    return chaz_CC_capture_output(code, output_len);
}

static void
chaz_FuncMacro_probe_inline(void) {
    static const char* inline_options[] = {
        "__inline",
        "__inline__",
        "inline"
    };

charmonizer.c  view on Meta::CPAN

    int i;

    for (i = 0; i < num_inline_options; i++) {
        const char *inline_option = inline_options[i];
        size_t output_len;
        char *output = chaz_FuncMacro_try_inline(inline_option, &output_len);
        if (output != NULL) {
            has_inline = true;
            chaz_ConfWriter_add_def("INLINE", inline_option);
            free(output);
            break;

charmonizer.c  view on Meta::CPAN

        chaz_ConfWriter_add_def("INLINE", NULL);
    }
}

void
chaz_FuncMacro_run(void) {
    int has_funcmac      = false;
    int has_iso_funcmac  = false;
    int has_gnuc_funcmac = false;

    chaz_ConfWriter_start_module("FuncMacro");

    /* Check for func macros. */
    if (chaz_FuncMacro_probe_iso()) {
        has_funcmac     = true;
        has_iso_funcmac = true;
    }
    if (chaz_FuncMacro_probe_gnu()) {
        has_funcmac      = true;
        has_gnuc_funcmac = true;
    }

    /* Write out common defines. */

charmonizer.c  view on Meta::CPAN

    if (has_gnuc_funcmac) {
        chaz_ConfWriter_add_def("HAS_GNUC_FUNC_MACRO", NULL);
    }

    /* Check for inline keyword. */
    chaz_FuncMacro_probe_inline();

    chaz_ConfWriter_end_module();
}


charmonizer.c  view on Meta::CPAN




/***************************************************************************/

#line 17 "src/Charmonizer/Probe/VariadicMacros.c"
/* #include "Charmonizer/Core/Compiler.h" */
/* #include "Charmonizer/Core/ConfWriter.h" */
/* #include "Charmonizer/Core/Util.h" */
/* #include "Charmonizer/Probe/VariadicMacros.h" */
#include <string.h>
#include <stdio.h>
#include <stdlib.h>


/* Code for verifying ISO-style variadic macros. */
static const char chaz_VariadicMacros_iso_code[] =
    CHAZ_QUOTE(  #include <stdio.h>                                    )
    CHAZ_QUOTE(  #define ISO_TEST(fmt, ...) \\                         )
    "                printf(fmt, __VA_ARGS__)                        \n"
    CHAZ_QUOTE(  int main() {                                          )
    CHAZ_QUOTE(      ISO_TEST("%d %d", 1, 1);                          )
    CHAZ_QUOTE(      return 0;                                         )
    CHAZ_QUOTE(  }                                                     );

/* Code for verifying GNU-style variadic macros. */
static const char chaz_VariadicMacros_gnuc_code[] =
    CHAZ_QUOTE(  #include <stdio.h>                                    )
    CHAZ_QUOTE(  #define GNU_TEST(fmt, args...) printf(fmt, ##args)    )
    CHAZ_QUOTE(  int main() {                                          )
    CHAZ_QUOTE(      GNU_TEST("%d %d", 1, 1);                          )
    CHAZ_QUOTE(      return 0;                                         )
    CHAZ_QUOTE(  }                                                     );

void
chaz_VariadicMacros_run(void) {
    char *output;
    size_t output_len;
    int has_varmacros = false;

    chaz_ConfWriter_start_module("VariadicMacros");

    /* Test for ISO-style variadic macros. */
    output = chaz_CC_capture_output(chaz_VariadicMacros_iso_code, &output_len);
    if (output != NULL) {
        has_varmacros = true;
        chaz_ConfWriter_add_def("HAS_VARIADIC_MACROS", NULL);
        chaz_ConfWriter_add_def("HAS_ISO_VARIADIC_MACROS", NULL);
        free(output);
    }

    /* Test for GNU-style variadic macros. */
    output = chaz_CC_capture_output(chaz_VariadicMacros_gnuc_code, &output_len);
    if (output != NULL) {
        if (has_varmacros == false) {
            has_varmacros = true;
            chaz_ConfWriter_add_def("HAS_VARIADIC_MACROS", NULL);
        }

charmonizer.c  view on Meta::CPAN


    /* Run probe modules. */
    chaz_BuildEnv_run();
    chaz_DirManip_run();
    chaz_Headers_run();
    chaz_FuncMacro_run();
    chaz_Booleans_run();
    chaz_Integers_run();
    chaz_Strings_run();
    chaz_Memory_run();
    chaz_SymbolVisibility_run();
    chaz_UnusedVars_run();
    chaz_VariadicMacros_run();

    if (chaz_CLI_defined(cli, "enable-makefile")) {
        S_write_makefile(cli);
    }

 view all matches for this distribution


Clownfish

 view release on metacpan or  search on metacpan

cfcore/Clownfish/Err.cfh  view on Meta::CPAN


#define CFISH_RETHROW(_error) \
    cfish_Err_rethrow((cfish_Err*)_error, __FILE__, __LINE__, \
                      CFISH_ERR_FUNC_MACRO)

/** Macro version of cfish_Err_throw_at which inserts contextual information
 * automatically, provided that the compiler supports the necessary features.
 */
#ifdef CFISH_HAS_VARIADIC_MACROS
 #ifdef CFISH_HAS_ISO_VARIADIC_MACROS
  #define CFISH_THROW(_class, ...) \

 view all matches for this distribution


Comedi-Lib

 view release on metacpan or  search on metacpan

t/04-macros.t  view on Meta::CPAN

use warnings;
use strict;

use Comedi::Lib;

# (Pseudo)-Macros
my @macros = qw(
   CR_PACK
   CR_PACK_FLAGS
   CR_CHAN
   CR_RANGE

 view all matches for this distribution


Compress-Bzip2

 view release on metacpan or  search on metacpan

bzlib-src/bzlib_private.h  view on Meta::CPAN

   }
   DState;



/*-- Macros for decompression. --*/

#define BZ_GET_FAST(cccc)                     \
    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
    s->tPos = s->tt[s->tPos];                 \

 view all matches for this distribution


Compress-Deflate7

 view release on metacpan or  search on metacpan

7zip/CPP/Windows/Control/CommandBar.h  view on Meta::CPAN

  {
    _window = ::CommandBar_Create(hInst, hwndParent, idCmdBar);
    return (_window != NULL);
  }
  
  // Macros
  // void Destroy() { CommandBar_Destroy(_window); }
  bool AddButtons(int iButton, UINT numButtons, LPTBBUTTON buttons) { return BOOLToBool(SendMessage(TB_ADDBUTTONS, (WPARAM)numButtons, (LPARAM)buttons)); }
  bool InsertButton(int iButton, LPTBBUTTON button) { return BOOLToBool(SendMessage(TB_INSERTBUTTON, (WPARAM)iButton, (LPARAM)button)); }
  BOOL AddToolTips(UINT numToolTips, LPTSTR toolTips) { return BOOLToBool(SendMessage(TB_SETTOOLTIPS, (WPARAM)numToolTips, (LPARAM)toolTips)); }
  void AutoSize() { SendMessage(TB_AUTOSIZE, 0, 0); }

 view all matches for this distribution


Compress-LZ4

 view release on metacpan or  search on metacpan

src/lz4.h  view on Meta::CPAN


/*!
LZ4_compressBound() :
    Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible)
    This function is primarily useful for memory allocation purposes (destination buffer size).
    Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example).
    Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize)
        inputSize  : max supported value is LZ4_MAX_INPUT_SIZE
        return : maximum output size in a "worst case" scenario
              or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE)
*/

 view all matches for this distribution


Compress-LZ4Frame

 view release on metacpan or  search on metacpan

lz4.h  view on Meta::CPAN


/*!
LZ4_compressBound() :
    Provides the maximum size that LZ4 compression may output in a "worst case" scenario (input data not compressible)
    This function is primarily useful for memory allocation purposes (destination buffer size).
    Macro LZ4_COMPRESSBOUND() is also provided for compilation-time evaluation (stack memory allocation for example).
    Note that LZ4_compress_default() compress faster when dest buffer size is >= LZ4_compressBound(srcSize)
        inputSize  : max supported value is LZ4_MAX_INPUT_SIZE
        return : maximum output size in a "worst case" scenario
              or 0, if input size is too large ( > LZ4_MAX_INPUT_SIZE)
*/

 view all matches for this distribution


Compress-Raw-Bzip2

 view release on metacpan or  search on metacpan

bzip2-src/bzlib_private.h  view on Meta::CPAN

   }
   DState;



/*-- Macros for decompression. --*/

#define BZ_GET_FAST(cccc)                     \
    /* c_tPos is unsigned, hence test < 0 is pointless. */ \
    if (s->tPos >= (UInt32)100000 * (UInt32)s->blockSize100k) return True; \
    s->tPos = s->tt[s->tPos];                 \

 view all matches for this distribution


Compress-Raw-Zlib

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

delete $WriteMakefileArgs{BUILD_REQUIRES}
    unless eval { ExtUtils::MakeMaker->VERSION(6.55_03) } ;

WriteMakefile(%WriteMakefileArgs);

sub version_Macro
{
    my $ver = shift ;

    return [ "#if ZLIB_VERNUM >= 0x$ver\n", "#endif\n" ];
}

Makefile.PL  view on Meta::CPAN

    }

    push @names, { name => 'ZLIB_VERSION', type => 'PV' };

    push @names, map { { name => $_,
                         macro => version_Macro $verSpecificNames{$_}
                       }
                     }
                 keys %verSpecificNames ;

    push @names, { name => 'Z_NULL', type => 'UV' };

 view all matches for this distribution


Compress-Stream-Zstd

 view release on metacpan or  search on metacpan

ext/zstd/CONTRIBUTING.md  view on Meta::CPAN

* Prefer positive actions
  - `goBackward` rather than `notGoForward`
* Type names (`struct`, etc.) follow similar convention,
  except that they are allowed and even invited to start by an Uppercase letter.
  Example : `ZSTD_CCtx`, `ZSTD_CDict`
* Macro names are all Capital letters.
  The same composition rules (`PREFIX_NAME_QUALIFIER`) apply.
* File names are all lowercase letters.
  The convention is `snake_case`.
  File names **must** be unique across the entire code base,
  even when they stand in clearly separated directories.

 view all matches for this distribution


( run in 0.963 second using v1.01-cache-2.11-cpan-49f99fa48dc )