printfh.inc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. type
  2. Pprintf_info = ^printf_info;
  3. printf_info = record
  4. prec : longint;
  5. width : longint;
  6. spec : wchar_t;
  7. flag0 : dword;
  8. pad : wchar_t;
  9. end;
  10. printf_function = function(__stream: PIOFile; const __info: printf_info; __args: PPointer): Integer; cdecl;
  11. printf_arginfo_function = function(const __info: printf_info; __n: size_t; var __argtypes: Integer): Integer; cdecl;
  12. function register_printf_function(__spec:longint; __func:printf_function; __arginfo:printf_arginfo_function):longint;cdecl;external clib name 'register_printf_function';
  13. function parse_printf_format(__fmt:Pchar; __n:size_t; __argtypes:Plongint):size_t;cdecl;external clib name 'parse_printf_format';
  14. Const
  15. PA_INT = 0;
  16. PA_CHAR = 1;
  17. PA_WCHAR = 2;
  18. PA_STRING = 3;
  19. PA_WSTRING = 4;
  20. PA_POINTER = 5;
  21. PA_FLOAT = 6;
  22. PA_DOUBLE = 7;
  23. PA_LAST = 8;
  24. PA_FLAG_MASK = $ff00;
  25. PA_FLAG_LONG_LONG = 1 shl 8;
  26. PA_FLAG_LONG_DOUBLE = PA_FLAG_LONG_LONG;
  27. PA_FLAG_LONG = 1 shl 9;
  28. PA_FLAG_SHORT = 1 shl 10;
  29. PA_FLAG_PTR = 1 shl 11;
  30. function printf_size(__fp:PFILE; __info:Pprintf_info; __args:Ppointer):longint;cdecl;external clib name 'printf_size';
  31. function printf_size_info(__info:Pprintf_info; __n:size_t; __argtypes:Plongint):longint;cdecl;external clib name 'printf_size_info';
  32. { ---------------------------------------------------------------------
  33. Borland compatibility types
  34. ---------------------------------------------------------------------}
  35. Type
  36. TPrintfInfo = printf_info;
  37. PPrintfInfo = ^TPrintfInfo;