Use TARGET_STRIP instead of STRIP. Needed on OS X.
[AROS.git] / test / printer / printertxt.c
blobba16399c935548202328ad79daa9b7343eb59057
1 /*
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
6 */
8 #include <proto/dos.h>
9 #include <proto/exec.h>
10 #include <devices/prtbase.h>
12 TEXT const printertxt[] =
13 "aRIS\033c\n"
14 "aRIN\033#1\n"
15 "aIND\033DaIND\n"
16 "aNEL\033EaNEL\n"
17 "aRI\033MaRI\n"
18 "\n"
19 "aSGR: \033[3m italics\033[4m italic underline\033[1m italic underline bold\n"
20 " \033[23m underline bold\033[24m bold\033[22m normal\033[4m underline\n"
21 " \033[0m normal\n"
22 "aSFC \033[30mblack \033[31mred \033[32mgreen \033[33myellow \033[34mblue \033[35md. gray \033[36mcyan \033[37ml. gray\033[0m\n"
23 "aSBC \033[40m\033[39mblack \033[41m\033[30mred \033[42mgreen \033[43myellow \033[44mblue \033[45md. gray \033[46mcyan \033[47ml. gray\033[0m\n"
24 "aSHOR elite \033[2wis abcdefg on \033[1wthen off\n"
25 " cond. \033[4wis abcdefg on \033[3wthen off\n"
26 " enla \033[6wis abcdefg on \033[5wthen off\n"
27 "aDEN shadow \033[6\"zis on \033[5\"zthen off\n"
28 " double \033[4\"zis on \033[3\"zthen off\n"
29 " NLQ \033[2\"zis on \033[1\"zthen off\n"
30 "\n"
31 "aSUS super \033[2vis on \033[1vthen off\n"
32 " subs \033[4vis on \033[3vthen off\n\n"
33 " both \033[2vsuper \033[4vboth \033[0vneither\n"
34 "\n"
35 "aPL \033L partial line up, \033K partial line down\n"
36 "\n"
37 "aFNT (test needs to be written)\n"
38 "aPROP prop \033[2pis on \033[1pthen off \033[0pthen to default\n"
39 "aTSS prop \033[2p\033[5Eproportional offset of 5\033[0p\n"
40 "aJFY left \033[5F\nleft justify this text\033[0F\n"
41 " right \033[7F\nright justify this text\033[0F\n"
42 " full \033[6F\nfull justify this text\033[0F\n"
43 " letter \033[3F\nletter justify this text\033[0F\n"
44 " center \033[1F\ncenter justify this text\033[0F\n"
45 "aVER 1/8\" \033[0zOne\n Eighth\n Inch\n Spacing\n"
46 " 1/6\" \033[1zOne\n Sixth\n Inch\n Spacing\n"
47 "aSLPP (test needs to be written)\n"
48 "a?MS (test needs to be written)\n"
51 __startup LONG _main(void)
53 struct MsgPort *mp;
54 LONG err = RETURN_FAIL;
55 struct Library *DOSBase;
57 if (!(DOSBase = OpenLibrary("dos.library", 0))) {
58 return RETURN_FAIL;
61 if ((mp = CreateMsgPort())) {
62 struct IORequest *io;
63 if ((io = CreateIORequest(mp, sizeof(*io)))) {
64 if (0 == OpenDevice("printer.device", 0, io, 0)) {
65 Printf("Printing test page to printer.device unit 0...\n");
66 struct IOStdReq *sio = (struct IOStdReq *)io;
67 sio->io_Command = CMD_WRITE;
68 sio->io_Data = (APTR)printertxt;
69 sio->io_Length = -1;
70 err = DoIO(io);
71 if (err != 0) {
72 Printf("\tFAILED (%d)\n", err);
73 err = RETURN_FAIL;
74 } else {
75 Printf("\tPASSED (please compare with printertxt.pdf)\n");
76 err = RETURN_OK;
78 CloseDevice(io);
79 } else {
80 Printf("Can't open printer.device unit 0\n");
82 DeleteIORequest(io);
83 } else {
84 Printf("Can't create IO request\n");
86 DeleteMsgPort(mp);
87 } else {
88 Printf("Can't create MsgPort\n");
91 CloseLibrary(DOSBase);
93 return err;