Convert-Binary-C

 view release on metacpan or  search on metacpan

cbc/tag.c  view on Meta::CPAN

*   ARGUMENTS:
*
*     RETURNS:
*
*******************************************************************************/

void handle_tag(pTHX_ const TagTypeInfo *ptti, CtTagList *ptl, SV *name, SV *val, SV **rv)
{
  const struct tag_tbl_ent *etbl;
  const char *tagstr;
  CtTagType tagid;
  CtTag *tag;

  assert(ptl);
  assert(name);

  if (SvROK(name))
    Perl_croak(aTHX_ "Tag name must be a string, not a reference");

  tagstr = SvPV_nolen(name);
  tagid  = get_tag_id(tagstr);

  if (tagid == CBC_INVALID_TAG)
    Perl_croak(aTHX_ "Invalid tag name '%s'", tagstr);

  if (tagid > NUM_TAGIDS)
    fatal("Unknown tag type (%d) in handle_tag()", (int) tagid);

  etbl = &gs_TagTbl[tagid];

  tag = find_tag(*ptl, tagid);

  if (etbl->verify)
    etbl->verify(aTHX_ ptti, tag, val);

  if (val)
  {
    TagSetRV rv;

    if (tag == NULL)
    {
      dTHR;
      dXCPT;

      tag = tag_new(tagid, etbl->vtbl);

      XCPT_TRY_START {
        rv = etbl->set(aTHX_ ptti, tag, val);
      } XCPT_TRY_END

      XCPT_CATCH
      {
        tag_delete(tag);
        XCPT_RETHROW;
      }

cbc/tag.c  view on Meta::CPAN

    }
    else
      rv = etbl->set(aTHX_ ptti, tag, val);

    switch (rv)
    {
      case TSRV_UPDATE:
        break;

      case TSRV_DELETE:
        tag_delete(remove_tag(ptl, tagid));
        tag = NULL;
        break;

      default:
        fatal("Invalid return value for tag set method (%d)", rv);
    }
  }

  if (rv)
    *rv = tag ? etbl->get(aTHX_ ptti, tag) : &PL_sv_undef;

ctlib/y_parser.c  view on Meta::CPAN

/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif

ctlib/y_pragma.c  view on Meta::CPAN

/* Stored state numbers (used for stacks). */
typedef yytype_int8 yy_state_t;

/* State numbers in computations.  */
typedef int yy_state_fast_t;

#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(Msgid) Msgid
# endif
#endif


#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
#  define YY_ATTRIBUTE_PURE
# endif

ppport.h  view on Meta::CPAN

get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
get_debug_opts|5.008001||Viu
get_deprecated_property_msg|5.031011||cVniu
getegid|5.005000||Viu
getenv|5.005000||Viu
getenv_len|5.006000||Viu
GETENV_LOCK|5.033005||Viu
GETENV_PRESERVES_OTHER_THREAD|5.033005|5.033005|Vn
GETENV_UNLOCK|5.033005||Viu
geteuid|5.005000||Viu
getgid|5.005000||Viu
getgrent|5.009000||Viu
GETGRENT_R_HAS_BUFFER|5.008000||Viu
GETGRENT_R_HAS_FPTR|5.008000||Viu
GETGRENT_R_HAS_PTR|5.008000||Viu
GETGRENT_R_PROTO|5.008000|5.008000|Vn
getgrgid|5.009000||Viu
GETGRGID_R_HAS_BUFFER|5.008000||Viu
GETGRGID_R_HAS_PTR|5.008000||Viu
GETGRGID_R_PROTO|5.008000|5.008000|Vn
getgrnam|5.009000||Viu
GETGRNAM_R_HAS_BUFFER|5.008000||Viu
GETGRNAM_R_HAS_PTR|5.008000||Viu
GETGRNAM_R_PROTO|5.008000|5.008000|Vn
get_hash_seed|5.008001||Viu
gethostbyaddr|5.005000||Viu
GETHOSTBYADDR_R_HAS_BUFFER|5.008000||Viu

ppport.h  view on Meta::CPAN

KEY_finally|5.035008||Viu
KEY_flock|5.003007||Viu
KEY_for|5.003007||Viu
KEY_foreach|5.003007||Viu
KEY_fork|5.003007||Viu
KEY_format|5.003007||Viu
KEY_formline|5.003007||Viu
KEY_ge|5.003007||Viu
KEY_getc|5.003007||Viu
KEY_getgrent|5.003007||Viu
KEY_getgrgid|5.003007||Viu
KEY_getgrnam|5.003007||Viu
KEY_gethostbyaddr|5.003007||Viu
KEY_gethostbyname|5.003007||Viu
KEY_gethostent|5.003007||Viu
KEY_getlogin|5.003007||Viu
KEY_getnetbyaddr|5.003007||Viu
KEY_getnetbyname|5.003007||Viu
KEY_getnetent|5.003007||Viu
KEY_getpeername|5.003007||Viu
KEY_getpgrp|5.003007||Viu

ppport.h  view on Meta::CPAN

Perl_pp_ftdir|5.013009||Viu
Perl_pp_fteexec|5.013009||Viu
Perl_pp_fteowned|5.013009||Viu
Perl_pp_fteread|5.013009||Viu
Perl_pp_ftewrite|5.013009||Viu
Perl_pp_ftfile|5.013009||Viu
Perl_pp_ftmtime|5.013009||Viu
Perl_pp_ftpipe|5.013009||Viu
Perl_pp_ftrexec|5.013009||Viu
Perl_pp_ftrwrite|5.013009||Viu
Perl_pp_ftsgid|5.013009||Viu
Perl_pp_ftsize|5.013009||Viu
Perl_pp_ftsock|5.013009||Viu
Perl_pp_ftsuid|5.013009||Viu
Perl_pp_ftsvtx|5.013009||Viu
Perl_pp_ftzero|5.013009||Viu
Perl_pp_getpeername|5.013009||Viu
Perl_pp_getsockname|5.013009||Viu
Perl_pp_ggrgid|5.013009||Viu
Perl_pp_ggrnam|5.013009||Viu
Perl_pp_ghbyaddr|5.013009||Viu
Perl_pp_ghbyname|5.013009||Viu
Perl_pp_gnbyaddr|5.013009||Viu
Perl_pp_gnbyname|5.013009||Viu
Perl_pp_gpbyname|5.013009||Viu
Perl_pp_gpbynumber|5.013009||Viu
Perl_pp_gpwnam|5.013009||Viu
Perl_pp_gpwuid|5.013009||Viu
Perl_pp_gsbyname|5.013009||Viu

ppport.h  view on Meta::CPAN

PERL_PRIgldbl|5.006000|5.006000|Vn
PerlProc_abort|5.005000||Viu
PerlProc_crypt|5.005000||Viu
PerlProc_DynaLoad|5.006000||Viu
PerlProc_execl|5.005000||Viu
PerlProc_execv|5.005000||Viu
PerlProc_execvp|5.005000||Viu
PerlProc__exit|5.005000||Viu
PerlProc_exit|5.005000||Viu
PerlProc_fork|5.006000||Viu
PerlProc_getegid|5.005000||Viu
PerlProc_geteuid|5.005000||Viu
PerlProc_getgid|5.005000||Viu
PerlProc_getlogin|5.005000||Viu
PerlProc_GetOSError|5.006000||Viu
PerlProc_getpid|5.006000||Viu
PerlProc_gettimeofday|5.008000||Viu
PerlProc_getuid|5.005000||Viu
PerlProc_kill|5.005000||Viu
PerlProc_killpg|5.005000||Viu
PerlProc_lasthost|5.007001||Viu
PerlProc_longjmp|5.005000||Viu
PerlProc_pause|5.005000||Viu
PerlProc_pclose|5.005000||Viu
PerlProc_pipe|5.005000||Viu
PerlProc_pipe_cloexec|5.027008||Viu
PerlProc_popen|5.005000||Viu
PerlProc_popen_list|5.007001||Viu
PerlProc_setgid|5.005000||Viu
PerlProc_setjmp|5.005000||Viu
PerlProc_setuid|5.005000||Viu
PerlProc_signal|5.005000||Viu
PerlProc_sleep|5.005000||Viu
PerlProc_spawnvp|5.008000||Viu
PerlProc_times|5.005000||Viu
PerlProc_wait|5.005000||Viu
PerlProc_waitpid|5.005000||Viu
perl_pthread_mutex_lock|5.023006||Viu
perl_pthread_mutex_unlock|5.023006||Viu

ppport.h  view on Meta::CPAN

PL_DBtrace|5.005000||pV
PL_DBtrace_iv|5.021005||Viu
PL_debstash|5.005000|5.003007|poVnu
PL_debug|5.005000||Viu
PL_debug_pad|5.007003||Viu
PL_defgv|5.004005|5.003007|p
PL_def_layerlist|5.007003||Viu
PL_defoutgv|5.005000||Viu
PL_defstash|5.005000||Viu
PL_delaymagic|5.005000||Viu
PL_delaymagic_egid|5.015008||Viu
PL_delaymagic_euid|5.015008||Viu
PL_delaymagic_gid|5.015008||Viu
PL_delaymagic_uid|5.015008||Viu
PL_destroyhook|5.010000||Viu
PL_diehook|5.005000|5.003007|poVnu
PL_Dir|5.006000||Viu
PL_dirty|5.005000|5.003007|poVnu
PL_doswitches|5.005000||Viu
PL_dowarn|5.005000||pV
PL_dumper_fd|5.009003||Viu
PL_dumpindent|5.006000||Viu
PL_dump_re_max_len|5.023008||Viu

ppport.h  view on Meta::CPAN

setbuf|5.003007||Viu
set_caret_X|5.019006||Viu
set_context|5.006000|5.006000|nu
setdefout|5.011000|5.011000|
SETERRNO|5.003007||Vi
setfd_cloexec|5.027008||Vniu
setfd_cloexec_for_nonsysfd|5.027008||Viu
setfd_cloexec_or_inhexec_by_sysfdness|5.027008||Viu
setfd_inhexec|5.027008||Vniu
setfd_inhexec_for_sysfd|5.027008||Viu
setgid|5.005000||Viu
setgrent|5.009000||Viu
SETGRENT_R_HAS_FPTR|5.008000||Viu
SETGRENT_R_PROTO|5.008000|5.008000|Vn
sethostent|5.005000||Viu
SETHOSTENT_R_PROTO|5.008000|5.008000|Vn
SETi|5.003007||Viu
setjmp|5.005000||Viu
setlinebuf|5.005000||Viu
setlocale|5.009000||Viu
setlocale_debug_string|5.027002||Vniu

ppport.h  view on Meta::CPAN

SET_NUMERIC_UNDERLYING|5.021010||Viu
set_numeric_underlying|5.027006||cViu
SETp|5.003007||Viu
set_padlist|5.021006||cVniu
setprotoent|5.005000||Viu
SETPROTOENT_R_PROTO|5.008000|5.008000|Vn
setpwent|5.009000||Viu
SETPWENT_R_HAS_FPTR|5.008000||Viu
SETPWENT_R_PROTO|5.008000|5.008000|Vn
set_regex_pv|5.029004||Viu
setregid|5.003007||Viu
setreuid|5.003007||Viu
SETs|5.003007||Viu
setservent|5.005000||Viu
SETSERVENT_R_PROTO|5.008000|5.008000|Vn
setsockopt|5.005000||Viu
setSTR_LEN|5.031005||Viu
SET_SVANY_FOR_BODYLESS_IV|5.023008||Viu
SET_SVANY_FOR_BODYLESS_NV|5.023008||Viu
SETTARG|5.003007||Viu
SET_THR|5.005000||Viu

ppport.h  view on Meta::CPAN

sv_rvweaken|5.006000|5.006000|
SvRVx|5.003007||Viu
SvRX|5.009005|5.003007|p
SvRXOK|5.009005|5.003007|p
SV_SAVED_COPY|5.009005||Viu
SvSCREAM|5.003007||Viu
SvSCREAM_off|5.003007||Viu
SvSCREAM_on|5.003007||Viu
sv_setbool|5.035004|5.035004|
sv_setbool_mg|5.035004|5.035004|
sv_setgid|5.019001||Viu
sv_sethek|5.015004||cViu
sv_setiv|5.003007|5.003007|
sv_setiv_mg|5.004005|5.003007|p
SvSETMAGIC|5.003007|5.003007|
SvSetMagicSV|5.004000|5.004000|
SvSetMagicSV_nosteal|5.004000|5.004000|
sv_setnv|5.006000|5.003007|
sv_setnv_mg|5.006000|5.003007|p
sv_setpv|5.003007|5.003007|
sv_setpv_bufsize|5.025006|5.025006|

tests/include/pdclib/functions/_tzcode/_PDCLIB_init_ttinfo.c  view on Meta::CPAN


   This file is part of the Public Domain C Library (PDCLib).
   Permission is granted to use, modify, and / or redistribute at will.
*/

#ifndef REGTEST

#include "pdclib/_PDCLIB_tzcode.h"

/* Initialize *S to a value based on UTOFF, ISDST, and DESIGIDX.  */
void _PDCLIB_init_ttinfo( struct ttinfo * s, int_fast32_t utoff, bool isdst, int desigidx )
{
    s->utoff = utoff;
    s->isdst = isdst;
    s->desigidx = desigidx;
    s->ttisstd = false;
    s->ttisut = false;
}

#endif

#ifdef TEST

#include "_PDCLIB_test.h"

tests/include/pdclib/functions/_tzcode/_PDCLIB_localsub.c  view on Meta::CPAN

       you'd replace the statement below with
       t += ttisp->utoff;
       timesub( &t, 0L, sp, tmp );
    */
    result = _PDCLIB_timesub( &t, ttisp->utoff, sp, tmp );

    if ( result )
    {
        result->tm_isdst = ttisp->isdst;
#ifdef TM_ZONE
        result->TM_ZONE = (char *) &sp->chars[ ttisp->desigidx ];
#endif /* defined TM_ZONE */

        if ( setname )
        {
            _PDCLIB_update_tzname_etc( sp, ttisp );
        }
    }

    return result;
}

