% Para generar indice de codigo fuente

\renewcommand{\lstlistlistingname}{Indice de Codigo}

\renewcommand{\lstlistingname}{Codigo}

%%%%%%%%%%%%%%% Para codigo fuente %%%%%%

\newcommand{\codigofuente}[3]{%
  \lstinputlisting[language=#1,caption={#2}]{#3}%
}
%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%