diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-15 15:05:40 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-06-15 15:05:40 +0000 |
commit | 41be1fbddbbc49a5c34acad74f2905b11dd0ced0 (patch) | |
tree | 59f169a2c7ee1d938dcbcdaf3756484dadd570fc /universal.c | |
parent | 89d7df92a07b0e2b75f1879743e6589850f05d22 (diff) | |
download | perl-41be1fbddbbc49a5c34acad74f2905b11dd0ced0.tar.gz |
Reindent a section of the file.
p4raw-id: //depot/perl@19788
Diffstat (limited to 'universal.c')
-rw-r--r-- | universal.c | 306 |
1 files changed, 153 insertions, 153 deletions
diff --git a/universal.c b/universal.c index da41eb9167..22be54f128 100644 --- a/universal.c +++ b/universal.c @@ -385,183 +385,183 @@ XS(XS_version_new) XS(XS_version_stringify) { - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: version::stringify(lobj, ...)"); - SP -= items; - { - SV * lobj; - - if (sv_derived_from(ST(0), "version")) { - SV *tmp = SvRV(ST(0)); - lobj = tmp; - } - else - Perl_croak(aTHX_ "lobj is not of type version"); - -{ - PUSHs(vstringify(lobj)); -} - - PUTBACK; - return; - } + dXSARGS; + if (items < 1) + Perl_croak(aTHX_ "Usage: version::stringify(lobj, ...)"); + SP -= items; + { + SV * lobj; + + if (sv_derived_from(ST(0), "version")) { + SV *tmp = SvRV(ST(0)); + lobj = tmp; + } + else + Perl_croak(aTHX_ "lobj is not of type version"); + + { + PUSHs(vstringify(lobj)); + } + + PUTBACK; + return; + } } XS(XS_version_numify) { - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: version::numify(lobj, ...)"); - SP -= items; - { - SV * lobj; - - if (sv_derived_from(ST(0), "version")) { - SV *tmp = SvRV(ST(0)); - lobj = tmp; - } - else - Perl_croak(aTHX_ "lobj is not of type version"); - -{ - PUSHs(vnumify(lobj)); -} - - PUTBACK; - return; - } + dXSARGS; + if (items < 1) + Perl_croak(aTHX_ "Usage: version::numify(lobj, ...)"); + SP -= items; + { + SV * lobj; + + if (sv_derived_from(ST(0), "version")) { + SV *tmp = SvRV(ST(0)); + lobj = tmp; + } + else + Perl_croak(aTHX_ "lobj is not of type version"); + + { + PUSHs(vnumify(lobj)); + } + + PUTBACK; + return; + } } XS(XS_version_vcmp) { - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: version::vcmp(lobj, ...)"); - SP -= items; - { - SV * lobj; - - if (sv_derived_from(ST(0), "version")) { - SV *tmp = SvRV(ST(0)); - lobj = tmp; - } - else - Perl_croak(aTHX_ "lobj is not of type version"); - -{ - SV *rs; - SV *rvs; - SV * robj = ST(1); - IV swap = (IV)SvIV(ST(2)); - - if ( ! sv_derived_from(robj, "version") ) - { - robj = new_version(robj); - } - rvs = SvRV(robj); - - if ( swap ) - { - rs = newSViv(vcmp(rvs,lobj)); - } - else - { - rs = newSViv(vcmp(lobj,rvs)); - } - - PUSHs(rs); -} - - PUTBACK; - return; - } + dXSARGS; + if (items < 1) + Perl_croak(aTHX_ "Usage: version::vcmp(lobj, ...)"); + SP -= items; + { + SV * lobj; + + if (sv_derived_from(ST(0), "version")) { + SV *tmp = SvRV(ST(0)); + lobj = tmp; + } + else + Perl_croak(aTHX_ "lobj is not of type version"); + + { + SV *rs; + SV *rvs; + SV * robj = ST(1); + IV swap = (IV)SvIV(ST(2)); + + if ( ! sv_derived_from(robj, "version") ) + { + robj = new_version(robj); + } + rvs = SvRV(robj); + + if ( swap ) + { + rs = newSViv(vcmp(rvs,lobj)); + } + else + { + rs = newSViv(vcmp(lobj,rvs)); + } + + PUSHs(rs); + } + + PUTBACK; + return; + } } XS(XS_version_boolean) { - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: version::boolean(lobj, ...)"); - SP -= items; - { - SV * lobj; - - if (sv_derived_from(ST(0), "version")) { - SV *tmp = SvRV(ST(0)); - lobj = tmp; - } - else - Perl_croak(aTHX_ "lobj is not of type version"); - -{ - SV *rs; - rs = newSViv( vcmp(lobj,new_version(newSVpvn("0",1))) ); - PUSHs(rs); -} - - PUTBACK; - return; - } + dXSARGS; + if (items < 1) + Perl_croak(aTHX_ "Usage: version::boolean(lobj, ...)"); + SP -= items; + { + SV * lobj; + + if (sv_derived_from(ST(0), "version")) { + SV *tmp = SvRV(ST(0)); + lobj = tmp; + } + else + Perl_croak(aTHX_ "lobj is not of type version"); + + { + SV *rs; + rs = newSViv( vcmp(lobj,new_version(newSVpvn("0",1))) ); + PUSHs(rs); + } + + PUTBACK; + return; + } } XS(XS_version_noop) { - dXSARGS; - if (items < 1) - Perl_croak(aTHX_ "Usage: version::noop(lobj, ...)"); - { - SV * lobj; - - if (sv_derived_from(ST(0), "version")) { - SV *tmp = SvRV(ST(0)); - lobj = tmp; - } - else - Perl_croak(aTHX_ "lobj is not of type version"); - -{ - Perl_croak(aTHX_ "operation not supported with version object"); -} - - } - XSRETURN_EMPTY; + dXSARGS; + if (items < 1) + Perl_croak(aTHX_ "Usage: version::noop(lobj, ...)"); + { + SV * lobj; + + if (sv_derived_from(ST(0), "version")) { + SV *tmp = SvRV(ST(0)); + lobj = tmp; + } + else + Perl_croak(aTHX_ "lobj is not of type version"); + + { + Perl_croak(aTHX_ "operation not supported with version object"); + } + + } + XSRETURN_EMPTY; } XS(XS_utf8_is_utf8) { - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: utf8::is_utf8(sv)"); - { - SV * sv = ST(0); - { - if (SvUTF8(sv)) - XSRETURN_YES; - else - XSRETURN_NO; - } - } - XSRETURN_EMPTY; + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: utf8::is_utf8(sv)"); + { + SV * sv = ST(0); + { + if (SvUTF8(sv)) + XSRETURN_YES; + else + XSRETURN_NO; + } + } + XSRETURN_EMPTY; } XS(XS_utf8_valid) { - dXSARGS; - if (items != 1) - Perl_croak(aTHX_ "Usage: utf8::valid(sv)"); - { - SV * sv = ST(0); - { - STRLEN len; - char *s = SvPV(sv,len); - if (!SvUTF8(sv) || is_utf8_string((U8*)s,len)) - XSRETURN_YES; - else - XSRETURN_NO; - } - } - XSRETURN_EMPTY; + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: utf8::valid(sv)"); + { + SV * sv = ST(0); + { + STRLEN len; + char *s = SvPV(sv,len); + if (!SvUTF8(sv) || is_utf8_string((U8*)s,len)) + XSRETURN_YES; + else + XSRETURN_NO; + } + } + XSRETURN_EMPTY; } XS(XS_utf8_encode) |