File: printfh.inc

package info (click to toggle)
fpc 2.0.0-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 89,476 kB
  • ctags: 133,433
  • sloc: pascal: 1,075,377; makefile: 310,704; xml: 64,343; perl: 7,703; yacc: 3,297; ansic: 2,265; lex: 839; php: 447; sh: 412; sed: 132; asm: 71; csh: 34; cpp: 26; tcl: 7
file content (45 lines) | stat: -rw-r--r-- 1,550 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

type
   Pprintf_info = ^printf_info;
   printf_info = record
        prec : longint;
        width : longint;
        spec : wchar_t;
        flag0 : dword;
        pad : wchar_t;
     end;

  printf_function = function(__stream: PIOFile; const __info: printf_info; __args: PPointer): Integer; cdecl;
  printf_arginfo_function = function(const __info: printf_info; __n: size_t; var __argtypes: Integer): Integer; cdecl;

function register_printf_function(__spec:longint; __func:printf_function; __arginfo:printf_arginfo_function):longint;cdecl;external clib name 'register_printf_function';
function parse_printf_format(__fmt:Pchar; __n:size_t; __argtypes:Plongint):size_t;cdecl;external clib name 'parse_printf_format';

Const
  PA_INT = 0;
  PA_CHAR = 1;
  PA_WCHAR = 2;
  PA_STRING = 3;
  PA_WSTRING = 4;
  PA_POINTER = 5;
  PA_FLOAT = 6;
  PA_DOUBLE = 7;
  PA_LAST = 8;

  PA_FLAG_MASK = $ff00;
  PA_FLAG_LONG_LONG = 1 shl 8;
  PA_FLAG_LONG_DOUBLE = PA_FLAG_LONG_LONG;
  PA_FLAG_LONG = 1 shl 9;
  PA_FLAG_SHORT = 1 shl 10;
  PA_FLAG_PTR = 1 shl 11;

function printf_size(__fp:PFILE; __info:Pprintf_info; __args:Ppointer):longint;cdecl;external clib name 'printf_size';
function printf_size_info(__info:Pprintf_info; __n:size_t; __argtypes:Plongint):longint;cdecl;external clib name 'printf_size_info';

{ ---------------------------------------------------------------------
    Borland compatibility types
  ---------------------------------------------------------------------}

Type
  TPrintfInfo = printf_info;
  PPrintfInfo = ^TPrintfInfo;