This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Devel-PPPort to CPAN version 3.21
[perl5.git] / cpan / Devel-PPPort / parts / inc / snprintf
index a2d2039..b700d8b 100644 (file)
@@ -1,12 +1,6 @@
 ################################################################################
 ##
-##  $Revision: 7 $
-##  $Author: mhx $
-##  $Date: 2010/03/07 13:15:45 +0100 $
-##
-################################################################################
-##
-##  Version 3.x, Copyright (C) 2004-2010, Marcus Holland-Moritz.
+##  Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
 ##  Version 2.x, Copyright (C) 2001, Paul Marquess.
 ##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
 ##
@@ -38,7 +32,7 @@ my_snprintf(char *buffer, const Size_t len, const char *format, ...)
 #endif
     va_end(ap);
     if (retval < 0 || (len > 0 && (Size_t)retval >= len))
-       Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
+        Perl_croak(aTHX_ "panic: my_snprintf buffer overflow");
     return retval;
 }
 
@@ -53,18 +47,17 @@ my_snprintf(char *buffer, const Size_t len, const char *format, ...)
 
 void
 my_snprintf()
-       PREINIT:
-               char buf[128];
-               int len;
-       PPCODE:
-               len = my_snprintf(buf, sizeof buf, "foo%s%d", "bar", 42);
-               mXPUSHi(len);
-               mXPUSHs(newSVpv(buf, 0));
-               XSRETURN(2);
+        PREINIT:
+                char buf[128];
+                int len;
+        PPCODE:
+                len = my_snprintf(buf, sizeof buf, "foo%s%d", "bar", 42);
+                mXPUSHi(len);
+                mXPUSHs(newSVpv(buf, 0));
+                XSRETURN(2);
 
 =tests plan => 2
 
 my($l, $s) = Devel::PPPort::my_snprintf();
 ok($l, 8);
 ok($s, "foobar42");
-