Change ncurses packaging
[openwrt.git] / package / lcd4linux / patches / patch-drv_generic_parport_c
1 --- lcd4linux-0.10.0-RC1/drv_generic_parport.c 2005-01-06 17:54:54.000000000 +0100
2 +++ lcd/drv_generic_parport.c 2005-03-20 01:20:48.052255953 +0100
3 @@ -359,13 +359,12 @@
4 #ifdef WITH_PPDEV
5 if (PPdev) {
6 ioctl (PPfd, PPDATADIR, &direction);
7 - } else
8 + }
9 +#else
10 + /* code stolen from linux/parport_pc.h */
11 + ctr = (ctr & ~0x20) ^ (direction?0x20:0x00);
12 + outb (ctr, Port+2);
13 #endif
14 - {
15 - /* code stolen from linux/parport_pc.h */
16 - ctr = (ctr & ~0x20) ^ (direction?0x20:0x00);
17 - outb (ctr, Port+2);
18 - }
19 }
20
21
22 @@ -383,11 +382,10 @@
23 #ifdef WITH_PPDEV
24 if (PPdev) {
25 ioctl (PPfd, PPRSTATUS, &data);
26 - } else
27 + }
28 +#else
29 + data = inb (Port+1);
30 #endif
31 - {
32 - data = inb (Port+1);
33 - }
34
35 /* clear unused bits */
36 data &= mask;
37 @@ -413,13 +411,12 @@
38 frob.mask=mask;
39 frob.val=val;
40 ioctl (PPfd, PPFCONTROL, &frob);
41 - } else
42 + }
43 +#else
44 + /* code stolen from linux/parport_pc.h */
45 + ctr = (ctr & ~mask) ^ val;
46 + outb (ctr, Port+2);
47 #endif
48 - {
49 - /* code stolen from linux/parport_pc.h */
50 - ctr = (ctr & ~mask) ^ val;
51 - outb (ctr, Port+2);
52 - }
53 }
54
55
56 @@ -456,9 +453,9 @@
57 frob.val = value2;
58 ioctl (PPfd, PPFCONTROL, &frob);
59
60 - } else
61 -#endif
62 - {
63 + }
64 +#else
65 +
66 /* rise */
67 ctr = (ctr & ~bits) ^ value1;
68 outb (ctr, Port+2);
69 @@ -469,7 +466,8 @@
70 /* lower */
71 ctr = (ctr & ~bits) ^ value2;
72 outb (ctr, Port+2);
73 - }
74 +
75 +#endif
76 }
77
78
79 @@ -478,11 +476,11 @@
80 #ifdef WITH_PPDEV
81 if (PPdev) {
82 ioctl(PPfd, PPWDATA, &data);
83 - } else
84 + }
85 +#else
86 + outb (data, Port);
87 #endif
88 - {
89 - outb (data, Port);
90 - }
91 +
92 }
93
94 unsigned char drv_generic_parport_read (void)
95 @@ -492,11 +490,10 @@
96 #ifdef WITH_PPDEV
97 if (PPdev) {
98 ioctl (PPfd, PPRDATA, &data);
99 - } else
100 + }
101 +#else
102 + data=inb (Port);
103 #endif
104 - {
105 - data=inb (Port);
106 - }
107 return data;
108 }
109
This page took 0.061814 seconds and 5 git commands to generate.