X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=process.tex;h=2376ec7d8617289e9c3d35f7a05d2d1faf4bec9a;hb=1eb95e2a35acc78407e7d988604719bb92da7253;hp=2e06276cc21cc13bd7609263e2ed4f590d325c24;hpb=e2bece451ff1f495d624ca89ad9d065ddd392bc6;p=gapil.git diff --git a/process.tex b/process.tex index 2e06276..2376ec7 100644 --- a/process.tex +++ b/process.tex @@ -1,6 +1,6 @@ %% process.tex %% -%% Copyright (C) 2000-2012 Simone Piccardi. Permission is granted to +%% Copyright (C) 2000-2013 Simone Piccardi. Permission is granted to %% copy, distribute and/or modify this document under the terms of the GNU Free %% Documentation License, Version 1.1 or any later version published by the %% Free Software Foundation; with the Invariant Sections being "Un preambolo", @@ -1966,22 +1966,22 @@ queste ed ulteriori variabili si può ottenere con il comando \cmd{man 7 & \textbf{Linux} & \textbf{Descrizione} \\ \hline \hline - \texttt{USER} &$\bullet$&$\bullet$&$\bullet$& Nome utente\\ - \texttt{LOGNAME}&$\bullet$&$\bullet$&$\bullet$& Nome di login\\ + \texttt{USER} &$\bullet$&$\bullet$&$\bullet$& Nome utente.\\ + \texttt{LOGNAME}&$\bullet$&$\bullet$&$\bullet$& Nome di login.\\ \texttt{HOME} &$\bullet$&$\bullet$&$\bullet$& Directory base - dell'utente\\ - \texttt{LANG} &$\bullet$&$\bullet$&$\bullet$& Localizzazione\\ + dell'utente.\\ + \texttt{LANG} &$\bullet$&$\bullet$&$\bullet$& Localizzazione.\\ \texttt{PATH} &$\bullet$&$\bullet$&$\bullet$& Elenco delle directory - dei programmi\\ - \texttt{PWD} &$\bullet$&$\bullet$&$\bullet$& Directory corrente\\ - \texttt{SHELL} &$\bullet$&$\bullet$&$\bullet$& Shell in uso\\ - \texttt{TERM} &$\bullet$&$\bullet$&$\bullet$& Tipo di terminale\\ + dei programmi.\\ + \texttt{PWD} &$\bullet$&$\bullet$&$\bullet$& Directory corrente.\\ + \texttt{SHELL} &$\bullet$&$\bullet$&$\bullet$& Shell in uso.\\ + \texttt{TERM} &$\bullet$&$\bullet$&$\bullet$& Tipo di terminale.\\ \texttt{PAGER} &$\bullet$&$\bullet$&$\bullet$& Programma per vedere i - testi\\ - \texttt{EDITOR} &$\bullet$&$\bullet$&$\bullet$& Editor preferito\\ - \texttt{BROWSER}&$\bullet$&$\bullet$&$\bullet$& Browser preferito\\ + testi.\\ + \texttt{EDITOR} &$\bullet$&$\bullet$&$\bullet$& Editor preferito.\\ + \texttt{BROWSER}&$\bullet$&$\bullet$&$\bullet$& Browser preferito.\\ \texttt{TMPDIR} &$\bullet$&$\bullet$&$\bullet$& Directory dei file - temporanei\\ + temporanei.\\ \hline \end{tabular} \caption{Esempi delle variabili di ambiente più comuni definite da vari @@ -2205,6 +2205,10 @@ versione ``\textsl{sicura}'' da zero. % TODO opzioni in formato esteso +% TODO trattare il vettore ausiliario e getauxval (vedi +% http://lwn.net/Articles/519085/) + + \section{Problematiche di programmazione generica} \label{sec:proc_gen_prog} @@ -2694,30 +2698,26 @@ una variabile per poi ristamparne il contenuto leggendolo un byte alla volta. Il codice di detto programma, \file{endtest.c}, è nei sorgenti allegati, allora se lo eseguiamo su un normale PC compatibile, che è \textit{little endian} otterremo qualcosa del tipo: -\begin{Command} -[piccardi@gont sources]$ ./endtest -\end{Command} -%$ -\begin{Terminal} +\begin{Console} +[piccardi@gont sources]$ \textbf{./endtest} Using value ABCDEF01 val[0]= 1 val[1]=EF val[2]=CD val[3]=AB -\end{Terminal} +\end{Console} +%$ mentre su un vecchio Macintosh con PowerPC, che è \textit{big endian} avremo qualcosa del tipo: -\begin{Command} -piccardi@anarres:~/gapil/sources$ ./endtest -\end{Command} -%$ -\begin{Terminal} +\begin{Console} +piccardi@anarres:~/gapil/sources$ \textbf{./endtest} Using value ABCDEF01 val[0]=AB val[1]=CD val[2]=EF val[3]= 1 -\end{Terminal} +\end{Console} +%$ L'attenzione alla \textit{endianness} nella programmazione è importante, perché se si fanno assunzioni relative alla propria architettura non è detto che