pidl: merge multiple 'genpad' implementations into one.
[gd/samba-autobuild/.git] / pidl / lib / Parse / Pidl / Samba3 / Template.pm
index 34969271df6aa5485d163e48f171ad54b6884fad..4750cef00f2f66c58adfa794a90de709b8e07e9a 100644 (file)
@@ -8,19 +8,12 @@ package Parse::Pidl::Samba3::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($)