tests/include/pdclib/functions/_tzcode/_PDCLIB_tzload.c  view on Meta::CPAN

    }
    else
    {
        const struct ttinfo *  ap = &sp->ttis[ a ];
        const struct ttinfo *  bp = &sp->ttis[ b ];

        result = ( ap->utoff == bp->utoff &&
                   ap->isdst == bp->isdst &&
                   ap->ttisstd == bp->ttisstd &&
                   ap->ttisut == bp->ttisut &&
                   ( strcmp( &sp->chars[ ap->desigidx ], &sp->chars[ bp->desigidx ] ) == 0 )
                 );
    }

    return result;
}

#define TZ_MAGIC "TZif"

struct tzhead
{

tests/include/pdclib/functions/_tzcode/_PDCLIB_tzload.c  view on Meta::CPAN

            {
                sp->types[ timecnt++ ] = typ;
            }
        }

        sp->timecnt = timecnt;

        for ( i = 0; i < sp->typecnt; ++i )
        {
            struct ttinfo * ttisp;
            unsigned char isdst, desigidx;

            ttisp = &sp->ttis[ i ];
            ttisp->utoff = detzcode( p );
            p += 4;
            isdst = *p++;

            if ( ! ( isdst < 2 ) )
            {
                return _PDCLIB_EINVAL;
            }

            ttisp->isdst = isdst;
            desigidx = *p++;

            if ( ! ( desigidx < sp->charcnt ) )
            {
                return _PDCLIB_EINVAL;
            }

            ttisp->desigidx = desigidx;
        }

        for ( i = 0; i < sp->charcnt; ++i )
        {
            sp->chars[ i ] = *p++;
        }

        sp->chars[ i ] = '\0';    /* ensure '\0' at end */

        /* Read leap seconds, discarding those out of time_t range.  */

