3 %% Copyright (C) 2000-2004 Simone Piccardi. Permission is granted to
4 %% copy, distribute and/or modify this document under the terms of the GNU Free
5 %% Documentation License, Version 1.1 or any later version published by the
6 %% Free Software Foundation; with the Invariant Sections being "Un preambolo",
7 %% with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the
8 %% license is included in the section entitled "GNU Free Documentation
12 % Defining some commands to manipulate counter to avoid ude of
13 % \label and \ref commands (and related problem to remeber the
14 % used labels) to refer nearest objects
17 \newcounter{usercount} % define a new counter for internal use
21 \newcommand{\cureq}{(\theequation)}
23 \setcounter{usercount}{\value{equation}}%
24 \addtocounter{usercount}{1}%
25 (\thechapter.\theusercount)}
27 \setcounter{usercount}{\value{equation}}%
28 \addtocounter{usercount}{-1}%
29 (\thechapter.\theusercount)}
31 % Macro to put picture (in format PICT) inside a figure
33 \newcommand{\pictfig}[3]{
34 \begin{minipage}[t][#1][b]{#2}
35 \mbox{\special{pict=#3}}
40 % Macro to create a special environment for function prototypes
43 \newenvironment{prototype}[2]
44 {% defining what is done by \begin
47 \begin{boxedminipage}[c]{14cm}
49 \begin{description*}{}{}
50 \item \texttt{\#include <#1>}
51 \item \texttt{#2} \par
52 % \begin{lstlisting}{}
57 {% defining what is done by \end
66 \newenvironment{errlist}{\begin{basedescript}{\desclabelwidth{1.5cm}}}
69 % Slighty different envirnoment to be used for multi-header,
70 % multi-functions boxed description
72 \newcommand{\headdecl}[1]{\item\texttt{\#include <#1>}}
73 \newcommand{\funcdecl}[1]{\item\texttt{#1}\par}
74 \newcommand{\bodydesc}[1]{\par \end{description*} #1
75 \begin{description*}{}{} \baselineskip=0pt
79 \newenvironment{functions}
80 {% defining what is done by \begin
83 \begin{boxedminipage}[c]{14cm}
85 \begin{description*}{}{}
87 {% defining what is done by \end
97 % Wrapper for shell command, functions, filenames, links,
98 % variables, macros, and everything can be useul,
100 \newcommand{\cmd}[1]{\texttt{#1}} % shell command
101 \newcommand{\code}[1]{\texttt{#1}} % for simple code
102 \newcommand{\func}[1]{%
103 \index{#1@{{\tt {#1}} (funzione)}}\texttt{#1}%
105 \newcommand{\funcd}[1]{%
106 \index{#1@{{\tt {#1}} (funzione)}!definizione di}\texttt{#1}%
108 \newcommand{\macro}[1]{%
109 \index{#1@{{\tt {#1}} (macro)}}\texttt{#1}%
111 \newcommand{\errcode}[1]{%
112 \index{#1@{{\tt {#1}} (errore)}}\texttt{#1}%
114 \newcommand{\errval}[1]{\texttt{#1}} % value
115 \newcommand{\var}[1]{\texttt{#1}} % variable
116 \newcommand{\val}[1]{\texttt{#1}} % value
117 \newcommand{\const}[1]{%
118 \index{#1@{{\tt {#1}} (costante)}}\texttt{#1}%
120 \newcommand{\direct}[1]{%
121 \index{#1@{{\tt {#1}} (direttiva)}}\texttt{#1}%
123 \newcommand{\file}[1]{\texttt{#1}} % file name
124 \newcommand{\link}[1]{\texttt{#1}} % html link
125 \newcommand{\ctyp}[1]{\texttt{#1}} % C standard type
126 \newcommand{\type}[1]{%
127 \index{#1@{{\tt {#1}} (tipo)}}\texttt{#1}%
129 \newcommand{\struct}[1]{%
130 \index{#1@{{\tt {#1}} (struttura dati)}}\texttt{#1}%
132 \newcommand{\structd}[1]{%
133 \index{#1@{{\tt {#1}} (struttura dati)}!definizione di}\texttt{#1}%
135 \newcommand{\param}[1]{\texttt{#1}} % function parameter
136 \newcommand{\acr}[1]{\textsl{#1}} % acrostic (for pid, suid, etc.)
139 % Aggiunte di Mirko per la gestione delle tabelle complicate come immagini
140 % nella traslazione in HTML
141 \newenvironment{usepicture}{}{}{}{}
145 %%% TeX-master: "gapil"