2 * Copyright (C) 2012, The AROS Development Team. All rights reserved.
3 * Author: Jason S. McMullan <jason.mcmullan@gmail.com>
5 * Licensed under the AROS PUBLIC LICENSE (APL) Version 1.1
9 #include <proto/exec.h>
10 #include <devices/prtbase.h>
12 #include <aros/shcommands.h>
14 AROS_SH0(printerinfo
, 1.0)
22 struct Library
*DOSBase
;
24 if (!(DOSBase
= OpenLibrary("dos.library", 0)))
27 if (!(ra
= ReadArgs("FILE", (IPTR
*)&Args
, NULL
)))
31 BPTR seg
= LoadSeg(Args
.file
);
33 struct PrinterSegment
*pseg
= BADDR(seg
);
34 struct PrinterExtendedData
*ped
= &pseg
->ps_PED
;
38 Printf(" ps_runAlert = 0x%08lx\n", pseg
->ps_runAlert
);
39 Printf(" ps_Version = %ld\n", pseg
->ps_Version
);
40 Printf(" ps_Revision = %ld\n", pseg
->ps_Revision
);
41 Printf(" ped_PrinterName = \"%s\"\n", ped
->ped_PrinterName
);
43 Printf(" ped_DoSpecial= 0x%08lx\n", ped
->ped_DoSpecial
);
44 Printf(" ped_ConvFunc = 0x%08lx\n", ped
->ped_ConvFunc
);
45 Printf(" ped_Commands = 0x%08lx\n", ped
->ped_Commands
);
46 for (i
= 0; i
< 76; i
++) {
47 if (ped
->ped_Commands
[i
][0] == 255)
49 Printf(" ped_Commands[%ld] = \"%s\"\n", i
, ped
->ped_Commands
[i
]);
57 CloseLibrary(DOSBase
);