Mail Archives: djgpp-workers/2001/08/04/14:15:41
----- Forwarded message from cvs-snowball AT delorie DOT com -----
Modified Files:
ttyprvt.h
Log Message:
Add structures tty_screen_info and tty_screen_interface.
Add external variables used by the termios emulation.
===================================================================
RCS file: /cvs/djgpp/djgpp/include/libc/ttyprvt.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -p -2 -r1.4 -r1.5
*************** struct tty_editline
*** 48,51 ****
--- 49,94 ----
};
+ /* Information about the screen. */
+ struct tty_screen_info
+ {
+ unsigned char init_attrib;
+ unsigned char attrib;
+ int max_row;
+ int max_col;
+ unsigned char active_page;
+ unsigned int norm_blink : 1;
+ unsigned int cur_blink : 1;
+ void (*set_cursor)(int col, int row);
+ void (*get_cursor)(int *col, int *row);
+ };
+
+
+ /* Pointers to functions that manipulate the screen. */
+
+ struct tty_screen_interface
+ {
+ /* Initialize the interface, if required. */
+ void (*init)(void);
+ /* Write a character and update col and row.
+ May or may not update the cursor. */
+ void (*write_ch)(unsigned char ch, int *col, int *row);
+ /* Write a character and update the cursor. */
+ void (*putch)(unsigned char ch);
+ /* Write a character without updating the cursor. */
+ void (*putch_at)(unsigned char ch);
+ /* Write out a null-terminated string. */
+ void (*puts)(const unsigned char *s);
+ /* Scroll the lines y1 through y2 up to ydst. */
+ void (*scroll_up)(int y1, int y2, int ydst);
+ /* Scroll the lines y1 through y2 down to ydst. */
+ void (*scroll_down)(int y1, int y2, int ydst);
+ /* Scroll the characters between x1 and x2 right to xdst on line y. */
+ void (*scroll_left)(int y, int x1, int x2, int xdst);
+ /* Scroll the characters between x1 and x2 left to xdst on line y. */
+ void (*scroll_right)(int y, int x1, int x2, int xdst);
+ /* Clear the space between (x1, y1) and (x2, y2). */
+ void (*clear)(int x1, int y1, int x2, int y2);
+ };
+
#if !defined (_POSIX_VDISABLE) || (_POSIX_VDISABLE == 0)
#error _POSIX_VDISABLE is undefine or zero.
Have you tried recompiling all libc with this?
It fails for me:
gcc ... -c doprnt.c
cc1.exe: warnings being treated as errors
In file included from ../../../../include/libc/file.h:9,
from doprnt.c:15:
../../../../include/libc/ttyprvt.h:82: warning: declaration of `y1' shadows global declaration
../../../../include/libc/ttyprvt.h:84: warning: declaration of `y1' shadows global declaration
../../../../include/libc/ttyprvt.h:90: warning: declaration of `y1' shadows global declaration
make.exe[3]: *** [doprnt.o] Error 1
make.exe[2]: *** [all_subs] Error 2
make.exe[1]: *** [all] Error 2
make.exe: *** [subs] Error 2
And shouldn't the parameter names be prepended by "_" anyway?
Right,
MartinS
- Raw text -