CSS-Sass

 view release on metacpan or  search on metacpan

bin/psass.pl  view on Meta::CPAN


####################################################################################################
# normalize command arguments to utf8
####################################################################################################

# get cmd arg encoding
use Encode::Locale qw();
# convert cmd args to utf8
use Encode qw(decode encode);
# now just decode every command arguments
@ARGV = map { decode(locale => $_, 1) } @ARGV;

####################################################################################################
# config variables
####################################################################################################

# init options
my $watchdog;
my $benchmark;
my $precision;
my $output_file;

lib/CSS/ppport.h  view on Meta::CPAN

aMY_CXT_|5.007003||p
aMY_CXT|5.007003||p
aTHXR_|5.011000||p
aTHXR|5.011000||p
aTHX_|5.006000||p
aTHX|5.006000||p
add_data|||n
addmad|||
allocmy|||
amagic_call|||
amagic_cmp_locale|||
amagic_cmp|||
amagic_i_ncmp|||
amagic_ncmp|||
any_dup|||
ao|||
append_elem|||
append_list|||
append_madprops|||
apply_attrs_my|||
apply_attrs_string||5.006001|

lib/CSS/ppport.h  view on Meta::CPAN

hv_placeholders_p||5.009003|
hv_placeholders_set||5.009003|
hv_riter_p||5.009003|
hv_riter_set||5.009003|
hv_scalar||5.009001|
hv_store_ent||5.004000|
hv_store_flags||5.008000|
hv_stores|5.009004||p
hv_store|||
hv_undef|||
ibcmp_locale||5.004000|
ibcmp_utf8||5.007003|
ibcmp|||
incline|||
incpush_if_exists|||
incpush_use_sep|||
incpush|||
ingroup|||
init_argv_symbols|||
init_debugger|||
init_global_struct|||

lib/CSS/ppport.h  view on Meta::CPAN

sortcv|||
sortsv_flags||5.009003|
sortsv||5.007003|
space_join_names_mortal|||
ss_dup|||
stack_grow|||
start_force|||
start_glob|||
start_subparse||5.004000|
stashpv_hvname_match||5.011000|
stdize_locale|||
store_cop_label|||
strEQ|||
strGE|||
strGT|||
strLE|||
strLT|||
strNE|||
str_to_version||5.006000|
strip_return|||
strnEQ|||

lib/CSS/ppport.h  view on Meta::CPAN

sv_catsv_flags||5.007002|
sv_catsv_mg|5.004050||p
sv_catsv_nomg|5.007002||p
sv_catsv|||
sv_catxmlpvn|||
sv_catxmlsv|||
sv_chop|||
sv_clean_all|||
sv_clean_objs|||
sv_clear|||
sv_cmp_locale||5.004000|
sv_cmp|||
sv_collxfrm|||
sv_compile_2op||5.008001|
sv_copypv||5.007003|
sv_dec|||
sv_del_backref|||
sv_derived_from||5.004000|
sv_destroyable||5.010000|
sv_does||5.009004|
sv_dump|||

lib/CSS/ppport.h  view on Meta::CPAN

    if (PL_numeric_radix_sv && IN_LOCALE) {
        STRLEN len;
        char* radix = SvPV(PL_numeric_radix_sv, len);
        if (*sp + len <= send && memEQ(*sp, radix, len)) {
            *sp += len;
            return TRUE;
        }
    }
#else
    /* older perls don't have PL_numeric_radix_sv so the radix
     * must manually be requested from locale.h
     */
#include <locale.h>
    dTHR;  /* needed for older threaded perls */
    struct lconv *lc = localeconv();
    char *radix = lc->decimal_point;
    if (radix && IN_LOCALE) {
        STRLEN len = strlen(radix);
        if (*sp + len <= send && memEQ(*sp, radix, len)) {
            *sp += len;
            return TRUE;
        }
    }
#endif
#endif /* USE_LOCALE_NUMERIC */
    /* always try "." if numeric radix didn't match because
     * we may have data from different locales mixed */
    if (*sp < send && **sp == '.') {
        ++*sp;
        return TRUE;
    }
    return FALSE;
}
#endif
#endif

#ifndef grok_number

libsass/lexer.cpp  view on Meta::CPAN

    const char* kwd_dot(const char* src) { return exactly<'.'>(src); }
    const char* kwd_comma(const char* src) { return exactly<','>(src); };
    const char* kwd_colon(const char* src) { return exactly<':'>(src); };
    const char* kwd_star(const char* src) { return exactly<'*'>(src); };
    const char* kwd_plus(const char* src) { return exactly<'+'>(src); };
    const char* kwd_minus(const char* src) { return exactly<'-'>(src); };
    const char* kwd_slash(const char* src) { return exactly<'/'>(src); };

    //####################################
    // implement some function that do exist in the standard
    // but those are locale aware which brought some trouble
    // this even seems to improve performance by quite a bit
    //####################################

    const bool is_alpha(const char& chr)
    {
      return unsigned(chr - 'A') <= 'Z' - 'A' ||
             unsigned(chr - 'a') <= 'z' - 'a';
    }

    const bool is_space(const char& chr)

libsass/lexer.cpp  view on Meta::CPAN

    const bool is_xdigit(const char& chr)
    {
      // adapted the technique from is_alpha
      return unsigned(chr - '0') <= '9' - '0' ||
             unsigned(chr - 'a') <= 'f' - 'a' ||
             unsigned(chr - 'A') <= 'F' - 'A';
    }

    const bool is_punct(const char& chr)
    {
      // locale independent
      return chr == '.';
    }

    const bool is_alnum(const char& chr)
    {
      return is_alpha(chr) || is_digit(chr);
    }

    // check if char is outside ascii range
    const bool is_unicode(const char& chr)

libsass/lexer.hpp  view on Meta::CPAN

    const char* kwd_colon(const char* src);
    const char* kwd_star(const char* src);
    const char* kwd_plus(const char* src);
    const char* kwd_minus(const char* src);
    const char* kwd_slash(const char* src);

    //####################################
    // BASIC CLASS MATCHERS
    //####################################

    // These are locale independant
    const bool is_space(const char& src);
    const bool is_alpha(const char& src);
    const bool is_punct(const char& src);
    const bool is_digit(const char& src);
    const bool is_alnum(const char& src);
    const bool is_xdigit(const char& src);
    const bool is_unicode(const char& src);
    const bool is_character(const char& src);

    // Match a single ctype predicate.

libsass/util.cpp  view on Meta::CPAN

    char *ret = (char*) malloc(strlen(str) + 1);
    if (ret == NULL)
      out_of_memory();
    strcpy(ret, str);
    return ret;
  }

  /* Locale unspecific atof function. */
  double sass_atof(const char *str)
  {
    char separator = *(localeconv()->decimal_point);
    if(separator != '.'){
      // The current locale specifies another
      // separator. convert the separator to the
      // one understood by the locale if needed
      const char *found = strchr(str, '.');
      if(found != NULL){
        // substitution is required. perform the substitution on a copy
        // of the string. This is slower but it is thread safe.
        char *copy = sass_strdup(str);
        *(copy + (found - str)) = separator;
        double res = atof(copy);
        free(copy);
        return res;
      }



( run in 4.127 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )