% This file is copyrighted (c) 1998 1999 by Javier Bezos.
% All Rights Reserved.
%
% This file is part of the titlesec distribution release 2.1.
% -----------------------------------------------------------
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.

\ProvidesFile{frame.tss}[1999/02/20]

\gdef\ttlh@frame#1#2#3#4#5#6#7#8{%
  \def\es@filleft##1{\hfill}%
  \def\es@filright##1{\hfill}%
  \gdef\ttl@makeline##1{\hskip#6\relax##1\hskip#7}%
  \interlinepenalty\@M
  #1%
  \parindent\z@
  \leavevmode
  \@tempdima\fboxrule
  \addtolength\@tempdima{#3}%
  \addtolength\leftskip{#6}%
  \addtolength\rightskip{#7}%
  \lower\@tempdima\hbox{%
    \everypar{}%
    \setbox\z@\hbox{#2}%  
    \addtolength\hsize{-#6}%
    \addtolength\hsize{-#7}%
    \@tempdima.5\ht\z@
    \vbox{%
       \hbox to \hsize{%
          \leaders\hrule\@height\fboxrule\es@filleft{#3}%
          \ifttl@numsec\lower\@tempdima\box\z@\fi
          \leaders\hrule\@height\fboxrule\es@filright{#3}}%
          \vskip-\lineskip
          \vskip-\@tempdima\vskip.5\ht\z@
          \hbox{%
            \vrule\@width\fboxrule
            \kern-\fboxrule
            \vbox{%
               \vspace{#3}%
               \leavevmode
	           \addtolength\leftskip {#3}\addtolength\leftskip{-#6}%
	           \addtolength\rightskip{#3}\addtolength\rightskip{-#7}%
	           \strut#4{#8}\kern\z@\strut\@@par
               \vspace{#3}}%
           \kern-\fboxrule
           \vrule\@width\fboxrule}%
       \hrule\@height\fboxrule}}%
	   \@@par\nobreak\ttl@savewrite#5\@@par}