tests/include/pdclib/functions/_tzcode/_PDCLIB_tzload.c  view on Meta::CPAN

               the edge after 2037 when TZ_MAX_CHARS is 50, as
               sp->charcnt equals 40 (for LMT AST AWT APT AHST
               AHDT YST AKDT AKST) and ts->charcnt equals 10
               (for AKST AKDT).  Reusing means sp->charcnt can
               stay 40 in this example.  */
            int gotabbr = 0;
            int charcnt = sp->charcnt;

            for ( i = 0; i < ts->typecnt; ++i )
            {
                char * tsabbr = ts->chars + ts->ttis[ i ].desigidx;
                int j;

                for ( j = 0; j < charcnt; ++j )
                {
                    if ( strcmp( sp->chars + j, tsabbr ) == 0 )
                    {
                        ts->ttis[ i ].desigidx = j;
                        ++gotabbr;
                        break;
                    }
                }

                if ( ! ( j < charcnt ) )
                {
                    int tsabbrlen = strlen( tsabbr );

                    if ( j + tsabbrlen < TZ_MAX_CHARS )
                    {
                        strcpy( sp->chars + j, tsabbr );
                        charcnt = j + tsabbrlen + 1;
                        ts->ttis[ i ].desigidx = j;
                        ++gotabbr;
                    }
                }
            }

            if ( gotabbr == ts->typecnt )
            {
                sp->charcnt = charcnt;

                /* Ignore any trailing, no-op transitions generated

tests/include/pdclib/functions/_tzcode/_PDCLIB_tzset_unlocked.c  view on Meta::CPAN

        if ( strchr( TZ_ABBR_CHAR_SET, sp->chars[ i ] ) == NULL )
        {
            sp->chars[ i ] = TZ_ABBR_ERR_CHAR;
        }
    }

    /* Second, truncate long abbreviations. */
    for ( i = 0; i < sp->typecnt; ++i )
    {
        const struct ttinfo * const ttisp = &sp->ttis[ i ];
        char * cp = &sp->chars[ ttisp->desigidx ];

        if ( strlen( cp ) > TZ_ABBR_MAX_LEN && strcmp( cp, GRANDPARENTED ) != 0 )
        {
            *( cp + TZ_ABBR_MAX_LEN ) = '\0';
        }
    }
}

