Системное программирование в UNIX средствами Free Pascal


Faster version when locking is

function getc_unlocked(__stream:pfile):integer;cdecl;external 'c';

function getchar_unlocked:integer;cdecl;external 'c';

(* Faster version when locking is not necessary.  *)

function fgetc_unlocked(__stream:pfile):integer;cdecl;external 'c';

(* Write a character to STREAM.  *)

function fputc(__c:integer;__stream:pfile):integer;cdecl;external 'c';

function putc(__c:integer;__stream:pfile):integer;cdecl;external 'c';

(* Write a character to stdout.  *)

function putchar(__c:integer):integer;cdecl;external 'c';

(* Faster version when locking is not necessary.  *)

function fputc_unlocked(__c:integer;__stream:pfile):integer;cdecl;external 'c';

(* These are defined in POSIX.1:1996.  *)

function putc_unlocked(__c:integer;__stream:pfile):integer;cdecl;external 'c';

function putchar_unlocked(__c:integer):integer;cdecl;external 'c';

(* Get a word (int) from STREAM.  *)

function getw(__stream:pfile):integer;cdecl;external 'c';

(* Write a word (int) to STREAM.  *)

function putw(__w:integer;__stream:pfile):integer;cdecl;external 'c';

(* Get a newline-terminated string of finite length from STREAM.  *)

function fgets(__s:pchar;__n:integer;__stream:pfile):pchar;cdecl;external 'c';

(* This function does the same as `fgets' but does not lock the stream.  *)

function fgets_unlocked(__s:pchar;__n:integer;__stream:pfile):pchar;cdecl;external 'c';

(* Get a newline-terminated string from stdin, removing the newline.

   DO NOT USE THIS FUNCTION!!  There is no limit on how much it will read.  *)

function gets(__s:pchar):pchar;cdecl;external 'c';

(* Read up to (and including) a DELIMITER from STREAM into *LINEPTR

   (and null-terminate it). *LINEPTR is a pointer returned from malloc (or

   NULL), pointing to *N characters of space.  It is realloc'd as

   necessary.  Returns the number of characters read (not including the

   null terminator), or -1 on error or EOF.  *)

function __getdelim(__lineptr:ppchar;__n:plongint;__delimiter:integer;

Содержание  Назад  Вперед