qdosh.inc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2020 by Karoly Balogh
  4. Types and Constants used by QDOS OS functions in the Sinclair QL RTL
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. type
  12. Tchanid = longint;
  13. Tjobid = longint;
  14. Ttimeout = smallint;
  15. const
  16. ERR_NC = -1; { Operation not complete }
  17. ERR_NJ = -2; { Not a (valid) job. }
  18. ERR_OM = -3; { Out of memory. }
  19. ERR_OR = -4; { Out of range. }
  20. ERR_BO = -5; { Buffer overflow. }
  21. ERR_NO = -6; { Channel not open. }
  22. ERR_NF = -7; { File or device not found. }
  23. ERR_FX = -8; { File already exists. }
  24. ERR_IU = -9; { File or device already in use. }
  25. ERR_EF = -10; { End of file. }
  26. ERR_DF = -11; { Drive full. }
  27. ERR_BN = -12; { Bad device. }
  28. ERR_TE = -13; { Transmission error. }
  29. ERR_FF = -14; { Format failed. }
  30. ERR_BP = -15; { Bad parameter. }
  31. ERR_FE = -16; { File error. }
  32. ERR_EX = -17; { Expression error. }
  33. ERR_OV = -18; { Arithmetic overflow. }
  34. ERR_NI = -19; { Not implemented. }
  35. ERR_RO = -20; { Read only. }
  36. ERR_BL = -21; { Bad line of Basic. }
  37. const
  38. Q_OPEN = 0;
  39. Q_OPEN_IN = 1;
  40. Q_OPEN_NEW = 2;
  41. Q_OPEN_OVER = 3; { Not available on microdrives. }
  42. Q_OPEN_DIR = 4;
  43. type
  44. Tqlfloat = array[0..5] of byte;
  45. Pqlfloat = ^Tqlfloat;
  46. type
  47. TQLRect = record
  48. q_width : word;
  49. q_height : word;
  50. q_x : word;
  51. q_y : word;
  52. end;
  53. PQLRect = ^TQLRect;
  54. type
  55. TWindowDef = record
  56. border_colour : byte;
  57. border_width : byte;
  58. paper : byte;
  59. ink : byte;
  60. width : word;
  61. height : word;
  62. x_origin: word;
  63. y_origin: word;
  64. end;
  65. PWindowDef = ^TWindowDef;