1634N/A--- a/src/ast_vgatool.h Thu Apr 28 20:32:02 2016
1634N/A+++ b/src/ast_vgatool.h Thu Apr 28 20:34:40 2016
1634N/A@@ -89,7 +89,7 @@
1634N/A .value = index, \
1634N/A .offset1 = off+1 \
1508N/A }; \
1634N/A- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
1634N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1508N/A val = io_reg.value; \
1508N/A } while (0)
1508N/A
1634N/A@@ -100,7 +100,7 @@
1634N/A .offset1 = off+1, \
1634N/A .value1 = val \
1508N/A }; \
1634N/A- ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
1634N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1508N/A } while (0)
1508N/A
1508N/A #define GetIndexRegMask(off, index, and, val) do { \
1634N/A@@ -109,7 +109,7 @@
1634N/A .value = index, \
1634N/A .offset1 = off+1 \
1508N/A }; \
1634N/A- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
1508N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1508N/A val = io_reg.value & and; \
1508N/A } while (0)
1508N/A
1634N/A@@ -120,13 +120,13 @@
1634N/A .value = index, \
1634N/A .offset1 = off+1 \
1508N/A }; \
1634N/A- ioctl(pAST->fd, VIS_GETINDEX, &io_reg); \
1634N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1508N/A __Temp = (io_reg.value & and) | val; \
1508N/A io_reg.offset = off; \
1508N/A io_reg.value = index; \
1634N/A io_reg.offset1 = off+1; \
1634N/A io_reg.value1 = __Temp; \
1634N/A- ioctl(pAST->fd, VIS_SETINDEX, &io_reg); \
1634N/A+ ioctl(pAST->fd, AST_GET_INDEX, &io_reg); \
1508N/A } while (0)
1508N/A
1508N/A #else /* !__sparc__ */
1634N/A--- a/src/ast.h Thu Apr 28 20:35:08 2016
1634N/A+++ b/src/ast.h Thu Apr 28 20:35:57 2016
1634N/A@@ -375,9 +375,19 @@
1508N/A #define VIS_SETIOREG (VIOC | 17)
1508N/A #define VIS_GETIOREG (VIOC | 18)
1508N/A
1508N/A+#ifdef __sparc
1508N/A+#define ASTIOC ('Y' << 8)
1508N/A+#define AST_GET_INDEX (ASTIOC | 14)
1508N/A+#define AST_SET_INDEX (ASTIOC | 15)
1508N/A+#endif
1508N/A+
1508N/A typedef struct vis_io_reg {
1508N/A uchar_t offset;
1508N/A uchar_t value;
1508N/A+#ifdef __sparc
1508N/A+ uchar_t offset1;
1508N/A+ uchar_t value1;
1508N/A+#endif
1508N/A } vis_io_reg_t;
1508N/A #endif
1508N/A