mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 21:19:26 +02:00
+ Added functional overview
This commit is contained in:
parent
02f4ff7414
commit
20167d65fd
74
docs/dos.tex
74
docs/dos.tex
@ -31,10 +31,12 @@ Under non-\dos systems, some of the functionality is lost, as it is either impos
|
||||
or meaningless to implement it. Other than that, the functionality for all
|
||||
operating systems is the same.
|
||||
|
||||
This chapter is divided in two sections:
|
||||
This chapter is divided in three sections:
|
||||
\begin{itemize}
|
||||
\item The first section lists the pre-defined constants, types and variables.
|
||||
\item The second section describes the functions which appear in the
|
||||
\item The second section gives an overview of all functions available,
|
||||
grouped by category.
|
||||
\item The third section describes the functions which appear in the
|
||||
interface part of the DOS unit.
|
||||
\end{itemize}
|
||||
|
||||
@ -183,6 +185,74 @@ Other values are possible, but are not documented.
|
||||
%\end{verbatim}
|
||||
%This variable is defined in the \linux version of the \dos unit. It is used
|
||||
%in the \seef{DiskFree} and \seef{DiskSize} calls.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Functions and procedures by category
|
||||
\section{Function list by category}
|
||||
What follows is a listing of the available functions, grouped by category.
|
||||
For each function there is a reference to the page where you can find the
|
||||
function.
|
||||
|
||||
\subsection{File handling}
|
||||
Routines to handle files on disk.
|
||||
\begin{funclist}
|
||||
\funcrefl{FExpand}{Dos:FExpand}{Expand filename to full path}
|
||||
\procref{FindClose}{Close finfirst/findnext session}
|
||||
\procref{FindFirst}{Start find of file}
|
||||
\procref{FindNext}{Find next file}
|
||||
\funcrefl{FSearch}{Dos:FSearch}{Search for file in a path}
|
||||
\procref{FSplit}{Split filename in parts}
|
||||
\procref{GetFAttr}{Return file attributes}
|
||||
\procref{GetFTime}{Return file time}
|
||||
\funcref{GetLongName}{Convert short filename to long filename}
|
||||
\funcref{GetShortName}{Convert long filename to short filename}
|
||||
\procref{SetFAttr}{Set file attributes}
|
||||
\procref{SetFTime}{Set file time}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Directory and disk handling}
|
||||
Routines to handle disk information.
|
||||
\begin{funclist}
|
||||
\procref{AddDisk}{Add disk to list of disks}
|
||||
\funcref{DiskFree}{Return size of free disk space}
|
||||
\funcref{DiskSize}{Return total disk size}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Process handling}
|
||||
Functions to handle process information and starting new processes.
|
||||
\begin{funclist}
|
||||
\funcref{DosExitCode}{Exit code of last executed program}
|
||||
\funcref{EnvCount}{Return number of environment variables}
|
||||
\funcref{EnvStr}{Return environment string pair}
|
||||
\procref{Exec}{Execute program}
|
||||
\funcrefl{GetEnv}{Dos:GetEnv}{Return specified environment string}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{System information}
|
||||
Functions for retrieving and setting general system information such as date
|
||||
and time.
|
||||
\begin{funclist}
|
||||
\funcref{DosVersion}{Get OS version}
|
||||
\procref{GetCBreak}{Get setting of control-break handling flag}
|
||||
\procrefl{GetDate}{Dos:GetDate}{Get system date}
|
||||
\procref{GetIntVec}{Get interrupt vector status}
|
||||
\procrefl{GetTime}{Dos:GetTime}{Get system time}
|
||||
\procref{GetVerify}{Get verify flag}
|
||||
\procref{Intr}{Execute an interrupt}
|
||||
\procref{Keep}{Keep process in memory and exit}
|
||||
\procref{MSDos}{Execute MS-dos function call}
|
||||
\procref{PackTime}{Pack time for file time}
|
||||
\procref{SetCBreak}{Set control-break handling flag}
|
||||
\procref{SetDate}{Set system date}
|
||||
\procref{SetIntVec}{Set interrupt vectors}
|
||||
\procref{SetTime}{Set system time}
|
||||
\procref{SetVerify}{Set verify flag}
|
||||
\procref{SwapVectors}{Swap interrupt vectors}
|
||||
\procref{UnPackTime}{Unpack file time}
|
||||
\end{funclist}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Functions and procedures
|
||||
\section{Functions and Procedures}
|
||||
\begin{procedure}{AddDisk}
|
||||
\Declaration
|
||||
|
190
docs/linux.tex
190
docs/linux.tex
@ -24,11 +24,13 @@
|
||||
\FPCexampledir{linuxex}
|
||||
This chapter describes the LINUX unit for Free Pascal. The unit was written
|
||||
by Micha\"el van Canneyt. It works only on the Linux operating system.
|
||||
This chapter is divided in 2 sections:
|
||||
This chapter is divided in 3 sections:
|
||||
\begin{itemize}
|
||||
\item The first section lists all constants, types and variables, as listed
|
||||
in the interface section of the LINUX unit.
|
||||
\item The second section describes all procedures and functions in the LINUX
|
||||
\item The second section gives and overview of all available functions,
|
||||
grouped by category.
|
||||
\item The third section describes all procedures and functions in the LINUX
|
||||
unit.
|
||||
\end{itemize}
|
||||
|
||||
@ -452,6 +454,190 @@ and the following constants to specify the type of mapping.
|
||||
MAP_ANONYMOUS = $20; { don't use a file }
|
||||
\end{verbatim}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Functions and procedures by category
|
||||
\section{Function list by category}
|
||||
What follows is a listing of the available functions, grouped by category.
|
||||
For each function there is a reference to the page where you can find the
|
||||
function.
|
||||
\subsection{File Input/Output routines}
|
||||
Functions for handling file input/output.
|
||||
\begin{funclist}
|
||||
\funcref{Dup}{Duplicate a file handle}
|
||||
\funcref{Dup2}{Copy one file handle to another}
|
||||
\procref{Fcntl}{General file control}
|
||||
\funcref{fdClose}{Close file descriptor}
|
||||
\funcref{fdFlush}{Flush file descriptor}
|
||||
\funcref{fdOpen}{Open new file descriptor}
|
||||
\funcref{fdRead}{Read from file descriptor}
|
||||
\funcref{fdSeek}{Position in file}
|
||||
\funcref{fdTruncate}{Truncate file}
|
||||
\funcref{fdWrite}{Write to file descriptor}
|
||||
\funcref{GetFS}{Get file descriptor of pascal file}
|
||||
\funcref{Select}{Wait for input from file descriptor}
|
||||
\funcref{SelectText}{Wait for input from pascal file}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{General File handling routines}
|
||||
Functions for handling files on disk.
|
||||
\begin{funclist}
|
||||
\funcref{Access}{Check access rights on file}
|
||||
\funcref{BaseName}{Return name part of file}
|
||||
\funcref{Chown}{Change owner of file}
|
||||
\funcref{Chmod}{Change access rights on file}
|
||||
\funcref{DirName}{Return directory part of file}
|
||||
\procrefl{FSplit}{LFsplit}{Split filename in parts}
|
||||
\funcref{FExpand}{Return full-grown filename}
|
||||
\funcref{FLock}{Set lock on a file}
|
||||
\funcref{FNMatch}{Match filename to searchpattern}
|
||||
\funcref{FSearch}{Search for a file in a path}
|
||||
\funcref{FSStat}{Return filesystem information}
|
||||
\funcref{FStat}{Return file information}
|
||||
\funcref{FRename}{Rename file}
|
||||
\funcref{LStat}{Return information on a link}
|
||||
\funcref{Link}{Create a link}
|
||||
\funcref{ReadLink}{Read contents of a symbolic link}
|
||||
\funcref{SymLink}{Create a symbolic link}
|
||||
\funcref{Umask}{Set the file creation mask}
|
||||
\funcref{UnLink}{Remove a file}
|
||||
\funcref{Utime}{Change file timestamps}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Pipes, FIFOs and streams }
|
||||
Functions for creating and managing pipes.
|
||||
\begin{funclist}
|
||||
\funcref{AssignPipe}{Create a pipe}
|
||||
\funcref{AssignStream}{Create pipes to program's input and output}
|
||||
\funcref{MkFifo}{Make a fifo}
|
||||
\funcref{PClose}{Close a pipe}
|
||||
\procref{POpen}{Open a pipe for to program's input or output}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Directory handling routines}
|
||||
Functions for reading and searching directories.
|
||||
\begin{funclist}
|
||||
\funcref{CloseDir}{Close directory handle}
|
||||
\funcref{Glob}{Return files matching a search expression}
|
||||
\procref{GlobFree}{Free result of Glob}
|
||||
\funcref{OpenDir}{Open directory for reading}
|
||||
\funcref{ReadDir}{Read directory entry}
|
||||
\procref{SeekDir}{Seek directory}
|
||||
\funcref{TellDir}{Seek directory}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Process handling}
|
||||
Functions for managing processes and programs.
|
||||
\begin{funclist}
|
||||
\funcref{Clone}{Create a thread}
|
||||
\procref{Execl}{Execute process with command-line list}
|
||||
\procref{Execle}{Execute process with command-line list and environment}
|
||||
\procref{Execlp}{Search in path and execute process with command list}
|
||||
\procref{Execv}{Execute process}
|
||||
\procref{Execve}{Execute process with environment}
|
||||
\procref{Execvp}{Search in path and execute process}
|
||||
\funcref{Fork}{Spawn child process}
|
||||
\funcref{GetEGid}{Get effective group id}
|
||||
\funcref{GetEnv}{Get environment variable}
|
||||
\funcref{GetEUid}{Get effective user id}
|
||||
\funcref{GetGid}{Get group id}
|
||||
\funcref{GetPid}{Get process id}
|
||||
\funcref{GetPPid}{Get parent process id}
|
||||
\funcref{GetPriority}{Get process priority}
|
||||
\funcref{GetUid}{Get user id}
|
||||
\procref{Nice}{Change priority of process}
|
||||
\funcref{SetPriority}{Change priority of process}
|
||||
\funcref{Shell}{Execute shell command}
|
||||
\funcref{WaitPid}{Wait for child process to terminate}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Signals}
|
||||
Functions for managing and responding to signals.
|
||||
\begin{funclist}
|
||||
\funcref{Alarm}{Send alarm signal to self}
|
||||
\funcref{Kill}{Send arbitrary signal to process}
|
||||
\procref{pause}{Wait for signal to arrive}
|
||||
\procref{SigAction}{Set signal action}
|
||||
\funcref{Signal}{Set signal action}
|
||||
\funcref{SigPending}{See if signals are waiting}
|
||||
\procref{SigProcMask}{Set signal processing mask}
|
||||
\procref{SigRaise}{Send signal to self}
|
||||
\procref{SigSuspend}{Sets signal mask and waits for signal}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{System information}
|
||||
Functions for retrieving system information such as date and time.
|
||||
\begin{funclist}
|
||||
\procref{GetDate}{Return system date}
|
||||
\procref{GetDateTime}{Return system date and time}
|
||||
\funcref{GetDomainName}{Return system domain name}
|
||||
\funcref{GetEpochTime}{Return epoch time}
|
||||
\funcref{GetHostName}{Return system host name}
|
||||
\procref{GetLocalTimezone}{Return system timezone}
|
||||
\procref{GetTime}{Return system time}
|
||||
\funcref{GetTimeOfDay}{Return system time}
|
||||
\funcref{GetTimezoneFile}{Return name of timezone file}
|
||||
\procref{ReadTimezoneFile}{Read timezone file contents}
|
||||
\funcref{SysInfo}{Return general system information}
|
||||
\procref{Uname}{Return system information}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Terminal functions}
|
||||
Functions for controlling the terminal to which the process is connected.
|
||||
|
||||
\begin{funclist}
|
||||
\procref{CFMakeRaw}{Set terminal to raw mode}
|
||||
\procref{CFSetISpeed}{Set terminal reading speed}
|
||||
\procref{CFSetOSpeed}{Set terminal writing speed}
|
||||
\procref{IOCtl}{General IO control call}
|
||||
\funcref{IsATTY}{See if filedescriptor is a terminal}
|
||||
\funcref{TCDrain}{Wait till all output was written}
|
||||
\funcref{TCFlow}{Suspend transmission or receipt of data}
|
||||
\funcref{TCFlush}{Discard data written to terminal}
|
||||
\funcref{TCGetAttr}{Get terminal attributes}
|
||||
\funcref{TCGetPGrp}{Return PID of foreground process}
|
||||
\funcref{TCSendBreak}{Send data for specific time}
|
||||
\funcref{TCSetAttr}{Set terminal attributes}
|
||||
\funcref{TCSetPGrp}{Set foreground process}
|
||||
\funcref{TTYName}{Name of tty file}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Port input/output}
|
||||
Functions for reading and writing to the hardware ports.
|
||||
\begin{funclist}
|
||||
\funcref{IOperm}{Set permissions for port access}
|
||||
\procref{ReadPort}{Read data from port}
|
||||
\procref{ReadPortB}{Read 1 byte from port}
|
||||
\procref{ReadPortL}{Read 4 bytes from port}
|
||||
\procref{ReadPortW}{Read 2 bytes from port}
|
||||
\procref{WritePort}{Write data to port}
|
||||
\procref{WritePortB}{Write 1 byte to port}
|
||||
\procref{WritePortL}{Write 4 bytes to port}
|
||||
\procref{WritePortW}{Write 2 bytes to port}
|
||||
\end{funclist}
|
||||
|
||||
\subsection{Utility routines}
|
||||
Auxiliary functions that are useful in connection with the other functions.
|
||||
\begin{funclist}
|
||||
\funcref{CreateShellArgV}{Create an array of pchars from string}
|
||||
\procref{EpochToLocal}{Convert epoch time to local time}
|
||||
\procrefl{FD\_Clr}{FDClr}{Clear item of select filedescriptors}
|
||||
\funcrefl{FD\_IsSet}{FDIsSet}{Check item of select filedescriptors}
|
||||
\procrefl{FD\_Set}{FDSet}{Set item of select filedescriptors}
|
||||
\procrefl{FD\_ZERO}{FDZero}{Clear all items in select filedecriptors}
|
||||
\funcref{LocalToEpoch}{Convert local time to epoch time}
|
||||
\funcref{MMap}{Map a file into memory}
|
||||
\funcref{MUnMap}{Unmap previously mapped memory file}
|
||||
\funcref{Octal}{Convert octal to digital}
|
||||
\funcrefl{S\_ISBLK}{ISBLK}{Check file mode for block device}
|
||||
\funcrefl{S\_ISCHR}{ISCHR}{Check file mode for character device}
|
||||
\funcrefl{S\_ISDIR}{ISDIR}{Check file mode for directory}
|
||||
\funcrefl{S\_ISFIFO}{ISFIFO}{Check file mode for FIFO}
|
||||
\funcrefl{S\_ISLNK}{ISLNK}{Check file mode for symboloc link}
|
||||
\funcrefl{S\_ISREG}{ISREG}{Check file mode for regular file}
|
||||
\funcrefl{S\_ISSOCK}{ISSOCK}{Check file mode for socket}
|
||||
\funcref{StringToPPchar}{Create an array of pchars from string}
|
||||
\end{funclist}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Functions and procedures
|
||||
\section{Functions and procedures}
|
||||
|
@ -26,7 +26,9 @@ was initially written by Florian Klaempfl. It provides mathematical
|
||||
functions which aren't covered by the system unit.
|
||||
|
||||
This chapter starts out with a definition of all types and constants
|
||||
that are defined, followed by a complete explanation of each function.
|
||||
that are defined, after which an overview is presented of the available
|
||||
functions, grouped by category, and the last part contains a
|
||||
complete explanation of each function.
|
||||
|
||||
The following things must be taken into account when using this unit:
|
||||
\begin{enumerate}
|
||||
@ -65,7 +67,7 @@ The \var{EInvalidArgument} exception is used to report invalid arguments.
|
||||
|
||||
\section{Function list by category}
|
||||
What follows is a listing of the available functions, grouped by category.
|
||||
Foe each function there is a reference to the page where you can find the
|
||||
For each function there is a reference to the page where you can find the
|
||||
function.
|
||||
\subsection{Min/max determination}
|
||||
Functions to determine the minimum or maximum of numbers:
|
||||
|
Loading…
Reference in New Issue
Block a user