pidl: merge multiple 'genpad' implementations into one.
[gd/samba-autobuild/.git] / pidl / lib / Parse / Pidl / Samba4 / Template.pm
index e79af856919dce58f7186d69496a9a0b79c8ea31..d9fb3041163378f2d42c39c1d8cc63b05d5c5ab1 100644 (file)
@@ -8,19 +8,12 @@ package Parse::Pidl::Samba4::Template;
 use vars qw($VERSION);
 $VERSION = '0.01';
 
+use Parse::Pidl::Util qw(genpad);
+
 use strict;
 
 my($res);
 
-sub genpad($)
-{
-       my ($s) = @_;
-       my $nt = int((length($s)+1)/8);
-       my $lt = ($nt*8)-1;
-       my $ns = (length($s)-$lt);
-       return "\t"x($nt)." "x($ns);
-}
-
 #####################################################################
 # produce boilerplate code for a interface
 sub Template($)