/* Initialize *SP to a value appropriate for the TZ setting NAME.
   Return 0 on success, an errno value on failure.

tests/include/pdclib/functions/_tzcode/_PDCLIB_update_tzname_etc.c  view on Meta::CPAN

   Permission is granted to use, modify, and / or redistribute at will.
*/

#ifndef REGTEST

#include "pdclib/_PDCLIB_tzcode.h"

void _PDCLIB_update_tzname_etc( struct state const * sp, struct ttinfo const * ttisp )
{
#if HAVE_TZNAME
    tzname[ ttisp->isdst ] = (char *) &sp->chars[ ttisp->desigidx ];
#endif
#if USG_COMPAT
    if ( ! ttisp->isdst )
    {
        timezone = - ttisp->utoff;
    }
#endif
#if ALTZONE
    if ( ttisp->isdst )
    {

tests/include/pdclib/include/pdclib/_PDCLIB_tzcode.h  view on Meta::CPAN

static const int year_lengths[2] =
{
    DAYSPERNYEAR, DAYSPERLYEAR
};

/* time type information */
struct ttinfo
{
    int_fast32_t utoff;    /* UT offset in seconds    */
    bool         isdst;    /* used to set tm_isdst    */
    int          desigidx; /* abbreviation list index */
    bool         ttisstd;  /* transition is std time  */
    bool         ttisut;   /* transition is UT        */
};

/* leap second information */
struct lsinfo
{
    time_t       trans;    /* transition time         */
    int_fast64_t corr;     /* correction to apply     */
};

tests/include/pdclib/include/pdclib/_PDCLIB_tzcode.h  view on Meta::CPAN

    */
    int            defaulttype;
};

extern struct state _PDCLIB_lclmem;
extern struct state _PDCLIB_gmtmem;

void        _PDCLIB_gmtcheck(void);
struct tm * _PDCLIB_gmtsub( struct state const * sp, time_t const * timep, int_fast32_t offset, struct tm * tmp );
bool        _PDCLIB_increment_overflow( int * ip, int j );
void        _PDCLIB_init_ttinfo( struct ttinfo * s, int_fast32_t utoff, bool isdst, int desigidx );
struct tm * _PDCLIB_localsub( struct state const * sp, time_t const * timep, int_fast32_t setname, struct tm * const tmp );
struct tm * _PDCLIB_localtime_tzset( time_t const * timep, struct tm * tmp, bool setname );
time_t      _PDCLIB_mktime_tzname( struct state * sp, struct tm * tmp, bool setname );
struct tm * _PDCLIB_timesub( const time_t * timep, int_fast32_t offset, const struct state * sp, struct tm * tmp );
int         _PDCLIB_tzload( char const * name, struct state * sp, bool doextend );
bool        _PDCLIB_tzparse(char const *, struct state *, bool);
void        _PDCLIB_tzset_unlocked( void );
void        _PDCLIB_update_tzname_etc( struct state const * sp, struct ttinfo const * ttisp );

#ifdef __cplusplus



( run in 2.314 seconds using v1.01-cache-2.11-cpan-5735350b133 )