debian/0000755000000000000000000000000011741451735007176 5ustar debian/svgalib-bin.lintian-overrides0000644000000000000000000000047111642635364014757 0ustar # These programs do not work at all if they are not suid-root svgalib-bin: setuid-binary usr/bin/dumpreg 4755 root/root svgalib-bin: setuid-binary usr/bin/restorefont 4755 root/root svgalib-bin: setuid-binary usr/bin/restorepalette 4755 root/root svgalib-bin: setuid-binary usr/bin/restoretextmode 4755 root/root debian/libsvga1.dirs0000644000000000000000000000002011642634636011564 0ustar usr/lib etc/vga debian/libsvga1-dev.dirs0000644000000000000000000000006411161535335012340 0ustar usr/include usr/lib usr/share/doc/libsvga1/examples debian/svgalib-bin.init0000644000000000000000000000231111734774426012264 0ustar #!/bin/sh # ### BEGIN INIT INFO # Provides: svgalib-bin # Required-Start: $remote_fs # Required-Stop: # Should-Start: # Should-Stop: # Default-Start: S # Default-Stop: # Short-Description: svgalib-bin sysv init script # Description: save or load SVGA text mode state ### END INIT INFO # PATH=/bin:/usr/bin:/sbin:/usr/sbin N=/etc/init.d/svgalib-bin desc="SVGA text mode state" state_save=savetextmode state_load=textmode configfile=/etc/default/svgalib-bin [ -x "`which $state_save`" ] || exit 0 [ -e $configfile ] && . $configfile . /lib/lsb/init-functions case "$1" in restart|start) [ "$savetextmode" = no ] && exit 0 log_action_begin_msg "Saving $desc" $state_save > /dev/null log_action_end_msg $? ;; reload|force-reload) log_action_begin_msg "Loading $desc" $state_load > /dev/null log_action_end_msg $? ;; stop) : ;; status) if [ "$savetextmode" = no ]; then log_failure_msg "$desc saving and loading is disabled" exit 3 else log_success_msg "$desc saving and loading is enabled" exit 0 fi ;; *) echo "Usage: $N {start|stop|reload|force-reload|restart|status}" >&2 exit 1 ;; esac exit 0 debian/watch0000644000000000000000000000016611735000254010217 0ustar # Site Directory Pattern Version Script version=3 http://www.svgalib.org/svgalib-([\d.]*)\.tar\.gz debian uupdate debian/patches/0000755000000000000000000000000011735000254010612 5ustar debian/patches/003_fbdev.patch0000644000000000000000000000161111735000254013302 0ustar Index: b/utils/restorepalette.c =================================================================== --- a/utils/restorepalette.c +++ b/utils/restorepalette.c @@ -109,14 +109,18 @@ void main (int argc, char *argv[]) { int i; + int chipset; vga_init (); if (argc > 1) process_palette_file (argv); - if (vga_getcurrentchipset () != EGA) + /* robert@debian.org, May 26 2002: added check for chipset != FBDEV */ + chipset = vga_getcurrentchipset (); + if(chipset != EGA) { + if (chipset != FBDEV) /* Restore textmode/16-color mode palette */ for (i = 0; i < 16; i++) { @@ -133,9 +137,11 @@ main (int argc, char *argv[]) vga_setpalette (i, default_red[i], default_green[i], default_blue[i]); + if (chipset != FBDEV) { port_in (IS1_RC); delay (); port_out (0x20, ATT_IW); /* enable display */ + } } exit (0); } debian/patches/029_binutils-2.16.patch0000644000000000000000000000360111735000254014442 0ustar Author: Guillem Jover Index: b/src/libvga.h =================================================================== --- a/src/libvga.h +++ b/src/libvga.h @@ -303,8 +303,8 @@ static __inline__ void port_outw(int val static __inline__ void port_outl(int value, int port) { - __asm__ volatile ("outl %0,%1" - ::"a" ((unsigned long)value), "d" ((unsigned short) port)); + __asm__ volatile ("outl %0,%w1" + ::"a" ((unsigned int)value), "Nd" ((unsigned short) port)); } static __inline__ int port_in(int port) @@ -328,9 +328,9 @@ static __inline__ int port_inw(int port) static __inline__ int port_inl(int port) { unsigned int value; - __asm__ volatile("inl %1,%0" : + __asm__ volatile("inl %w1,%0" : "=a" (value) : - "d" ((unsigned short)port)); + "Nd" ((unsigned short)port)); return value; } Index: b/gl/inlstring.h =================================================================== --- a/gl/inlstring.h +++ b/gl/inlstring.h @@ -98,7 +98,7 @@ static inline void * "cmpl $12,%%edx\n\t" "jl 1f\n\t" /* if (count >= 12) */ - "movzbl %%al,%%ax\n\t" + "movzbl %%al,%%eax\n\t" "movl %%eax,%%ecx\n\t" "shll $8,%%ecx\n\t" /* c |= c << 8 */ "orl %%ecx,%%eax\n\t" @@ -236,7 +236,7 @@ static inline void * "cmpl $0,%%edx\n\t" /* none left? */ "jle 4f\n\t" /* finished */ - "mov %%ecx,%%eax\n\t" + "movl %%ecx,%%eax\n\t" "shrl $8,%%ecx\n\t" /* R in cl */ "3:\n\t" /* write last few pixels */ Index: b/gl/mem.S =================================================================== --- a/gl/mem.S +++ b/gl/mem.S @@ -76,7 +76,7 @@ ENTRY(memcpy4to3) jz 4f /* none left */ 3: movl (%esi),%eax - movw %eax,(%edi) + movw %ax,(%edi) shrl $16,%eax movb %al,2(%edi) addl $4,%esi debian/patches/011_open_gt_2.patch0000644000000000000000000002031511735000254014071 0ustar Index: b/src/gvga6400.c =================================================================== --- a/src/gvga6400.c +++ b/src/gvga6400.c @@ -178,7 +178,31 @@ static int gvga6400_test(void) int result = 0; int address; + /* Ensure that this open gets a file descriptor greater + * than 2, else problems can occur with stdio functions + * under certain strange conditions: */ + if ((fcntl(0,F_GETFD) == -1) && (open("/dev/null", O_RDONLY) == -1)) { + perror("/dev/null"); + exit(1); + } + if ((fcntl(1,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1)) { + perror("/dev/null"); + exit(1); + } + if ((fcntl(2,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1)) { + perror("/dev/null"); + exit(1); + } mem_fd = open("/dev/mem", O_RDONLY); + if (mem_fd == -1) { + perror("/dev/mem"); + exit(-1); + } + /* Ensure this file is closed if we were ever to exec something else... */ + if (fcntl(mem_fd, F_SETFD, 1) == -1) { + perror("fcntl"); + exit(-1); + } /* Changed to use valloc(). */ if ((vga_bios = valloc(4096)) == NULL) { Index: b/src/mach32.c =================================================================== --- a/src/mach32.c +++ b/src/mach32.c @@ -1520,9 +1520,18 @@ static int mach32_init(int force, int ch /* Ensure that this fopen gets a file descriptor greater * than 2, else problems can occur with stdio functions * under certain strange conditions: */ - if (fcntl(0,F_GETFD) < 0) open("/dev/null", O_RDONLY); - if (fcntl(1,F_GETFD) < 0) open("/dev/null", O_WRONLY); - if (fcntl(2,F_GETFD) < 0) open("/dev/null", O_WRONLY); + if ((fcntl(0,F_GETFD) == -1) && (open("/dev/null", O_RDONLY) == -1)){ + /* perror("/dev/null"); */ + exit(1); + } + if ((fcntl(1,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1)){ + /* perror("/dev/null"); */ + exit(1); + } + if ((fcntl(2,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1)){ + /* perror("/dev/null"); */ + exit(1); + } fd = fopen(eeprom_fname, "wb"); if (fd == NULL) { writerr: Index: b/src/mouse/ms.c =================================================================== --- a/src/mouse/ms.c +++ b/src/mouse/ms.c @@ -427,6 +427,22 @@ static int ms_init(void) if (fcntl(1,F_GETFD) < 0) open("/dev/null", O_WRONLY); if (fcntl(2,F_GETFD) < 0) open("/dev/null", O_WRONLY); + /* Ensure that the open will get a file descriptor greater + * than 2, else problems can occur with stdio functions + * under certain strange conditions: */ + if ((fcntl(0,F_GETFD) == -1) && (open("/dev/null", O_RDONLY) == -1) ) { + perror("/dev/null"); + exit(1); + } + if ((fcntl(1,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1) ) { + perror("/dev/null"); + exit(1); + } + if ((fcntl(2,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1) ) { + perror("/dev/null"); + exit(1); + } + /* Set the proper wheel delta */ if(m_wheel_steps) m_wheel_delta = (360 / m_wheel_steps); Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -841,15 +841,48 @@ static void open_mem(void) /* Ensure that the open will get a file descriptor greater * than 2, else problems can occur with stdio functions * under certain strange conditions: */ - if (fcntl(0,F_GETFD) < 0) open("/dev/null", O_RDONLY); - if (fcntl(1,F_GETFD) < 0) open("/dev/null", O_WRONLY); - if (fcntl(2,F_GETFD) < 0) open("/dev/null", O_WRONLY); + if ((fcntl(0,F_GETFD) == -1) && (open("/dev/null", O_RDONLY) == -1)){ + /* perror("/dev/null"); */ + exit(1); + } + if ((fcntl(1,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1)){ + /* perror("/dev/null"); */ + exit(1); + } + if ((fcntl(2,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1)){ + /* perror("/dev/null"); */ + exit(1); + } + + /* + * we now use -1 for "not opened" and -2 for "opened and closed + * again", to avoid the problems with zgv where this routine is + * called after the descriptor has been opened and then closed again. + * I don't know why this happens, but we certainly don't want to + * re-open it and leave it lying around ... + * + * This isn't an issue for stock svgalib, which just leaves + * __svgalib_mem_fd set to the now-closed descriptor. But with + * Debian's addition of the close-on-exec flag below, we do need to + * know whether we expect this to be open or not. + * + * -- ASM 30/08/99 + */ - if (__svgalib_mem_fd < 0) + if (__svgalib_mem_fd == -1) if ((__svgalib_mem_fd = open("/dev/mem", O_RDWR)) < 0) { printf("svgalib: Cannot open /dev/mem.\n"); exit(1); } + + /* Ensure this file is closed if we ever exec something else... */ + if (__svgalib_mem_fd >= 0) { + if (fcntl(__svgalib_mem_fd, F_SETFD, 1) == -1) { + perror("fcntl 808"); + exit(-1); + } + } + #ifdef BACKGROUND #if BACKGROUND == 1 @@ -866,6 +899,12 @@ static void open_mem(void) __svgalib_processnumber); exit(-1); } + /* Ensure this file is closed if we ever exec something else... */ + if (fcntl(__svgalib_mem_fd, F_SETFD, 1) == -1) + { + perror("fcntl 831"); + exit(-1); + } } #endif #endif @@ -902,9 +941,18 @@ void __svgalib_open_devconsole(void) /* The code below assumes file descriptors 0, 1, and 2 * are already open; make sure that's true. */ - if (fcntl(0,F_GETFD) < 0) open("/dev/null", O_RDONLY); - if (fcntl(1,F_GETFD) < 0) open("/dev/null", O_WRONLY); - if (fcntl(2,F_GETFD) < 0) open("/dev/null", O_WRONLY); + if ( (fcntl(0,F_GETFD) == -1) && (open("/dev/null", O_RDONLY) == -1) ) { + perror("/dev/null"); + exit(1); + } + if ( (fcntl(1,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1) ) { + perror("/dev/null"); + exit(1); + } + if ( (fcntl(2,F_GETFD) == -1) && (open("/dev/null", O_WRONLY) == -1) ) { + perror("/dev/null"); + exit(1); + } /* * Now, it would be great if we could use /dev/tty and see what it is connected to. @@ -924,8 +972,8 @@ void __svgalib_open_devconsole(void) return; /* perfect */ } - if ((__svgalib_tty_fd = open("/dev/console", O_RDWR)) < 0) { - printf("svgalib: can't open /dev/console \n"); + if ((__svgalib_tty_fd = open("/dev/tty0", O_RDWR)) < 0) { + printf("svgalib: can't open /dev/tty0 \n"); exit(1); } if (ioctl(__svgalib_tty_fd, VT_OPENQRY, &svgalib_vc) < 0) @@ -4317,7 +4365,24 @@ int vga_initf(int flags) { int vga_init(void) { - int retval = 0; + int retval = -1; + + /* + * Make sure we know where our stdout/stderr are going + * (based on code by Kevin Vajk) + */ + + if(fcntl(0, F_GETFD)<0) + if(open("/dev/null", O_RDWR, 0)<0) + goto bail; + if(fcntl(1, F_GETFD)<0) + if(open("/dev/null", O_RDWR, 0)<0) + goto bail; + if(fcntl(2, F_GETFD)<0) + if(open("/dev/null", O_RDWR, 0)<0) + goto bail; + + retval = 0; #if 0 __svgalib_open_devconsole(); @@ -4379,6 +4444,14 @@ if(B8000_MEM_POINTER==NULL){ close(__svgalib_mem_fd); + /* ASM 30/08/99: Not quite sure what's going on here, but it is + possible to call open_mem after this FD is closed now, and this + breaks Debian's addition of the set-close-on-exec flag at the + end of open_mem if it thinks the FD is still open. But we + can't set it to -1, or it will just be opened again, which is + presumably not the idea if it's been explicitly closed here! */ + __svgalib_mem_fd=-2; + #ifdef DEBUG printf("svgalib: Opening mouse (type = %x).\n", mouse_type | mouse_modem_ctl); #endif @@ -4389,6 +4462,7 @@ if(B8000_MEM_POINTER==NULL){ /* Michael: I assume this is a misunderstanding, when svgalib was developed, there were no saved uids, thus setting effective uid sufficed... */ +bail: if ( __svgalib_security_revokeallprivs == 1 ) { setuid(getuid()); setgid(getgid()); debian/patches/series0000644000000000000000000000147011735000254012031 0ustar 001_fhs_transition.patch 002_iopl.patch 003_fbdev.patch 004_build.patch 005_vesa_storage.patch 006_invalid_cpp_token.patch 007_config_typo.patch 008_mouse_unconfigured.patch 009_init_ptrs.patch 010_fPIC.patch 011_open_gt_2.patch 012_warnings.patch 013_glibc_ge_2.patch 014_r128_save_regs.patch 015_use_FONT_SIZE_const.patch 016_disable_vgacode.patch 017_use_syslog.patch 018_vgagl_against_vga.patch 019_shlib_symlinks.patch 020_purge_linux_headers.patch 021_gl_expandchar_3_bytes_pp.patch 022_neomagic_libretto100.patch 023_config_add_chipsets.patch 024_vesa_not_print_crap.patch 025_mmap_return_value_test.patch 026_port_non_ia32.patch 027_mouse_none_no_print.patch 028_gcc-4.0.patch 029_binutils-2.16.patch 030_manpages_typos.patch 031_mouse_input.patch 040_x86emu.patch 041_use_system_round.patch 050_port_kfreebsd.patch debian/patches/050_port_kfreebsd.patch0000644000000000000000000002114111735000254015047 0ustar Author: Tuco Author: Guillem Jover --- src/keyboard/keyboard.c | 27 +++++++++++++++++++--- src/mouse/ms.c | 4 +++ src/vga.c | 57 +++++++++++++++++++++++++++++++++++++----------- src/vgamisc.c | 38 +++++++++++++++++++++++++------- utils/gtf/scitech.h | 4 +-- 5 files changed, 103 insertions(+), 27 deletions(-) --- a/src/keyboard/keyboard.c +++ b/src/keyboard/keyboard.c @@ -33,7 +33,11 @@ /* should also be useful for svgalib programs using the keyboard. It misses */ /* a few KERNEL ifdefs around kernel data structures though. */ #include "keyboard_lnx.h" +#if defined(__linux__) #include +#elif defined(__FreeBSD_kernel__) +#include +#endif /* Needed to check uid of keymap files */ #include #include @@ -385,6 +389,24 @@ void keyboard_close(void) { __svgalib_kbd_fd = -1; } +static inline int vt_getactive(int fd) +{ + int v; +#if defined(VT_GETSTATE) + struct vt_stat vts; + if (ioctl(fd, VT_GETSTATE, &vts) == 0) + v = vts.v_active; + else + v = -1; +#elif defined(VT_GETACTIVE) + if (ioctl(fd, VT_GETACTIVE, &v) != 0) + v = -1; +#else +#error "need porting to this platform" +#endif + return v; +} + /* For now, we assume there's no console switching. */ /* (Actually, there won't be any unless we catch the console switching */ /* keys). */ @@ -578,7 +600,6 @@ static int keyboard_getevents(int wait) /* VT switch. */ /* *** what about F11 & F12? */ int j, vt = 0; - struct vt_stat vts; for (j = 0; j < 12; j++) if (functionkey_state & (1 << j)) { vt = j + 1; @@ -587,9 +608,7 @@ static int keyboard_getevents(int wait) } /* Do not switch vt's if need not to */ - ioctl(__svgalib_tty_fd, VT_GETSTATE, &vts); - - if(vt != vts.v_active) { + if(vt != vt_getactive(__svgalib_tty_fd)) { /* if switching vt's, need to clear keystates */ keyboard_clearstate(); /* --- a/src/mouse/ms.c +++ b/src/mouse/ms.c @@ -117,7 +117,9 @@ static void ms_setspeed(const int old, c tty.c_iflag = IGNBRK | IGNPAR; tty.c_oflag = 0; tty.c_lflag = 0; +#ifdef __linux__ tty.c_line = 0; +#endif tty.c_cc[VTIME] = 0; tty.c_cc[VMIN] = 1; @@ -527,7 +529,9 @@ static int ms_init(void) tty.c_iflag = IGNBRK | IGNPAR; tty.c_oflag = 0; tty.c_lflag = 0; +#ifdef __linux__ tty.c_line = 0; +#endif tty.c_cc[VTIME] = 0; tty.c_cc[VMIN] = 1; tty.c_cflag = cflag[m_type] | B1200; --- a/src/vga.c +++ b/src/vga.c @@ -25,7 +25,11 @@ #include #include #include +#if defined(__linux__) #include +#elif defined(__FreeBSD_kernel__) +#include +#endif #include #include #include @@ -91,6 +95,11 @@ * silly). */ #define USE_DEVTTY +/* If the system does not support IUCLC, ignore it. */ +#ifndef IUCLC +#define IUCLC 0 +#endif + #define SETSIG(sa, sig, fun) {\ sa.sa_handler = fun; \ sa.sa_flags = SA_RESTART; \ @@ -781,7 +790,7 @@ static void set_graphtermio(void) /* Leave keyboard alone when rawkeyboard is enabled! */ if (__svgalib_kbd_fd < 0) { /* set graphics mode termio parameters */ - ioctl(0, TCSETSW, &graph_termio); + tcsetattr(0, TCSADRAIN, &graph_termio); } } @@ -791,7 +800,7 @@ static void set_texttermio(void) /* Leave keyboard alone when rawkeyboard is enabled! */ if (__svgalib_kbd_fd < 0) { /* restore text mode termio parameters */ - ioctl(0, TCSETSW, &text_termio); + tcsetattr(0, TCSADRAIN, &text_termio); } } @@ -802,9 +811,9 @@ static void disable_interrupt(void) /* Well, one could argue that sigint is not enabled at all when in __svgalib_nosigint but sometimes they *still* are enabled b4 graph_termio is set.. */ - ioctl(0, TCGETS, &cur_termio); + tcgetattr(0, &cur_termio); cur_termio.c_lflag &= ~ISIG; - ioctl(0, TCSETSW, &cur_termio); + tcsetattr(0, TCSADRAIN, &cur_termio); } @@ -814,9 +823,9 @@ static void enable_interrupt(void) if (__svgalib_nosigint) /* do not reenable, they are often reenabled by text_termio */ return; - ioctl(0, TCGETS, &cur_termio); + tcgetattr(0, &cur_termio); cur_termio.c_lflag |= ISIG; - ioctl(0, TCSETSW, &cur_termio); + tcsetattr(0, TCSADRAIN, &cur_termio); } /* The following is rather messy and inelegant. The only solution I can */ @@ -938,10 +947,28 @@ static int check_owner(int vc) return 0; } +static inline int vt_getactive(int fd) +{ + int v; +#if defined(VT_GETSTATE) + struct vt_stat vts; + if (ioctl(fd, VT_GETSTATE, &vts) == 0) + v = vts.v_active; + else + v = -1; +#elif defined(VT_GETACTIVE) + if (ioctl(fd, VT_GETACTIVE, &v) != 0) + v = -1; +#else +#error "need porting to this platform" +#endif + return v; +} + void __svgalib_open_devconsole(void) { struct vt_mode vtm; - struct vt_stat vts; + int v_active; struct stat sbuf; char fname[30]; @@ -998,8 +1025,8 @@ void __svgalib_open_devconsole(void) setsid(); /* We must use RDWR to allow for output... */ if (((__svgalib_tty_fd = open(fname, O_RDWR)) >= 0) && - (ioctl(__svgalib_tty_fd, VT_GETSTATE, &vts) >= 0)) { - if (!check_owner(vts.v_active)) + (v_active = vt_getactive(__svgalib_tty_fd)) >= 0) { + if (!check_owner(v_active)) goto error; /* success, redirect all stdios */ if (DREP) @@ -1016,8 +1043,8 @@ void __svgalib_open_devconsole(void) /* clear screen and switch to it */ fwrite("\e[H\e[J", 6, 1, stderr); fflush(stderr); - if (svgalib_vc != vts.v_active) { - startup_vc = vts.v_active; + if (svgalib_vc != v_active) { + startup_vc = v_active; ioctl(__svgalib_tty_fd, VT_ACTIVATE, svgalib_vc); __svgalib_waitvtactive(); } @@ -1329,7 +1356,11 @@ static char sig2catch[] = SIGTRAP, SIGIOT, SIGBUS, SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM, SIGXCPU, SIGXFSZ, SIGVTALRM, -/* SIGPROF ,*/ SIGPWR}; +/* SIGPROF ,*/ +#ifdef SIGPWR +SIGPWR +#endif +}; static struct sigaction old_signal_handler[sizeof(sig2catch)]; struct vt_mode __svgalib_oldvtmode; @@ -1939,7 +1970,7 @@ static void initialize(void) #endif /* save text mode termio parameters */ - ioctl(0, TCGETS, &text_termio); + tcgetattr(0, &text_termio); graph_termio = text_termio; --- a/src/vgamisc.c +++ b/src/vgamisc.c @@ -73,18 +73,40 @@ unsigned char * return __svgalib_graph_mem; } +#if defined(__linux__) + #include +static inline int get_totalram(void) +{ + struct sysinfo si; + si.totalram = 0; + sysinfo(&si); + return si.totalram; +} + +#elif defined(__FreeBSD_kernel__) + +#include + +static inline int get_totalram(void) +{ + int totalram; + size_t totalram_size = sizeof(totalram); + if (sysctlbyname("vm.stats.vm.v_page_count", &totalram, &totalram_size, NULL, 0) == -1) + return -1; + return totalram * getpagesize() / 1024; +} + +#endif + int __svgalib_physmem(void) { #ifdef __alpha__ printf("__svgalib_physmem: are you sure you wanna do this??\n"); return -1; #else - struct sysinfo si; - si.totalram = 0; - sysinfo(&si); - return si.totalram; + return get_totalram(); #endif } @@ -303,18 +325,18 @@ int vga_getkey(void) int vga_getkey(void) { - struct termio zap, original; + struct termios zap, original; int e; char c; - ioctl(fileno(stdin), TCGETA, &original); /* Get termio */ + tcgetattr(fileno(stdin), &original); /* Get termio */ zap = original; zap.c_cc[VMIN] = 0; /* Modify termio */ zap.c_cc[VTIME] = 0; zap.c_lflag = 0; - ioctl(fileno(stdin), TCSETA, &zap); /* Set new termio */ + tcsetattr(fileno(stdin), TCSANOW, &zap); /* Set new termio */ e = read(fileno(stdin), &c, 1); /* Read one char */ - ioctl(fileno(stdin), TCSETA, &original); /* Restore termio */ + tcsetattr(fileno(stdin), TCSANOW, &original); /* Restore termio */ if (e != 1) return 0; /* No key pressed. */ return c; /* Return key. */ --- a/utils/gtf/scitech.h +++ b/utils/gtf/scitech.h @@ -228,7 +228,7 @@ #endif /* 32-bit FreeBSD compile environment */ -#elif defined(__FREEBSD__) +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #ifndef __32BIT__ #define __32BIT__ #endif @@ -401,7 +401,7 @@ #if defined(__BEOS__) #include #else -#ifdef __LINUX__ +#if defined(__GLIBC__) || defined(__LINUX__) #include #ifdef __STRICT_ANSI__ typedef unsigned short ushort; debian/patches/023_config_add_chipsets.patch0000644000000000000000000000174211735000254016202 0ustar Author: Guillem Jover Index: b/src/config/libvga.config =================================================================== --- a/src/config/libvga.config +++ b/src/config/libvga.config @@ -348,13 +348,13 @@ VertRefresh 50 90 # chipset BANSHEE # Banshee/V3. # chipset SIS # SiS 5597/6326/620/530 cards / integrated vga. # chipset I740 # Intel i740 based cards. -# chipset FBDev # Use the kernel frame buffer device for graphics - # display. -# chipset G400 # Matrox G200/G400/G450 -# chipset R128 # ATI Rage 128 -# chipset SAVAGE # S3 savage family -# chipset LAGUNA # Cirrus Logic 546x (laguna) - +# chipset NEOMAGIC +# chipset LAGUNA # Cirrus Logic Laguna series (546X) +# chipset FBDEV # Use kernel fbdev, instead of direct hardware. +# chipset G400 # Matrox Mystique/G100/G200/G400/G450 +# chipset R128 # Ati Rage128 +# chipset SAVAGE # S3 chipsets Savage +# chipset C&T # Chips and Technologies # EGA Color/mono mode: # Required if chipset is EGA. debian/patches/020_purge_linux_headers.patch0000644000000000000000000012221011735000254016246 0ustar Author: Guillem Jover Index: b/gl/inlstring.h =================================================================== --- a/gl/inlstring.h +++ b/gl/inlstring.h @@ -1,6 +1,6 @@ /* Based on functions in linux/string.h */ -#include /* for size_t */ +#include /* for size_t */ #if defined(__alpha__) || defined (NO_ASSEMBLY) Index: b/src/et6000.c =================================================================== --- a/src/et6000.c +++ b/src/et6000.c @@ -13,7 +13,6 @@ #include "vga.h" #include "libvga.h" #include "driver.h" -#include #include "timing.h" #include "interface.h" #include "vgaregs.h" Index: b/src/fbdev.c =================================================================== --- a/src/fbdev.c +++ b/src/fbdev.c @@ -1,13 +1,13 @@ #include #include #include -#include -#include #include #include #include #include +#include "kd_lnx.h" +#include "fb_lnx.h" #include "vga.h" #include "libvga.h" #include "driver.h" @@ -353,7 +353,7 @@ static void fbdev_savepalette(unsigned c unsigned char *green, unsigned char *blue) { - __u16 r[256], g[256], b[256], t[256]; + uint16_t r[256], g[256], b[256], t[256]; struct fb_cmap cmap; unsigned i; @@ -379,7 +379,7 @@ static void fbdev_restorepalette(const u const unsigned char *green, const unsigned char *blue) { - __u16 r[256], g[256], b[256], t[256]; + uint16_t r[256], g[256], b[256], t[256]; struct fb_cmap cmap; unsigned i; @@ -403,7 +403,7 @@ static void fbdev_restorepalette(const u static int fbdev_setpalette(int index, int red, int green, int blue) { - __u16 r, g, b, t; + uint16_t r, g, b, t; struct fb_cmap cmap; r = (red << 10) | (red << 4) | (red >> 2); @@ -424,7 +424,7 @@ static int fbdev_setpalette(int index, i static void fbdev_getpalette(int index, int *red, int *green, int *blue) { - __u16 r, g, b, t; + uint16_t r, g, b, t; struct fb_cmap cmap; cmap.start = 0; Index: b/src/fb_lnx.h =================================================================== --- /dev/null +++ b/src/fb_lnx.h @@ -0,0 +1,331 @@ +#ifndef _LINUX_FB_H +#define _LINUX_FB_H + +#include + +/* Definitions of frame buffers */ + +#define FB_MAJOR 29 +#define FB_MAX 32 /* sufficient for now */ + +/* ioctls + 0x46 is 'F' */ +#define FBIOGET_VSCREENINFO 0x4600 +#define FBIOPUT_VSCREENINFO 0x4601 +#define FBIOGET_FSCREENINFO 0x4602 +#define FBIOGETCMAP 0x4604 +#define FBIOPUTCMAP 0x4605 +#define FBIOPAN_DISPLAY 0x4606 +#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) +/* 0x4607-0x460B are defined below */ +/* #define FBIOGET_MONITORSPEC 0x460C */ +/* #define FBIOPUT_MONITORSPEC 0x460D */ +/* #define FBIOSWITCH_MONIBIT 0x460E */ +#define FBIOGET_CON2FBMAP 0x460F +#define FBIOPUT_CON2FBMAP 0x4610 +#define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */ +#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank) +#define FBIO_ALLOC 0x4613 +#define FBIO_FREE 0x4614 +#define FBIOGET_GLYPH 0x4615 +#define FBIOGET_HWCINFO 0x4616 +#define FBIOPUT_MODEINFO 0x4617 +#define FBIOGET_DISPINFO 0x4618 + + +#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ +#define FB_TYPE_PLANES 1 /* Non interleaved planes */ +#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ +#define FB_TYPE_TEXT 3 /* Text/attributes */ +#define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */ + +#define FB_AUX_TEXT_MDA 0 /* Monochrome text */ +#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ +#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ +#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ +#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ + +#define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ +#define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ +#define FB_AUX_VGA_PLANES_CFB8 2 /* CFB8 in planes (VGA) */ + +#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ +#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ +#define FB_VISUAL_TRUECOLOR 2 /* True color */ +#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ +#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ +#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ + +#define FB_ACCEL_NONE 0 /* no hardware accelerator */ +#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ +#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ +#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ +#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ +#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ +#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ +#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ +#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ +#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ +#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ +#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ +#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ +#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ +#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ +#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ +#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ +#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ +#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ +#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ +#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ +#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ +#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ +#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ +#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ +#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ +#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ +#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ +#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ +#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ +#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ +#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ +#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ +#define FB_ACCEL_IGS_CYBER2000 33 /* CyberPro 2000 */ +#define FB_ACCEL_IGS_CYBER2010 34 /* CyberPro 2010 */ +#define FB_ACCEL_IGS_CYBER5000 35 /* CyberPro 5000 */ +#define FB_ACCEL_SIS_GLAMOUR 36 /* SiS 300/630/540 */ +#define FB_ACCEL_3DLABS_PERMEDIA3 37 /* 3Dlabs Permedia 3 */ +#define FB_ACCEL_ATI_RADEON 38 /* ATI Radeon family */ +#define FB_ACCEL_I810 39 /* Intel 810/815 */ +#define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 650, 740 */ +#define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre") */ + +#define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ +#define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ +#define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ +#define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */ +#define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */ +#define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */ +#define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ +#define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ +#define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ + + +struct fb_fix_screeninfo { + char id[16]; /* identification string eg "TT Builtin" */ + unsigned long smem_start; /* Start of frame buffer mem */ + /* (physical address) */ + uint32_t smem_len; /* Length of frame buffer mem */ + uint32_t type; /* see FB_TYPE_* */ + uint32_t type_aux; /* Interleave for interleaved Planes */ + uint32_t visual; /* see FB_VISUAL_* */ + uint16_t xpanstep; /* zero if no hardware panning */ + uint16_t ypanstep; /* zero if no hardware panning */ + uint16_t ywrapstep; /* zero if no hardware ywrap */ + uint32_t line_length; /* length of a line in bytes */ + unsigned long mmio_start; /* Start of Memory Mapped I/O */ + /* (physical address) */ + uint32_t mmio_len; /* Length of Memory Mapped I/O */ + uint32_t accel; /* Type of acceleration available */ + uint16_t reserved[3]; /* Reserved for future compatibility */ +}; + +/* Interpretation of offset for color fields: All offsets are from the right, + * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you + * can use the offset as right argument to <<). A pixel afterwards is a bit + * stream and is written to video memory as that unmodified. This implies + * big-endian byte order if bits_per_pixel is greater than 8. + */ +struct fb_bitfield { + uint32_t offset; /* beginning of bitfield */ + uint32_t length; /* length of bitfield */ + uint32_t msb_right; /* != 0 : Most significant bit is */ + /* right */ +}; + +#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ + +#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/ +#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ +#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ +#define FB_ACTIVATE_MASK 15 + /* values */ +#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ +#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ +#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ + +#define FB_ACCELF_TEXT 1 /* text mode acceleration */ + +#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ +#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ +#define FB_SYNC_EXT 4 /* external sync */ +#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ +#define FB_SYNC_BROADCAST 16 /* broadcast video timings */ + /* vtotal = 144d/288n/576i => PAL */ + /* vtotal = 121d/242n/484i => NTSC */ +#define FB_SYNC_ON_GREEN 32 /* sync on green */ + +#define FB_VMODE_NONINTERLACED 0 /* non interlaced */ +#define FB_VMODE_INTERLACED 1 /* interlaced */ +#define FB_VMODE_DOUBLE 2 /* double scan */ +#define FB_VMODE_MASK 255 + +#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ +#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ +#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ + +#define PICOS2KHZ(a) (1000000000UL/(a)) +#define KHZ2PICOS(a) (1000000000UL/(a)) + +struct fb_var_screeninfo { + uint32_t xres; /* visible resolution */ + uint32_t yres; + uint32_t xres_virtual; /* virtual resolution */ + uint32_t yres_virtual; + uint32_t xoffset; /* offset from virtual to visible */ + uint32_t yoffset; /* resolution */ + + uint32_t bits_per_pixel; /* guess what */ + uint32_t grayscale; /* != 0 Graylevels instead of colors */ + + struct fb_bitfield red; /* bitfield in fb mem if true color, */ + struct fb_bitfield green; /* else only length is significant */ + struct fb_bitfield blue; + struct fb_bitfield transp; /* transparency */ + + uint32_t nonstd; /* != 0 Non standard pixel format */ + + uint32_t activate; /* see FB_ACTIVATE_* */ + + uint32_t height; /* height of picture in mm */ + uint32_t width; /* width of picture in mm */ + + uint32_t accel_flags; /* acceleration flags (hints) */ + + /* Timing: All values in pixclocks, except pixclock (of course) */ + uint32_t pixclock; /* pixel clock in ps (pico seconds) */ + uint32_t left_margin; /* time from sync to picture */ + uint32_t right_margin; /* time from picture to sync */ + uint32_t upper_margin; /* time from sync to picture */ + uint32_t lower_margin; + uint32_t hsync_len; /* length of horizontal sync */ + uint32_t vsync_len; /* length of vertical sync */ + uint32_t sync; /* see FB_SYNC_* */ + uint32_t vmode; /* see FB_VMODE_* */ + uint32_t rotate; /* angle we rotate counter clockwise */ + uint32_t reserved[5]; /* Reserved for future compatibility */ +}; + +struct fb_cmap { + uint32_t start; /* First entry */ + uint32_t len; /* Number of entries */ + uint16_t *red; /* Red values */ + uint16_t *green; + uint16_t *blue; + uint16_t *transp; /* transparency, can be NULL */ +}; + +struct fb_con2fbmap { + uint32_t console; + uint32_t framebuffer; +}; + +/* VESA Blanking Levels */ +#define VESA_NO_BLANKING 0 +#define VESA_VSYNC_SUSPEND 1 +#define VESA_HSYNC_SUSPEND 2 +#define VESA_POWERDOWN 3 + +struct fb_monspecs { + uint32_t hfmin; /* hfreq lower limit (Hz) */ + uint32_t hfmax; /* hfreq upper limit (Hz) */ + uint16_t vfmin; /* vfreq lower limit (Hz) */ + uint16_t vfmax; /* vfreq upper limit (Hz) */ + uint32_t dclkmin; /* pixelclock lower limit (Hz) */ + uint32_t dclkmax; /* pixelclock upper limit (Hz) */ + unsigned gtf : 1; /* supports GTF */ + unsigned dpms : 1; /* supports DPMS */ +}; + +#define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ +#define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */ +#define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */ +#define FB_VBLANK_HAVE_HBLANK 0x008 /* horizontal blanks can be detected */ +#define FB_VBLANK_HAVE_COUNT 0x010 /* global retrace counter is available */ +#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */ +#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */ +#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */ +#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */ + +struct fb_vblank { + uint32_t flags; /* FB_VBLANK flags */ + uint32_t count; /* counter of retraces since boot */ + uint32_t vcount; /* current scanline position */ + uint32_t hcount; /* current scandot position */ + uint32_t reserved[4]; /* reserved for future compatibility */ +}; + +/* Internal HW accel */ +#define ROP_COPY 0 +/* #define ROP_XOR 1 Already defined by svgalib */ + +struct fb_copyarea { + uint32_t dx; + uint32_t dy; + uint32_t width; + uint32_t height; + uint32_t sx; + uint32_t sy; +}; + +struct fb_fillrect { + uint32_t dx; /* screen-relative */ + uint32_t dy; + uint32_t width; + uint32_t height; + uint32_t color; + uint32_t rop; +}; + +struct fb_image { + uint32_t dx; /* Where to place image */ + uint32_t dy; + uint32_t width; /* Size of image */ + uint32_t height; + uint32_t fg_color; /* Only used when a mono bitmap */ + uint32_t bg_color; + uint8_t depth; /* Depth of the image */ + const char *data; /* Pointer to image data */ + struct fb_cmap cmap; /* color map info */ +}; + +/* + * hardware cursor control + */ + +#define FB_CUR_SETCUR 0x01 +#define FB_CUR_SETPOS 0x02 +#define FB_CUR_SETHOT 0x04 +#define FB_CUR_SETCMAP 0x08 +#define FB_CUR_SETSHAPE 0x10 +#define FB_CUR_SETSIZE 0x20 +#define FB_CUR_SETALL 0xFF + +struct fbcurpos { + uint16_t x, y; +}; + +struct fb_cursor { + uint16_t set; /* what to set */ + uint16_t enable; /* cursor on/off */ + uint16_t rop; /* bitop operation */ + char *mask; /* cursor mask bits */ + struct fbcurpos hot; /* cursor hot spot */ + struct fb_image image; /* Cursor image */ +}; + +#define FB_PIXMAP_DEFAULT 1 /* used internally by fbcon */ +#define FB_PIXMAP_SYSTEM 2 /* memory is in system RAM */ +#define FB_PIXMAP_IO 4 /* memory is iomapped */ +#define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */ + +#endif /* _LINUX_FB_H */ Index: b/src/joystick/joydev.h =================================================================== --- a/src/joystick/joydev.h +++ b/src/joystick/joydev.h @@ -1,46 +1,45 @@ -#include +#ifndef _LINUX_JOYSTICK_H +#define _LINUX_JOYSTICK_H -#if ( LINUX_VESION_CODE >= 131584) -#include -#else -/* Joystick interface modeled after svgalibs keyboard and mouse interfaces - * Copyright 1998 Daniel Engström - * Partly based on code from - * joystick-0.7.3 Copyright (C) 1992, 1993 Author C. Smith - * and - * joystick-1.0.6 Copyright (C) 1997 Vojtech Pavlik +/* + * $Id: joystick.h,v 1.3 2000/11/30 11:07:05 vojtech Exp $ + * + * Copyright (C) 1996-2000 Vojtech Pavlik + * + * Sponsored by SuSE */ -#include /* for _IOR(x) and _IOW(x) macros */ -#include /* - * IOCTL commands for joystick driver + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Should you need to contact me, the author, you can do so either by + * e-mail - mail your message to , or by paper mail: + * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic */ - /* get driver version */ -#define JSIOCGVERSION _IOR('j', 0x01, u_int32_t) - /* get number of axes */ -#define JSIOCGAXES _IOR('j', 0x11, u_int8_t) - /* get number of buttons */ -#define JSIOCGBUTTONS _IOR('j', 0x12, u_int8_t) - - /* set correction values */ -#define JSIOCSCORR _IOW('j', 0x21, struct js_corr[4]) - /* get correction values */ -#define JSIOCGCORR _IOR('j', 0x22, struct js_corr[4]) +#include +#include /* for _IOR(x) and _IOW(x) macros */ + +/* From */ +#define KEY_MAX 0x1ff /* - * Types and constants for get/set correction + * Version */ -#define JS_CORR_NONE 0x00 /* returns raw values */ -#define JS_CORR_BROKEN 0x01 /* broken line */ - -struct js_corr { - int32_t coef[8]; - u_int16_t prec; - u_int16_t type; -}; +#define JS_VERSION 0x020100 /* * Types and constants for reading from /dev/js @@ -51,41 +50,82 @@ struct js_corr { #define JS_EVENT_INIT 0x80 /* initial state of device */ struct js_event { - u_int32_t time; /* time when event happened in miliseconds - * since open */ - u_int16_t value; /* new value */ - u_int8_t type; /* type of event, see above */ - u_int8_t number; /* axis/button number */ + uint32_t time; /* event timestamp in milliseconds */ + int16_t value; /* value */ + uint8_t type; /* event type */ + uint8_t number; /* axis/button number */ +}; + +/* + * IOCTL commands for joystick driver + */ + +#define JSIOCGVERSION _IOR('j', 0x01, uint32_t) /* get driver version */ + +#define JSIOCGAXES _IOR('j', 0x11, uint8_t) /* get number of axes */ +#define JSIOCGBUTTONS _IOR('j', 0x12, uint8_t) /* get number of buttons */ +#define JSIOCGNAME(len) _IOC(_IOC_READ, 'j', 0x13, len) /* get identifier string */ + +#define JSIOCSCORR _IOW('j', 0x21, struct js_corr) /* set correction values */ +#define JSIOCGCORR _IOR('j', 0x22, struct js_corr) /* get correction values */ + +#define JSIOCSAXMAP _IOW('j', 0x31, uint8_t[ABS_MAX]) /* set axis mapping */ +#define JSIOCGAXMAP _IOR('j', 0x32, uint8_t[ABS_MAX]) /* get axis mapping */ +#define JSIOCSBTNMAP _IOW('j', 0x33, uint16_t[KEY_MAX - BTN_MISC]) /* set button mapping */ +#define JSIOCGBTNMAP _IOR('j', 0x34, uint16_t[KEY_MAX - BTN_MISC]) /* get button mapping */ + +/* + * Types and constants for get/set correction + */ + +#define JS_CORR_NONE 0x00 /* returns raw values */ +#define JS_CORR_BROKEN 0x01 /* broken line */ + +struct js_corr { + int32_t coef[8]; + int16_t prec; + uint16_t type; }; /* - * Backward (version 0.x) compatibility definitions + * v0.x compatibility definitions */ -#define JS_RETURN sizeof(struct JS_DATA_TYPE) -#define JS_TRUE 1 -#define JS_FALSE 0 -#define JS_X_0 0x01 /* bit mask for x-axis js0 */ -#define JS_Y_0 0x02 /* bit mask for y-axis js0 */ -#define JS_X_1 0x04 /* bit mask for x-axis js1 */ -#define JS_Y_1 0x08 /* bit mask for y-axis js1 */ -#define JS_MAX 2 /* max number of joysticks */ - -#define JS_SET_CAL 0x01 /*ioctl cmd to set joystick correction factor*/ -#define JS_GET_CAL 0x02 /*ioctl cmd to get joystick correction factor*/ -#define JS_SET_TIMEOUT 0x03 /*ioctl cmd to set maximum number of iterations - to wait for a timeout*/ -#define JS_GET_TIMEOUT 0x04 /*as above, to get*/ -#define JS_SET_TIMELIMIT 0x05 /*set data retention time*/ -#define JS_GET_TIMELIMIT 0x06 /*get data retention time*/ -#define JS_GET_ALL 0x07 /*get the whole JS_DATA[minor] struct*/ -#define JS_SET_ALL 0x08 /*set the whole JS_DATA[minor] struct - except JS_BUSY!*/ +#define JS_RETURN sizeof(struct JS_DATA_TYPE) +#define JS_TRUE 1 +#define JS_FALSE 0 +#define JS_X_0 0x01 +#define JS_Y_0 0x02 +#define JS_X_1 0x04 +#define JS_Y_1 0x08 +#define JS_MAX 2 + +#define JS_DEF_TIMEOUT 0x1300 +#define JS_DEF_CORR 0 +#define JS_DEF_TIMELIMIT 10L + +#define JS_SET_CAL 1 +#define JS_GET_CAL 2 +#define JS_SET_TIMEOUT 3 +#define JS_GET_TIMEOUT 4 +#define JS_SET_TIMELIMIT 5 +#define JS_GET_TIMELIMIT 6 +#define JS_GET_ALL 7 +#define JS_SET_ALL 8 -/* version 0.x struct */ struct JS_DATA_TYPE { - int buttons; /* immediate button state */ - int x; /* immediate x axis value */ - int y; /* immediate y axis value */ + int buttons; + int x; + int y; }; -#endif + +struct JS_DATA_SAVE_TYPE { + int JS_TIMEOUT; + int BUSY; + long JS_EXPIRETIME; + long JS_TIMELIMIT; + struct JS_DATA_TYPE JS_SAVE; + struct JS_DATA_TYPE JS_CORR; +}; + +#endif /* _LINUX_JOYSTICK_H */ Index: b/src/kd_lnx.h =================================================================== --- /dev/null +++ b/src/kd_lnx.h @@ -0,0 +1,167 @@ +#ifndef _LINUX_KD_H +#define _LINUX_KD_H + +/* 0x4B is 'K', to avoid collision with termios and vt */ + +#define GIO_FONT 0x4B60 /* gets font in expanded form */ +#define PIO_FONT 0x4B61 /* use font in expanded form */ + +#define GIO_FONTX 0x4B6B /* get font using struct consolefontdesc */ +#define PIO_FONTX 0x4B6C /* set font using struct consolefontdesc */ +struct consolefontdesc { + unsigned short charcount; /* characters in font (256 or 512) */ + unsigned short charheight; /* scan lines per character (1-32) */ + char *chardata; /* font data in expanded form */ +}; + +#define PIO_FONTRESET 0x4B6D /* reset to default font */ + +#define GIO_CMAP 0x4B70 /* gets colour palette on VGA+ */ +#define PIO_CMAP 0x4B71 /* sets colour palette on VGA+ */ + +#define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */ +#define KDMKTONE 0x4B30 /* generate tone */ + +#define KDGETLED 0x4B31 /* return current led state */ +#define KDSETLED 0x4B32 /* set led state [lights, not flags] */ +#define LED_SCR 0x01 /* scroll lock led */ +#define LED_NUM 0x02 /* num lock led */ +#define LED_CAP 0x04 /* caps lock led */ + +#define KDGKBTYPE 0x4B33 /* get keyboard type */ +#define KB_84 0x01 +#define KB_101 0x02 /* this is what we always answer */ +#define KB_OTHER 0x03 + +#define KDADDIO 0x4B34 /* add i/o port as valid */ +#define KDDELIO 0x4B35 /* del i/o port as valid */ +#define KDENABIO 0x4B36 /* enable i/o to video board */ +#define KDDISABIO 0x4B37 /* disable i/o to video board */ + +#define KDSETMODE 0x4B3A /* set text/graphics mode */ +#define KD_TEXT 0x00 +#define KD_GRAPHICS 0x01 +#define KD_TEXT0 0x02 /* obsolete */ +#define KD_TEXT1 0x03 /* obsolete */ +#define KDGETMODE 0x4B3B /* get current mode */ + +#define KDMAPDISP 0x4B3C /* map display into address space */ +#define KDUNMAPDISP 0x4B3D /* unmap display from address space */ + +typedef char scrnmap_t; +#define E_TABSZ 256 +#define GIO_SCRNMAP 0x4B40 /* get screen mapping from kernel */ +#define PIO_SCRNMAP 0x4B41 /* put screen mapping table in kernel */ +#define GIO_UNISCRNMAP 0x4B69 /* get full Unicode screen mapping */ +#define PIO_UNISCRNMAP 0x4B6A /* set full Unicode screen mapping */ + +#define GIO_UNIMAP 0x4B66 /* get unicode-to-font mapping from kernel */ +struct unipair { + unsigned short unicode; + unsigned short fontpos; +}; +struct unimapdesc { + unsigned short entry_ct; + struct unipair *entries; +}; +#define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */ +#define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hash algorithm */ +struct unimapinit { + unsigned short advised_hashsize; /* 0 if no opinion */ + unsigned short advised_hashstep; /* 0 if no opinion */ + unsigned short advised_hashlevel; /* 0 if no opinion */ +}; + +#define UNI_DIRECT_BASE 0xF000 /* start of Direct Font Region */ +#define UNI_DIRECT_MASK 0x01FF /* Direct Font Region bitmask */ + +#define K_RAW 0x00 +#define K_XLATE 0x01 +#define K_MEDIUMRAW 0x02 +#define K_UNICODE 0x03 +#define KDGKBMODE 0x4B44 /* gets current keyboard mode */ +#define KDSKBMODE 0x4B45 /* sets current keyboard mode */ + +#define K_METABIT 0x03 +#define K_ESCPREFIX 0x04 +#define KDGKBMETA 0x4B62 /* gets meta key handling mode */ +#define KDSKBMETA 0x4B63 /* sets meta key handling mode */ + +#define K_SCROLLLOCK 0x01 +#define K_NUMLOCK 0x02 +#define K_CAPSLOCK 0x04 +#define KDGKBLED 0x4B64 /* get led flags (not lights) */ +#define KDSKBLED 0x4B65 /* set led flags (not lights) */ + +struct kbentry { + unsigned char kb_table; + unsigned char kb_index; + unsigned short kb_value; +}; +#define K_NORMTAB 0x00 +#define K_SHIFTTAB 0x01 +#define K_ALTTAB 0x02 +#define K_ALTSHIFTTAB 0x03 + +#define KDGKBENT 0x4B46 /* gets one entry in translation table */ +#define KDSKBENT 0x4B47 /* sets one entry in translation table */ + +struct kbsentry { + unsigned char kb_func; + unsigned char kb_string[512]; +}; +#define KDGKBSENT 0x4B48 /* gets one function key string entry */ +#define KDSKBSENT 0x4B49 /* sets one function key string entry */ + +struct kbdiacr { + unsigned char diacr, base, result; +}; +struct kbdiacrs { + unsigned int kb_cnt; /* number of entries in following array */ + struct kbdiacr kbdiacr[256]; /* MAX_DIACR from keyboard.h */ +}; +#define KDGKBDIACR 0x4B4A /* read kernel accent table */ +#define KDSKBDIACR 0x4B4B /* write kernel accent table */ + +struct kbkeycode { + unsigned int scancode, keycode; +}; +#define KDGETKEYCODE 0x4B4C /* read kernel keycode table entry */ +#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */ + +#define KDSIGACCEPT 0x4B4E /* accept kbd generated signals */ + +struct kbd_repeat { + int delay; /* in msec; <= 0: don't change */ + int period; /* in msec; <= 0: don't change */ + /* earlier this field was misnamed "rate" */ +}; + +#define KDKBDREP 0x4B52 /* set keyboard delay/repeat rate; + * actually used values are returned */ + +#define KDFONTOP 0x4B72 /* font operations */ + +struct console_font_op { + unsigned int op; /* operation code KD_FONT_OP_* */ + unsigned int flags; /* KD_FONT_FLAG_* */ + unsigned int width, height; /* font size */ + unsigned int charcount; + unsigned char *data; /* font data with height fixed to 32 */ +}; + +#define KD_FONT_OP_SET 0 /* Set font */ +#define KD_FONT_OP_GET 1 /* Get font */ +#define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */ +#define KD_FONT_OP_COPY 3 /* Copy from another console */ + +#define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */ +#ifdef __KERNEL__ +#define KD_FONT_FLAG_OLD 0x80000000 /* Invoked via old interface [compat] */ +#endif + +/* note: 0x4B00-0x4B4E all have had a value at some time; + don't reuse for the time being */ +/* note: 0x4B60-0x4B6D, 0x4B70-0x4B72 used above */ + +#endif /* _LINUX_KD_H */ Index: b/src/keyboard/keyboard.c =================================================================== --- a/src/keyboard/keyboard.c +++ b/src/keyboard/keyboard.c @@ -28,18 +28,18 @@ #include #include #include -#include +#include "kd_lnx.h" /* linux/keyboard.h defines NR_KEYS and some scancode-like constants, so it */ /* should also be useful for svgalib programs using the keyboard. It misses */ /* a few KERNEL ifdefs around kernel data structures though. */ -#include +#include "keyboard_lnx.h" #include /* Needed to check uid of keymap files */ #include #include #include -#include "../libvga.h" +#include "libvga.h" #include "vgakeyboard.h" #include "driver.h" Index: b/src/keyboard/keyboard_lnx.h =================================================================== --- /dev/null +++ b/src/keyboard/keyboard_lnx.h @@ -0,0 +1,425 @@ +#ifndef __LINUX_KEYBOARD_H +#define __LINUX_KEYBOARD_H + +/* From */ +#define KEY_MAX 0x1ff + +#define KG_SHIFT 0 +#define KG_CTRL 2 +#define KG_ALT 3 +#define KG_ALTGR 1 +#define KG_SHIFTL 4 +#define KG_KANASHIFT 4 +#define KG_SHIFTR 5 +#define KG_CTRLL 6 +#define KG_CTRLR 7 +#define KG_CAPSSHIFT 8 + +#define NR_SHIFT 9 + +#define NR_KEYS (KEY_MAX+1) +#define MAX_NR_KEYMAPS 256 +/* This means 128Kb if all keymaps are allocated. Only the superuser + may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */ +#define MAX_NR_OF_USER_KEYMAPS 256 /* should be at least 7 */ + +#define MAX_NR_FUNC 256 /* max nr of strings assigned to keys */ + +#define KT_LATIN 0 /* we depend on this being zero */ +#define KT_LETTER 11 /* symbol that can be acted upon by CapsLock */ +#define KT_FN 1 +#define KT_SPEC 2 +#define KT_PAD 3 +#define KT_DEAD 4 +#define KT_CONS 5 +#define KT_CUR 6 +#define KT_SHIFT 7 +#define KT_META 8 +#define KT_ASCII 9 +#define KT_LOCK 10 +#define KT_SLOCK 12 + +#define K(t,v) (((t)<<8)|(v)) +#define KTYP(x) ((x) >> 8) +#define KVAL(x) ((x) & 0xff) + +#define K_F1 K(KT_FN,0) +#define K_F2 K(KT_FN,1) +#define K_F3 K(KT_FN,2) +#define K_F4 K(KT_FN,3) +#define K_F5 K(KT_FN,4) +#define K_F6 K(KT_FN,5) +#define K_F7 K(KT_FN,6) +#define K_F8 K(KT_FN,7) +#define K_F9 K(KT_FN,8) +#define K_F10 K(KT_FN,9) +#define K_F11 K(KT_FN,10) +#define K_F12 K(KT_FN,11) +#define K_F13 K(KT_FN,12) +#define K_F14 K(KT_FN,13) +#define K_F15 K(KT_FN,14) +#define K_F16 K(KT_FN,15) +#define K_F17 K(KT_FN,16) +#define K_F18 K(KT_FN,17) +#define K_F19 K(KT_FN,18) +#define K_F20 K(KT_FN,19) +#define K_FIND K(KT_FN,20) +#define K_INSERT K(KT_FN,21) +#define K_REMOVE K(KT_FN,22) +#define K_SELECT K(KT_FN,23) +#define K_PGUP K(KT_FN,24) /* PGUP is a synonym for PRIOR */ +#define K_PGDN K(KT_FN,25) /* PGDN is a synonym for NEXT */ +#define K_MACRO K(KT_FN,26) +#define K_HELP K(KT_FN,27) +#define K_DO K(KT_FN,28) +#define K_PAUSE K(KT_FN,29) +#define K_F21 K(KT_FN,30) +#define K_F22 K(KT_FN,31) +#define K_F23 K(KT_FN,32) +#define K_F24 K(KT_FN,33) +#define K_F25 K(KT_FN,34) +#define K_F26 K(KT_FN,35) +#define K_F27 K(KT_FN,36) +#define K_F28 K(KT_FN,37) +#define K_F29 K(KT_FN,38) +#define K_F30 K(KT_FN,39) +#define K_F31 K(KT_FN,40) +#define K_F32 K(KT_FN,41) +#define K_F33 K(KT_FN,42) +#define K_F34 K(KT_FN,43) +#define K_F35 K(KT_FN,44) +#define K_F36 K(KT_FN,45) +#define K_F37 K(KT_FN,46) +#define K_F38 K(KT_FN,47) +#define K_F39 K(KT_FN,48) +#define K_F40 K(KT_FN,49) +#define K_F41 K(KT_FN,50) +#define K_F42 K(KT_FN,51) +#define K_F43 K(KT_FN,52) +#define K_F44 K(KT_FN,53) +#define K_F45 K(KT_FN,54) +#define K_F46 K(KT_FN,55) +#define K_F47 K(KT_FN,56) +#define K_F48 K(KT_FN,57) +#define K_F49 K(KT_FN,58) +#define K_F50 K(KT_FN,59) +#define K_F51 K(KT_FN,60) +#define K_F52 K(KT_FN,61) +#define K_F53 K(KT_FN,62) +#define K_F54 K(KT_FN,63) +#define K_F55 K(KT_FN,64) +#define K_F56 K(KT_FN,65) +#define K_F57 K(KT_FN,66) +#define K_F58 K(KT_FN,67) +#define K_F59 K(KT_FN,68) +#define K_F60 K(KT_FN,69) +#define K_F61 K(KT_FN,70) +#define K_F62 K(KT_FN,71) +#define K_F63 K(KT_FN,72) +#define K_F64 K(KT_FN,73) +#define K_F65 K(KT_FN,74) +#define K_F66 K(KT_FN,75) +#define K_F67 K(KT_FN,76) +#define K_F68 K(KT_FN,77) +#define K_F69 K(KT_FN,78) +#define K_F70 K(KT_FN,79) +#define K_F71 K(KT_FN,80) +#define K_F72 K(KT_FN,81) +#define K_F73 K(KT_FN,82) +#define K_F74 K(KT_FN,83) +#define K_F75 K(KT_FN,84) +#define K_F76 K(KT_FN,85) +#define K_F77 K(KT_FN,86) +#define K_F78 K(KT_FN,87) +#define K_F79 K(KT_FN,88) +#define K_F80 K(KT_FN,89) +#define K_F81 K(KT_FN,90) +#define K_F82 K(KT_FN,91) +#define K_F83 K(KT_FN,92) +#define K_F84 K(KT_FN,93) +#define K_F85 K(KT_FN,94) +#define K_F86 K(KT_FN,95) +#define K_F87 K(KT_FN,96) +#define K_F88 K(KT_FN,97) +#define K_F89 K(KT_FN,98) +#define K_F90 K(KT_FN,99) +#define K_F91 K(KT_FN,100) +#define K_F92 K(KT_FN,101) +#define K_F93 K(KT_FN,102) +#define K_F94 K(KT_FN,103) +#define K_F95 K(KT_FN,104) +#define K_F96 K(KT_FN,105) +#define K_F97 K(KT_FN,106) +#define K_F98 K(KT_FN,107) +#define K_F99 K(KT_FN,108) +#define K_F100 K(KT_FN,109) +#define K_F101 K(KT_FN,110) +#define K_F102 K(KT_FN,111) +#define K_F103 K(KT_FN,112) +#define K_F104 K(KT_FN,113) +#define K_F105 K(KT_FN,114) +#define K_F106 K(KT_FN,115) +#define K_F107 K(KT_FN,116) +#define K_F108 K(KT_FN,117) +#define K_F109 K(KT_FN,118) +#define K_F110 K(KT_FN,119) +#define K_F111 K(KT_FN,120) +#define K_F112 K(KT_FN,121) +#define K_F113 K(KT_FN,122) +#define K_F114 K(KT_FN,123) +#define K_F115 K(KT_FN,124) +#define K_F116 K(KT_FN,125) +#define K_F117 K(KT_FN,126) +#define K_F118 K(KT_FN,127) +#define K_F119 K(KT_FN,128) +#define K_F120 K(KT_FN,129) +#define K_F121 K(KT_FN,130) +#define K_F122 K(KT_FN,131) +#define K_F123 K(KT_FN,132) +#define K_F124 K(KT_FN,133) +#define K_F125 K(KT_FN,134) +#define K_F126 K(KT_FN,135) +#define K_F127 K(KT_FN,136) +#define K_F128 K(KT_FN,137) +#define K_F129 K(KT_FN,138) +#define K_F130 K(KT_FN,139) +#define K_F131 K(KT_FN,140) +#define K_F132 K(KT_FN,141) +#define K_F133 K(KT_FN,142) +#define K_F134 K(KT_FN,143) +#define K_F135 K(KT_FN,144) +#define K_F136 K(KT_FN,145) +#define K_F137 K(KT_FN,146) +#define K_F138 K(KT_FN,147) +#define K_F139 K(KT_FN,148) +#define K_F140 K(KT_FN,149) +#define K_F141 K(KT_FN,150) +#define K_F142 K(KT_FN,151) +#define K_F143 K(KT_FN,152) +#define K_F144 K(KT_FN,153) +#define K_F145 K(KT_FN,154) +#define K_F146 K(KT_FN,155) +#define K_F147 K(KT_FN,156) +#define K_F148 K(KT_FN,157) +#define K_F149 K(KT_FN,158) +#define K_F150 K(KT_FN,159) +#define K_F151 K(KT_FN,160) +#define K_F152 K(KT_FN,161) +#define K_F153 K(KT_FN,162) +#define K_F154 K(KT_FN,163) +#define K_F155 K(KT_FN,164) +#define K_F156 K(KT_FN,165) +#define K_F157 K(KT_FN,166) +#define K_F158 K(KT_FN,167) +#define K_F159 K(KT_FN,168) +#define K_F160 K(KT_FN,169) +#define K_F161 K(KT_FN,170) +#define K_F162 K(KT_FN,171) +#define K_F163 K(KT_FN,172) +#define K_F164 K(KT_FN,173) +#define K_F165 K(KT_FN,174) +#define K_F166 K(KT_FN,175) +#define K_F167 K(KT_FN,176) +#define K_F168 K(KT_FN,177) +#define K_F169 K(KT_FN,178) +#define K_F170 K(KT_FN,179) +#define K_F171 K(KT_FN,180) +#define K_F172 K(KT_FN,181) +#define K_F173 K(KT_FN,182) +#define K_F174 K(KT_FN,183) +#define K_F175 K(KT_FN,184) +#define K_F176 K(KT_FN,185) +#define K_F177 K(KT_FN,186) +#define K_F178 K(KT_FN,187) +#define K_F179 K(KT_FN,188) +#define K_F180 K(KT_FN,189) +#define K_F181 K(KT_FN,190) +#define K_F182 K(KT_FN,191) +#define K_F183 K(KT_FN,192) +#define K_F184 K(KT_FN,193) +#define K_F185 K(KT_FN,194) +#define K_F186 K(KT_FN,195) +#define K_F187 K(KT_FN,196) +#define K_F188 K(KT_FN,197) +#define K_F189 K(KT_FN,198) +#define K_F190 K(KT_FN,199) +#define K_F191 K(KT_FN,200) +#define K_F192 K(KT_FN,201) +#define K_F193 K(KT_FN,202) +#define K_F194 K(KT_FN,203) +#define K_F195 K(KT_FN,204) +#define K_F196 K(KT_FN,205) +#define K_F197 K(KT_FN,206) +#define K_F198 K(KT_FN,207) +#define K_F199 K(KT_FN,208) +#define K_F200 K(KT_FN,209) +#define K_F201 K(KT_FN,210) +#define K_F202 K(KT_FN,211) +#define K_F203 K(KT_FN,212) +#define K_F204 K(KT_FN,213) +#define K_F205 K(KT_FN,214) +#define K_F206 K(KT_FN,215) +#define K_F207 K(KT_FN,216) +#define K_F208 K(KT_FN,217) +#define K_F209 K(KT_FN,218) +#define K_F210 K(KT_FN,219) +#define K_F211 K(KT_FN,220) +#define K_F212 K(KT_FN,221) +#define K_F213 K(KT_FN,222) +#define K_F214 K(KT_FN,223) +#define K_F215 K(KT_FN,224) +#define K_F216 K(KT_FN,225) +#define K_F217 K(KT_FN,226) +#define K_F218 K(KT_FN,227) +#define K_F219 K(KT_FN,228) +#define K_F220 K(KT_FN,229) +#define K_F221 K(KT_FN,230) +#define K_F222 K(KT_FN,231) +#define K_F223 K(KT_FN,232) +#define K_F224 K(KT_FN,233) +#define K_F225 K(KT_FN,234) +#define K_F226 K(KT_FN,235) +#define K_F227 K(KT_FN,236) +#define K_F228 K(KT_FN,237) +#define K_F229 K(KT_FN,238) +#define K_F230 K(KT_FN,239) +#define K_F231 K(KT_FN,240) +#define K_F232 K(KT_FN,241) +#define K_F233 K(KT_FN,242) +#define K_F234 K(KT_FN,243) +#define K_F235 K(KT_FN,244) +#define K_F236 K(KT_FN,245) +#define K_F237 K(KT_FN,246) +#define K_F238 K(KT_FN,247) +#define K_F239 K(KT_FN,248) +#define K_F240 K(KT_FN,249) +#define K_F241 K(KT_FN,250) +#define K_F242 K(KT_FN,251) +#define K_F243 K(KT_FN,252) +#define K_F244 K(KT_FN,253) +#define K_F245 K(KT_FN,254) +#define K_UNDO K(KT_FN,255) + + +#define K_HOLE K(KT_SPEC,0) +#define K_ENTER K(KT_SPEC,1) +#define K_SH_REGS K(KT_SPEC,2) +#define K_SH_MEM K(KT_SPEC,3) +#define K_SH_STAT K(KT_SPEC,4) +#define K_BREAK K(KT_SPEC,5) +#define K_CONS K(KT_SPEC,6) +#define K_CAPS K(KT_SPEC,7) +#define K_NUM K(KT_SPEC,8) +#define K_HOLD K(KT_SPEC,9) +#define K_SCROLLFORW K(KT_SPEC,10) +#define K_SCROLLBACK K(KT_SPEC,11) +#define K_BOOT K(KT_SPEC,12) +#define K_CAPSON K(KT_SPEC,13) +#define K_COMPOSE K(KT_SPEC,14) +#define K_SAK K(KT_SPEC,15) +#define K_DECRCONSOLE K(KT_SPEC,16) +#define K_INCRCONSOLE K(KT_SPEC,17) +#define K_SPAWNCONSOLE K(KT_SPEC,18) +#define K_BARENUMLOCK K(KT_SPEC,19) + +#define K_ALLOCATED K(KT_SPEC,126) /* dynamically allocated keymap */ +#define K_NOSUCHMAP K(KT_SPEC,127) /* returned by KDGKBENT */ + +#define K_P0 K(KT_PAD,0) +#define K_P1 K(KT_PAD,1) +#define K_P2 K(KT_PAD,2) +#define K_P3 K(KT_PAD,3) +#define K_P4 K(KT_PAD,4) +#define K_P5 K(KT_PAD,5) +#define K_P6 K(KT_PAD,6) +#define K_P7 K(KT_PAD,7) +#define K_P8 K(KT_PAD,8) +#define K_P9 K(KT_PAD,9) +#define K_PPLUS K(KT_PAD,10) /* key-pad plus */ +#define K_PMINUS K(KT_PAD,11) /* key-pad minus */ +#define K_PSTAR K(KT_PAD,12) /* key-pad asterisk (star) */ +#define K_PSLASH K(KT_PAD,13) /* key-pad slash */ +#define K_PENTER K(KT_PAD,14) /* key-pad enter */ +#define K_PCOMMA K(KT_PAD,15) /* key-pad comma: kludge... */ +#define K_PDOT K(KT_PAD,16) /* key-pad dot (period): kludge... */ +#define K_PPLUSMINUS K(KT_PAD,17) /* key-pad plus/minus */ +#define K_PPARENL K(KT_PAD,18) /* key-pad left parenthesis */ +#define K_PPARENR K(KT_PAD,19) /* key-pad right parenthesis */ + +#define NR_PAD 20 + +#define K_DGRAVE K(KT_DEAD,0) +#define K_DACUTE K(KT_DEAD,1) +#define K_DCIRCM K(KT_DEAD,2) +#define K_DTILDE K(KT_DEAD,3) +#define K_DDIERE K(KT_DEAD,4) +#define K_DCEDIL K(KT_DEAD,5) + +#define NR_DEAD 6 + +#define K_DOWN K(KT_CUR,0) +#define K_LEFT K(KT_CUR,1) +#define K_RIGHT K(KT_CUR,2) +#define K_UP K(KT_CUR,3) + +#define K_SHIFT K(KT_SHIFT,KG_SHIFT) +#define K_CTRL K(KT_SHIFT,KG_CTRL) +#define K_ALT K(KT_SHIFT,KG_ALT) +#define K_ALTGR K(KT_SHIFT,KG_ALTGR) +#define K_SHIFTL K(KT_SHIFT,KG_SHIFTL) +#define K_SHIFTR K(KT_SHIFT,KG_SHIFTR) +#define K_CTRLL K(KT_SHIFT,KG_CTRLL) +#define K_CTRLR K(KT_SHIFT,KG_CTRLR) +#define K_CAPSSHIFT K(KT_SHIFT,KG_CAPSSHIFT) + +#define K_ASC0 K(KT_ASCII,0) +#define K_ASC1 K(KT_ASCII,1) +#define K_ASC2 K(KT_ASCII,2) +#define K_ASC3 K(KT_ASCII,3) +#define K_ASC4 K(KT_ASCII,4) +#define K_ASC5 K(KT_ASCII,5) +#define K_ASC6 K(KT_ASCII,6) +#define K_ASC7 K(KT_ASCII,7) +#define K_ASC8 K(KT_ASCII,8) +#define K_ASC9 K(KT_ASCII,9) +#define K_HEX0 K(KT_ASCII,10) +#define K_HEX1 K(KT_ASCII,11) +#define K_HEX2 K(KT_ASCII,12) +#define K_HEX3 K(KT_ASCII,13) +#define K_HEX4 K(KT_ASCII,14) +#define K_HEX5 K(KT_ASCII,15) +#define K_HEX6 K(KT_ASCII,16) +#define K_HEX7 K(KT_ASCII,17) +#define K_HEX8 K(KT_ASCII,18) +#define K_HEX9 K(KT_ASCII,19) +#define K_HEXa K(KT_ASCII,20) +#define K_HEXb K(KT_ASCII,21) +#define K_HEXc K(KT_ASCII,22) +#define K_HEXd K(KT_ASCII,23) +#define K_HEXe K(KT_ASCII,24) +#define K_HEXf K(KT_ASCII,25) + +#define NR_ASCII 26 + +#define K_SHIFTLOCK K(KT_LOCK,KG_SHIFT) +#define K_CTRLLOCK K(KT_LOCK,KG_CTRL) +#define K_ALTLOCK K(KT_LOCK,KG_ALT) +#define K_ALTGRLOCK K(KT_LOCK,KG_ALTGR) +#define K_SHIFTLLOCK K(KT_LOCK,KG_SHIFTL) +#define K_SHIFTRLOCK K(KT_LOCK,KG_SHIFTR) +#define K_CTRLLLOCK K(KT_LOCK,KG_CTRLL) +#define K_CTRLRLOCK K(KT_LOCK,KG_CTRLR) + +#define K_SHIFT_SLOCK K(KT_SLOCK,KG_SHIFT) +#define K_CTRL_SLOCK K(KT_SLOCK,KG_CTRL) +#define K_ALT_SLOCK K(KT_SLOCK,KG_ALT) +#define K_ALTGR_SLOCK K(KT_SLOCK,KG_ALTGR) +#define K_SHIFTL_SLOCK K(KT_SLOCK,KG_SHIFTL) +#define K_SHIFTR_SLOCK K(KT_SLOCK,KG_SHIFTR) +#define K_CTRLL_SLOCK K(KT_SLOCK,KG_CTRLL) +#define K_CTRLR_SLOCK K(KT_SLOCK,KG_CTRLR) + +#define NR_LOCK 8 + +#define MAX_DIACR 256 +#endif Index: b/src/vgamisc.c =================================================================== --- a/src/vgamisc.c +++ b/src/vgamisc.c @@ -73,8 +73,7 @@ unsigned char * return __svgalib_graph_mem; } -#include -#include +#include int __svgalib_physmem(void) { @@ -84,7 +83,7 @@ int __svgalib_physmem(void) #else struct sysinfo si; si.totalram = 0; - syscall(SYS_sysinfo, &si); + sysinfo(&si); return si.totalram; #endif } debian/patches/009_init_ptrs.patch0000644000000000000000000000220011735000254014230 0ustar Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -305,8 +305,6 @@ struct info infotable[] = {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0}, - {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }; @@ -507,10 +505,10 @@ unsigned char *__svgalib_sparse_mem; static unsigned char *graph_buf = NULL; /* saves graphics data during flip */ -static unsigned char *font_buf1; /* saved font data - plane 2 */ -static unsigned char *font_buf2; /* saved font data - plane 3 */ -static unsigned char *text_buf1; /* saved text data - plane 0 */ -static unsigned char *text_buf2; /* saved text data - plane 1 */ +static unsigned char *font_buf1 = NULL; /* saved font data - plane 2 */ +static unsigned char *font_buf2 = NULL; /* saved font data - plane 3 */ +static unsigned char *text_buf1 = NULL; /* saved text data - plane 0 */ +static unsigned char *text_buf2 = NULL; /* saved text data - plane 1 */ static struct termios text_termio; /* text mode termio parameters */ static struct termios graph_termio; /* graphics mode termio parameters */ debian/patches/007_config_typo.patch0000644000000000000000000000066111735000254014544 0ustar Index: b/src/config/libvga.config =================================================================== --- a/src/config/libvga.config +++ b/src/config/libvga.config @@ -243,7 +243,7 @@ kbd_only_root_keymaps HorizSync 31.5 35.5 VertRefresh 50 90 -# Montitor timings +# Monitor timings # # These are prefered over the default timings (if monitor and chipset # can handle them). Not all drivers use them at the moment, and Mach32 debian/patches/026_port_non_ia32.patch0000644000000000000000000003153411735000254014704 0ustar Author: Guillem Jover --- Makefile | 6 ++++ Makefile.cfg | 29 +++++++++++++++++++-- gl/driver.c | 2 - gl/scale.c | 14 ++++++++-- src/Makefile | 9 ++++++ src/libvga.h | 69 +++++++++++++++++++++++++++++++++------------------- src/vga.c | 24 ++++++++++++++++-- src/vgaconvplanar.c | 2 - src/vgapix.c | 2 - 9 files changed, 120 insertions(+), 37 deletions(-) --- a/Makefile.cfg +++ b/Makefile.cfg @@ -16,6 +16,9 @@ VERSION = $(MAJOR_VER).$(MINOR_VER) # Configuration Section #---------------------------------------------------------------------- +# Architecture +arch = $(shell uname -m | sed 's/i.86.*/i386/;s/arm.*/arm/') + # Source directory. #srcdir = /usr/local/src/svgalib-$(VERSION) srcdir = $(shell sh -c pwd) @@ -52,7 +55,13 @@ TARGET_FORMAT = elf #uncomment this if your compiler fails on compiling the assembler in #src/vgaconvplanar.c, gl/inlstring.h, gl/line.c or gl/scale.c -# NO_ASM = y +ifneq (i386, $(arch)) +NO_ASM = y +endif + +ifneq (,$(findstring $(arch),i386 x86_64 alpha)) +IO_DRIVERS = y +endif # Uncomment this if you want root processes to be able to always get a new # VC. Alas, some games misuse suid root privs and become root, svgalib cannot @@ -123,6 +132,9 @@ INSTALLMAN = installman # # Comment out any driver that you don't want included in the library. # + +ifeq (y, $(IO_DRIVERS)) +INCLUDE_VGA_DRIVER = y INCLUDE_ET4000_DRIVER = y INCLUDE_CIRRUS_DRIVER = y INCLUDE_TVGA_DRIVER = y @@ -150,13 +162,17 @@ INCLUDE_LAGUNA_DRIVER = y INCLUDE_NEO_DRIVER = y INCLUDE_R128_DRIVER = y INCLUDE_G400_DRIVER = y +INCLUDE_SAVAGE_DRIVER = y +endif ifndef SUPPRESS_FOR_LIBC5 INCLUDE_FBDEV_DRIVER = y endif -INCLUDE_SAVAGE_DRIVER = y + # # Comment out any adapter you don't want to autodetect. # +ifeq (y, $(IO_DRIVERS)) +INCLUDE_VGA_DRIVER_TEST = y INCLUDE_ET4000_DRIVER_TEST = y INCLUDE_CIRRUS_DRIVER_TEST = y INCLUDE_TVGA_DRIVER_TEST = y @@ -183,17 +199,20 @@ INCLUDE_LAGUNA_DRIVER_TEST = y INCLUDE_NEO_DRIVER_TEST = y INCLUDE_G400_DRIVER_TEST = y INCLUDE_R128_DRIVER_TEST = y -#INCLUDE_FBDEV_DRIVER_TEST = y INCLUDE_SAVAGE_DRIVER_TEST = y #Might be too dangerous: INCLUDE_VESA_DRIVER_TEST = y +endif + +#INCLUDE_FBDEV_DRIVER_TEST = y # # Comment out any dac support that you don't want included in the library. # # you must include SIERRA_DAC, if you include any of SCxxxx DACs. +ifeq (y, $(IO_DRIVERS)) INCLUDE_NORMAL_DAC = y INCLUDE_S3_SDAC_DAC = y INCLUDE_S3_GENDAC_DAC = y @@ -205,17 +224,21 @@ INCLUDE_ATT20C498_DAC = y INCLUDE_ICW_DAC = y INCLUDE_IBMRGB52x_DAC = y INCLUDE_SC1148X_DAC = y +endif # # Comment out any dac you don't want to autodetect. # (not all dacs can be autodetected, at this time) # + +ifeq (y, $(IO_DRIVERS)) INCLUDE_S3_SDAC_DAC_TEST = y INCLUDE_S3_GENDAC_DAC_TEST = y INCLUDE_SC15025_DAC_TEST = y INCLUDE_ATT20C490_DAC_TEST = y INCLUDE_IBMRGB52x_DAC_TEST = y INCLUDE_SC1148X_DAC_TEST = y +endif # Location of the svgalib configuration file. SVGALIB_CONFIG_FILE = $(datadir)/libvga.config --- a/Makefile +++ b/Makefile @@ -173,6 +173,7 @@ installutils: textutils lrmi echo No $(bindir) directory, creating it.; \ mkdir $(bindir); \ fi +ifeq (y, $(IO_DRIVERS)) @echo Installing textmode utilities in $(bindir): @echo "restorefont: Save/restore textmode font." @$(INSTALL_SUID) utils/restorefont $(bindir) @@ -186,6 +187,7 @@ installutils: textutils lrmi @cp utils/textmode $(bindir) @echo "savetextmode: Script that saves textmode information used by 'textmode'." @cp utils/savetextmode $(bindir) +endif @echo "mode3: Restore textmode by setting VESA mode 3." @cp lrmi-0.6m/mode3 $(bindir) @echo "vga_reset: Restore textmode by resetting graphic board." @@ -397,12 +399,16 @@ demoprogs: $(PREDEMO) $(DEMODIRS) done textutils: $(UTILDIRS) +ifeq (y, $(IO_DRIVERS)) (cd utils; \ $(MAKE) -f $(srcdir)/utils/Makefile srcdir="$(srcdir)") +endif lrmi: +ifneq (y, $(NO_ASM)) (cd lrmi-0.6m;\ $(MAKE)) +endif backup: $(BACKUP) --- a/gl/driver.c +++ b/gl/driver.c @@ -33,7 +33,7 @@ static inline int RGB2BGR(int c) /* However bswap is not supported by 386 */ if (MODEFLAGS & MODEFLAG_24BPP_REVERSED) -#ifdef __alpha__ +#if defined(NO_ASSEMBLY) c = ((c >> 0) & 0xff) << 16 | ((c >> 8) & 0xff) << 8 | ((c >> 16) & 0xff) << 0; --- a/src/vgapix.c +++ b/src/vgapix.c @@ -26,7 +26,7 @@ static inline int RGB2BGR(int c) /* However bswap is not supported by 386 */ if (MODEFLAGS & RGB_MISORDERED) -#ifdef __alpha__ +#if defined(NO_ASSEMBLY) c = ((c >> 0) & 0xff) << 16 | ((c >> 8) & 0xff) << 8 | ((c >> 16) & 0xff) << 0; --- a/src/libvga.h +++ b/src/libvga.h @@ -9,7 +9,9 @@ #include # if defined __GLIBC__ && __GLIBC__ >= 2 +# if defined(__alpha__) || defined(__i386__) || defined(__x86_64__) #include +# endif #endif /* --------------------- Macro definitions shared by library modules */ @@ -95,30 +97,13 @@ #define SVGAMODE(mode) (chipset_modeavailable(mode) == SVGADRV) #ifdef __alpha__ -#include -#include -#if defined(CONFIG_ALPHA_JENSEN) -#define DENSE_MEM_BASE EISA_MEM -#define SPARSE_MEM_BASE EISA_MEM -#define MEM_SHIFT 7 -#define MEM_TYPE_BYTE 0x00 -#define MEM_TYPE_WORD 0x20 -#define MEM_TYPE_LONG 0x60 -#elif defined(CONFIG_ALPHA_CABRIOLET) -#define DENSE_MEM_BASE APECS_DENSE_MEM -#define SPARSE_MEM_BASE APECS_SPARSE_MEM -#define MEM_SHIFT 5 -#define MEM_TYPE_BYTE 0x00 -#define MEM_TYPE_WORD 0x08 -#define MEM_TYPE_LONG 0x18 -#elif defined(CONFIG_ALPHA_NONAME) #define DENSE_MEM_BASE LCA_DENSE_MEM #define SPARSE_MEM_BASE LCA_SPARSE_MEM #define MEM_SHIFT 5 #define MEM_TYPE_BYTE 0x00 #define MEM_TYPE_WORD 0x08 #define MEM_TYPE_LONG 0x18 -#endif + #define SPARSE_GRAPH_BASE (SPARSE_MEM_BASE + (0xA0000 << MEM_SHIFT)) #define GRAPH_BASE (DENSE_MEM_BASE + 0xA0000) /* this is wrong for */ #define FONT_BASE (DENSE_MEM_BASE + 0xA0000) /* jensen type hardware */ @@ -216,34 +201,44 @@ extern void __svgalib_releasevt_signal(i extern void __svgalib_acquirevt_signal(int n); #endif -#ifdef __alpha__ - -#include +#if defined(__alpha__) static __inline__ void port_out(int value, int port) { - _outb(value, port); + outb(value, port); } static __inline__ void port_outw(int value, int port) { - _outw(value, port); + outw(value, port); +} + +static __inline__ void port_outl(int value, int port) +{ + outl(value, port); } static __inline__ int port_in(int port) { - return _inb(port); + return inb(port); } static __inline__ int port_inw(int port) { - return _inw(port); + return inw(port); +} + +static __inline__ int port_inl(int port) +{ + return inl(port); } #undef inb #undef inw +#undef inl #undef outb #undef outw +#undef outl extern unsigned long vga_readb(unsigned long base, unsigned long off); extern unsigned long vga_readw(unsigned long base, unsigned long off); @@ -268,6 +263,30 @@ extern void vga_writew(unsigned short b, #define gr_writel(v,off) (*(((unsigned int*)GM)+(off)) = (v)) #endif +#elif defined(NO_ASSEMBLY) + +/* XXX: Completely bogus.. */ +static __inline__ void port_out(int value, int port) { } +static __inline__ void port_outw(int value, int port) { } +static __inline__ void port_outl(int value, int port) { } +static __inline__ int port_in(int port) { return 0; } +static __inline__ int port_inw(int port) { return 0; } +static __inline__ int port_inl(int port) { return 0; } + +#undef inb +#undef inw +#undef inl +#undef outb +#undef outw +#undef outl + +#define gr_readb(off) (((volatile unsigned char *)GM)[(off)]) +#define gr_readw(off) (*(volatile unsigned short*)((GM)+(off))) +#define gr_readl(off) (*(volatile unsigned long*)((GM)+(off))) +#define gr_writeb(v,off) (GM[(off)] = (v)) +#define gr_writew(v,off) (*(unsigned short*)((GM)+(off)) = (v)) +#define gr_writel(v,off) (*(unsigned long*)((GM)+(off)) = (v)) + #else static __inline__ void port_out(int value, int port) --- a/src/vga.c +++ b/src/vga.c @@ -519,7 +519,14 @@ int __svgalib_flipchar = '\x1b'; /* fli /* Chipset specific functions */ +#if defined(INCLUDE_VGA_DRIVER) DriverSpecs *__svgalib_driverspecs = &__svgalib_vga_driverspecs; +#elif defined(INCLUDE_FBDEV_DRIVER) +DriverSpecs *__svgalib_driverspecs = &__svgalib_fbdev_driverspecs; +#else +#warning "Please enable either vgadrv or fbdev as base drivers." +#endif + #ifndef BACKGROUND static void (*__svgalib_setpage) (int); /* gives little faster vga_setpage() */ @@ -537,7 +544,9 @@ static void readconfigfile(void); DriverSpecs *__svgalib_driverspecslist[] = { NULL, /* chipset undefined */ +#ifdef INCLUDE_VGA_DRIVER &__svgalib_vga_driverspecs, +#endif #ifdef INCLUDE_ET4000_DRIVER &__svgalib_et4000_driverspecs, #else @@ -1035,18 +1044,19 @@ void __svgalib_get_perm(void) /* If IOPERM is set, assume permissions have already been obtained */ /* by a calling (exec-ing) process, e.g. ioperm(1). */ - if (CHIPSET != FBDEV && getenv("IOPERM") == NULL) + if (CHIPSET != FBDEV && getenv("IOPERM") == NULL) { #ifdef __alpha__ if (ioperm(0x0000, 0x10000, 1)) { printf("svgalib: Cannot get I/O permissions.\n"); exit(1); } -#else +#elif defined(__i386__) || defined(__x86_64__) if (ioperm(0x3b4, 0x3df - 0x3b4 + 1, 1)) { printf("svgalib: Cannot get I/O permissions.\n"); exit(1); } #endif + } /* Open /dev/mem (also needs supervisor rights; ioperm(1) can be */ /* used together with a special group that has r/w access on */ @@ -1552,9 +1562,11 @@ int __svgalib_getchipset(void) else #endif +#ifdef INCLUDE_VGA_DRIVER_TEST if (__svgalib_vga_driverspecs.test()) CHIPSET = VGA; else +#endif /* else */ { fprintf(stderr, "svgalib: Cannot find EGA or VGA graphics device.\n"); @@ -2211,10 +2223,12 @@ void vga_safety_fork(void (*shutdown_rou */ if (CHIPSET != FBDEV && getenv("IOPERM") == NULL) { +#if defined(__alpha__) || defined(__i386__) || defined(__x86_64__) if (iopl(3) < 0) { printf("svgalib(vga_safety_fork): Cannot get I/O permissions.\n"); exit(1); } +#endif } /* * Actually the mmap's are inherited anyway (and not all are remade here), @@ -2619,9 +2633,11 @@ vga_modeinfo *vga_getmodeinfo(int mode) return &modeinfo; } modeinfo.flags = 0; +#if defined(INCLUDE_VGA_DRIVER) if ((STDVGAMODE(mode) && mode != G320x200x256) || is_modeX) __svgalib_vga_driverspecs.getmodeinfo(mode, &modeinfo); else +#endif /* Get chipset specific info for SVGA modes and */ /* 320x200x256 (chipsets may support more pages) */ chipset_getmodeinfo(mode, &modeinfo); @@ -2950,7 +2966,9 @@ static void savestate(void) memcpy(graph_buf, GM, GRAPH_SIZE); } else if (MODEX || CM == G800x600x16 || (STDVGAMODE(CM) && CM != G320x200x256)) { /* for planar VGA modes, save the full 256K */ +#if defined(INCLUDE_VGA_DRIVER) __svgalib_vga_driverspecs.setmode(GPLANE16, prv_mode); +#endif #ifndef BACKGROUND if ((graph_buf = malloc(4 * GRAPH_SIZE)) == NULL) { #endif @@ -3384,7 +3402,9 @@ void vga_setdisplaystart(int a) /* SVGA card, use the standard VGA function */ /* that works properly for Mode X. */ /* Same goes for 16 color modes. */ +#if defined(INCLUDE_VGA_DRIVER) __svgalib_vga_driverspecs.setdisplaystart(a); +#endif return; } /* Call the regular display start function for the chipset */ --- a/gl/scale.c +++ b/gl/scale.c @@ -10,10 +10,18 @@ #include "def.h" -/* #define USE_ASM */ +#if defined (NO_ASSEMBLY) +#undef USE_ASM +#else +/* + * XXX: The asm code needs fixing +#define USE_ASM + */ +#undef USE_ASM +#endif -#ifdef __alpha__ +#ifdef NO_ASSEMBLY static inline int muldiv64(int m1, int m2, int d) { @@ -41,7 +49,7 @@ static inline int muldiv64(int m1, int m return result; } -#endif /* !__alpha__ */ +#endif /* This is a DDA-based algorithm. */ /* Iteration over target bitmap. */ --- a/src/Makefile +++ b/src/Makefile @@ -20,7 +20,7 @@ INCLUDES += -I$(srcdir)/src -I$(srcdir)/ # Rules Section #---------------------------------------------------------------------- -DRIVERS = vgadrv.o regextr.o modetab.o +DRIVERS = regextr.o modetab.o MODULES = vga.o \ vgadraw.o vgaclear.o vgaline.o vgapix.o \ vgapal.o vgacol.o vgamodesel.o vgamisc.o \ @@ -66,6 +66,13 @@ ifdef DEBUG_CONF DEFINES += -DDEBUG_CONF endif +ifdef INCLUDE_VGA_DRIVER + VGA_DEFINES += -DINCLUDE_VGA_DRIVER + DRIVERS += vgadrv.o + ifdef INCLUDE_VGA_DRIVER_TEST + VGA_DEFINES += -DINCLUDE_VGA_DRIVER_TEST + endif +endif ifdef INCLUDE_ET4000_DRIVER VGA_DEFINES += -DINCLUDE_ET4000_DRIVER DRIVERS += et4000.o vgahico.o --- a/src/vgaconvplanar.c +++ b/src/vgaconvplanar.c @@ -10,7 +10,7 @@ #include "vga.h" #include "libvga.h" -#if defined(__alpha__) || defined (NO_ASSEMBLY) +#if defined (NO_ASSEMBLY) #undef USE_ASM #else #define USE_ASM debian/patches/008_mouse_unconfigured.patch0000644000000000000000000000500211735000254016117 0ustar Index: b/src/config/libvga.config =================================================================== --- a/src/config/libvga.config +++ b/src/config/libvga.config @@ -31,7 +31,15 @@ # mouse DRMOUSE4DS # Digital Research double-wheeled mouse # mouse none # None -mouse Microsoft +mouse unconfigured + +# (DEBIAN NOTE: the mouse used to default to microsoft, but this was changed +# to fix bug #13458. If your mouse used to work fine, you can simply change +# it back to read "microsoft" again. If you are careful to change *only that +# one word*, and not to add or remove extra whitespace, the package +# installation will continue to update this file without requiring user +# intervention because of a modified config file. +# This applies to all mouse types, not just microsoft.) # Mouse/keyboard customisation by 101 (Attila Lendvai). If you have any good # ideas you can reach me at 101@kempelen.inf.bme.hu Index: b/src/mouse/mouse.c =================================================================== --- a/src/mouse/mouse.c +++ b/src/mouse/mouse.c @@ -47,6 +47,13 @@ int mouse_init_return_fd(char *dev, int currentinthandler = NULL; /* Initialize mouse device. */ + if (m_type == MOUSE_UNCONFIGURED) { + fprintf(stderr, + "Warning: you have not yet configured your mouse type. If you have no mouse,\n" + "setting the type to `none' in " SVGALIB_CONFIG_FILE " will get rid of this\n" + "annoying message.\n"); + return -1; + } if (m_type == MOUSE_NONE || m_type < MOUSE_MICROSOFT || m_type > MOUSE_LAST) return -1; if (ms_init()) Index: b/src/mouse/vgamouse.h =================================================================== --- a/src/mouse/vgamouse.h +++ b/src/mouse/vgamouse.h @@ -24,7 +24,8 @@ extern "C" #define MOUSE_PNP 12 #define MOUSE_WACOM_GRAPHIRE 13 #define MOUSE_DRMOUSE4DS 14 -#define MOUSE_LAST MOUSE_DRMOUSE4DS +#define MOUSE_UNCONFIGURED 15 +#define MOUSE_LAST MOUSE_UNCONFIGURED #define MOUSE_ORIENTATION_VERTICAL 0 #define MOUSE_ORIENTATION_HORIZONTAL 1 Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -3589,7 +3589,7 @@ static char *conf_mousenames[] = { "Microsoft", "MouseSystems", "MMSeries", "Logitech", "Busmouse", "PS2", "MouseMan", "gpm", "Spaceball", "none", "IntelliMouse", "IMPS2", "pnp", - "WacomGraphire", "DRMOUSE4DS", NULL}; + "WacomGraphire", "DRMOUSE4DS", "unconfigured", NULL}; static int check_digit(char *ptr, char *digits) { debian/patches/030_manpages_typos.patch0000644000000000000000000004373311735000254015260 0ustar Author: A Costa Author: Justin Pryzby Author: Guillem Jover --- doc/man5/libvga.config.5 | 50 +++++++++++++++++++++++----------------------- doc/man7/svgalib.7 | 12 +++++------ doc/man7/svgalib.chips.7 | 4 --- doc/man7/svgalib.et4000.7 | 14 ++++++------ doc/man7/svgalib.faq.7 | 4 +-- doc/man7/svgalib.mach32.7 | 34 +++++++++++++++---------------- doc/man7/vgagl.7 | 2 - 7 files changed, 59 insertions(+), 61 deletions(-) --- a/doc/man5/libvga.config.5 +++ b/doc/man5/libvga.config.5 @@ -12,7 +12,7 @@ and the end of the line is ignored. Empt ignored. Since the driver you will use may not know all config options here, unknown commands are silently ignored. Please think of that when something does not work as you expect. I know this is a nuisance -because misformed configuration statements do not cause +because malformed configuration statements do not cause errors. Multiple commands are allowed in one line, and commands can exceed lines. @@ -42,9 +42,9 @@ files before. Configuration commands which control hardware settings that might cause harm to your hardware are called -.BR priviledged . +.BR privileged . By default the -.B priviledged +.B privileged commands can only be used in the main configuration file .I /etc/vga/libvga.config @@ -65,7 +65,7 @@ except for debugging/testing purposes. .SH REQUIRED CONFIGURATION Please do not allow the vastness of options to confuse you. Generally -svgalib uses well choosen defaults and is able to autodetect +svgalib uses well chosen defaults and is able to autodetect everything. Thus generally you don't need to specify much. When installing svgalib it provides a sample .I /etc/vga/libvga.config @@ -131,7 +131,7 @@ if you have an Icd2061a clockchip. if your Ramdac is not detected properly. .TP .BI "Dacspeed " speed -if the default choosen is not right (probably too restrictive). +if the default chosen is not right (probably too restrictive). .PP The remaining options are really only to be used in case of problems which you'll not generally encounter. @@ -252,8 +252,8 @@ Other mice might need .B clearDTR as well or one set and clear. Try yourself. -Note: Having crtscts handshake enabled on the mouse tty may interfer with this -options. Do not do that. +Note: Having crtscts handshake enabled on the mouse tty may interfere with this +option. Do not do that. Finally, a special goodie for wheel mice: @@ -374,7 +374,7 @@ linear The acceleration factor grows linear with the delta until it reaches .BR mouse_accel_thresh . -After that it is a simple mutiplication. +After that it is a simple multiplication. (I know that it can be done with setting .B mouse_accel_power to 1, but @@ -579,7 +579,7 @@ and a decimal point for this too: .BR "monitor 40.0" " # equivalent to monitor 3" This command is -.BR priviledged . +.BR privileged . .SS Mode timings It is now possible to define modetimings for some cards (see the info on your card @@ -641,7 +641,7 @@ Sync polarity, interlace mode Everything should be on one line. The values for the horizontal timings must be multiples of eight. -These are prefered over the default timings (if monitor and chipset +These are preferred over the default timings (if monitor and chipset can handle them). The format is identical to the one used by XFree86, but the label following the modeline keyword is ignored by vgalib. @@ -714,7 +714,7 @@ to enforce autodetection. Warning, incorrect settings may damage your hardware. This command is -.BR priviledged . +.BR privileged . .TP .BI "chipset " "type param1 param2" @@ -734,7 +734,7 @@ Note that there is a more convenient com for enforcing specific memory-aperture configurations for Mach32 This command is -.BR priviledged . +.BR privileged . .SS Specific options required for the EGA-driver. .TP @@ -745,7 +745,7 @@ Card is in monochrome emulation mode Card is in color emulation mode This command is -.BR priviledged . +.BR privileged . .SS RAMDAC configuration Some chipsets (e.g. S3 and ARK) allow specifying a RAMDAC type. If @@ -821,7 +821,7 @@ Configure for a programmable clockchip. .B ICD2061A is the only one supported right now. -.SS Miscanellous options +.SS Miscellaneous options .TP .B security revoke-all-privs Make sure it is impossible to regain root access @@ -846,7 +846,7 @@ Allow (not enforce!) use of a linear mma .TP .B overrideenable Allow -.B priviledged +.B privileged commands outside the main configuration file. .SS Common options currently used by Mach32 only @@ -883,7 +883,7 @@ is 2000 to disable this feature. The .B maxclock commands are -.BR priviledged . +.BR privileged . .TP .BI "clocks " "list of clocks" @@ -940,7 +940,7 @@ for additional info on clocks. The .B clocks command is -.BR priviledged . +.BR privileged . .TP .B variablelinelength @@ -984,7 +984,7 @@ below. The linelength commands are -.BR "not priviledged" . +.BR "not privileged" . In the following commands a mode is specified with .IR horz X vert X colors . @@ -1006,7 +1006,7 @@ disallows the maybe toasted mach32 800x6 The .B inhibit command is -.BR "not priviledged" . +.BR "not privileged" . .TP .BI "setlinelength " length " " mode1 " [" mode2 " " mode3 "...]" @@ -1029,7 +1029,7 @@ the Mach32 will generate a noisy video s The .B setlinelength command is -.BR "not priviledged" . +.BR "not privileged" . .TP .BI "define " mode1 " [" mode2 " " mode3 "...] " "clock horz_timing vert_timing flags" @@ -1091,7 +1091,7 @@ a 32K and 64K mode. The .B define command is -.BR priviledged . +.BR privileged . .PP There is one really dangerous option (except faking clocks). Please @@ -1132,7 +1132,7 @@ in the EEPROM. The .B setuplinear command is -.BR priviledged . +.BR privileged . .TP .BI "blit " "subcommand1 subcommand2" " ..." @@ -1144,7 +1144,7 @@ Valid are .BR bit ", " fill ", " image ", and " hlinelist . They enable support for the -corresponding blit functions. Preceed them with +corresponding blit functions. Precede them with .B no to turn them off (no space after .B no @@ -1215,7 +1215,7 @@ Mach32 default is: The .B blit command is -.BR "not priviledged" . +.BR "not privileged" . .PP The Mach32 has also a few intermediate debug options for low level timing adjust. @@ -1248,7 +1248,7 @@ completely. For example: For details about these options see .BR svgalib.mach32 (7). All of them are -.BR "priviledged" . +.BR "privileged" . .SH OBSOLETE COMMANDS Very old svgalib versions used a different style configuration file. For compatibility, --- a/doc/man7/svgalib.7 +++ b/doc/man7/svgalib.7 @@ -62,7 +62,7 @@ text mode (after calling .BR vga_init (3)) will also take place at this new console. -Alas, some games misuse their suid root priviledge and run as full root +Alas, some games misuse their suid root privilege and run as full root process. svgalib cannot detect this and allows Joe Blow User to open a new VC on the console. If this annoys you, .B ROOT_VC_SHORTCUT @@ -202,7 +202,7 @@ Please see for details. There are demos with sources available which will also help to get you started, in -recomended order of interest: +recommended order of interest: .BR vgatest (6), .BR keytest (6), .BR mousetest (6), @@ -247,7 +247,7 @@ calls before it returns to the debugger, This will only work if your program and the debugger run in the same virtual linux console. .SH 3. DESCRIPTION OF SVGALIB FUNCTIONS -Each function has it's own section 3 manual page. For a list of +Each function has its own section 3 manual page. For a list of .BR vgagl " functions see " vgagl (7). .PD 0 @@ -756,7 +756,7 @@ force noninterlaced. .B bit0 = false force interlaced which only matters on 8900's with at least 1M since there is no 512K interlaced mode on the 8900 or any of the other cards. -.RH +.RE .SS Tseng ET4000/ET4000W32(i/p) @@ -859,7 +859,7 @@ Please see .SS ATI Mach64 The rage.c driver works only on mach64 based cards with internal DAC. The driver might misdetect the base frequency the card uses, so if when setting -any svgalib modes the screen blanks, or complains about out of bound freqencies, +any svgalib modes the screen blanks, or complains about out of bound frequencies, or the display is unsynced, then try adding the option .BR RageDoubleClock to the config file. @@ -920,7 +920,7 @@ Frodo Looijaard to reena right now if they might have broken OTI-087 support. The author of the '87 support Christopher Wiles owns no longer an OTI-087 card and can thus no longer give optimal support to this driver. Thus you might be -better off contacting me or Frodo for questions. If you are a knowledgable +better off contacting me or Frodo for questions. If you are a knowledgeable OTI-087 user and experience problems you are welcome to provide fixes. No user of a OTI-087 is currently known to me, so if you are able to fix problems with the driver please do so --- a/doc/man7/svgalib.et4000.7 +++ b/doc/man7/svgalib.et4000.7 @@ -27,7 +27,7 @@ svgalib.et4000, libvga.et4000 \- Informa .SH 1. BASICS OF ET4000 CARDS -Basicly all ET4000 cards are equal, some are even more equal ... +Basically all ET4000 cards are equal, some are even more equal ... The Chipset is well documented (by Tseng Labs and eg. the vgadoc2.zip) and all graphics functions can be used the same way on different cards @@ -52,7 +52,7 @@ VRAM equipped cards, please tell us abou By now we found is no reliable way to detect the memory organisation/ timing and the DAC type/capabilities. Most modern card use a frequency -synthizier and provide the following pixel frequencies (in MHz): +synthesizer and provide the following pixel frequencies (in MHz): .RS .B 50.350 56.644 65.0 72.0 80.0 89.8 63.0 75.0 @@ -214,7 +214,7 @@ Most ET4000 cards provide 640x350 and 64 generates the related register sets. You may also use .BR dumpreg (1) from an X window to grab you favourite X graphics mode. -The X mode normaly isn't usable directly. See +The X mode normally isn't usable directly. See .I cardex.w32 for an example and .I et4000.c @@ -232,7 +232,7 @@ register set to In the .I et4000/ -subdir of teh svgalib distribution you'll find some sample register sets: +subdir of the svgalib distribution you'll find some sample register sets: .TP .B cardex.w32 @@ -269,8 +269,8 @@ the Newer ET4000 chipsets (eg. W32 and W32i) allow up to 32 clock frequencies. Two additional register values were added just before the -old extened register value. The new registers are CRTC/30h and CRTC/31h. -The old register set had 71 values, the new growed to 73. +old extended register value. The new registers are CRTC/30h and CRTC/31h. +The old register set had 71 values, the new has grown to 73. You may update your old register set by hand: .IP - @@ -283,7 +283,7 @@ for each mode .RS change the number of register values from 71 to 73 .br -add the values from dumreg output at front of last data line +add the values from dumpreg output at front of last data line .RE .RE .IP - --- a/doc/man7/svgalib.faq.7 +++ b/doc/man7/svgalib.faq.7 @@ -148,7 +148,7 @@ However, though logged in not directly f am the owner of the console. .SS A) -Alas, some programs use their suid root priviledge and become a full +Alas, some programs use their suid root privilege and become a full root owned process. svgalib thinks they are run by root which does not own the current console. Defining @@ -311,7 +311,7 @@ in that support. Ok, just for completeness, what are your plans about svgalib anyway? First, make svgalib cooperate nicely with kernel fb device. Then (and it should -be very similiar) make svgalib work on a secondary vga card. +be very similar) make svgalib work on a secondary vga card. A rewrite of the code for memory handling and virtual console handling is necessary for the previous goals, but is also necessary in itself, and so will be done --- a/doc/man7/svgalib.mach32.7 +++ b/doc/man7/svgalib.mach32.7 @@ -13,7 +13,7 @@ svgalib.mach32 \- Information on the Mac .br .BR " 4. " "Third party cards" .br -.BR " 5. " "Logical linewidth" +.BR " 5. " "Logical line width" .br .BR " 6. " "Noisy video signals" .br @@ -195,7 +195,7 @@ commands below (if they have problems wi I had to learn that those cards seem to use not only non standard clocks for the Mach32, but also for the included SVGA. However, since people often like to use proprietary, non standard VGA -(read 80x25) textmodes, the Mach32 driver has to set the included SVGA to +(read 80x25) text modes, the Mach32 driver has to set the included SVGA to a VGA compatible clock frequency. Otherwise svgalib has problems using plain VGA modes. This screws VGA modes up if these clocks have different values on third party Mach32 cards. @@ -224,7 +224,7 @@ Often is special in that the driver will not touch any SVGA timings. This requires the Mach32 SVGA part to be in a VGA compatible mode when the svgalib application is started, that is, -you must use 80x25 (maybe 80x50) console textmodes. +you must use 80x25 (maybe 80x50) console text modes. .PP As I mentioned already, @@ -236,7 +236,7 @@ locks up the card & system. Fortunately is only used for some DAC fine tuning (actually the setting you can fine tune with the .B blank -command) which is only of barely noticable effect to the screen. +command) which is only of barely noticeable effect to the screen. The following configuration commands exist to support AST cards: @@ -332,7 +332,7 @@ Ramdac type is queried from Mach32 chip. .IP .I memory -is the amount of videomemory in KB. +is the amount of video memory in KB. .PP Note that the type of the ramdac can be set more conveniently with the .B ramdac @@ -340,19 +340,19 @@ command. .SH 5. LOGICAL LINEWIDTH At least my VRAM card seems to be very peculiar about logical -linewidths. From my experience a multiple of 64 pels is needed. +line widths. From my experience a multiple of 64 pels is needed. Your mileage may vary. Use the config file options to adjust it and tell me if your card needs a different value. Include the name and model number of the card and what the correct numbers should be. This is so that I can correct the auto configuration of the driver. If some svgalib application has problems, note that you can -force the logical linewidth to the default value from the -configfile. Probably this will lead to glitches in some 800x600 +force the logical line width to the default value from the +config file. Probably this will lead to glitches in some 800x600 resolutions. You can .B inhibit -these resolutions from the configfile -as well. Apropos glitches, I found no guidelines as to what clockrates +these resolutions from the config file +as well. Apropos glitches, I found no guidelines as to what clock rates to use due to memory restrictions. I adjusted the driver, such that I get a stable pic in all resolutions. However sometimes the screen is disturbed by heavy video memory accesses. If you don't like that, @@ -514,7 +514,7 @@ Then you can decide to use the partial i .B mach32eeprom ignore usetimings -to use the videomodes that are defined in the EEPROM (if no better modes are +to use the video modes that are defined in the EEPROM (if no better modes are known by the driver). This is usually safe, because the driver knows which modes are safe for your hardware (if .BR clocks ", " monitor " and " ramdac @@ -589,17 +589,17 @@ are: Don't complain about checksum and don't use any EEPROM contents. .TP .B useaperture -Use the configuration for the memoryaperture given in the EEPROM. +Use the configuration for the memory aperture given in the EEPROM. .TP .B usetimings -Use videomodes found in the EEPROM of the board. +Use video modes found in the EEPROM of the board. .TP .B nofile Forget about any filename that maybe was already configured. Don't read a file, don't create one. .TP .BI "file " filename -Newstyle form to specify the +New style form to specify the .IR filename ; On contrary to the .BI "mach32eeprom " filename @@ -672,7 +672,7 @@ cannot use that, use to find the address in .B MEM_CFG. Then, -.BR "if it is a senseable setting for your system" , +.BR "if it is a sensible setting for your system" , enable a 4MB aperture at that address with .BR setuplinear . Ensure that no other card or memory uses the address range you choose. @@ -717,14 +717,14 @@ This is no hard restriction as the 16 cl Thus if you setup some mode yourself try to use one of the divided clocks in your timings and I can use the undivided clocks internally. -It is a real restriction for 16M colors. ATI themself only supports 25MHz +It is a real restriction for 16M colors. ATI itself only supports 25MHz (640x480) here by use of a 75MHz clock. Depending on your clock chip other values may be usable as well. Even the doubled/tripled clocks have to be less than the magic 80 MHz. However the driver does all this itself. It may just happen that some of the predefined or one of your handmade mode-timings can't be used because the clock that is used cannot be doubled/tripled. Even though there is already some tolerance in the driver you may fix that by -slighty changing the clock values that you set with the +slightly changing the clock values that you set with the .B clocks command. But note that this will as well affect the ability of the driver to calculate --- a/doc/man7/svgalib.chips.7 +++ b/doc/man7/svgalib.chips.7 @@ -118,9 +118,7 @@ to use a different value that might be m .TP .B nolinear This option disables the use of the linear framebuffer. This might -be useful for machines that have broken linear framebuffers. In -lar the linear framebuffer doesn't seem to work with the -achines. +be useful for machines that have broken linear framebuffers. .TP .B linear --- a/doc/man7/vgagl.7 +++ b/doc/man7/vgagl.7 @@ -1,6 +1,6 @@ .TH vgagl 7 "2 Aug 1997" "Svgalib (>= 1.2.11)" "Svgalib User Manual" .SH NAME -vgagl \- a fast framebuffer-level graphics library based ion svgalib +vgagl \- a fast framebuffer-level graphics library based on svgalib .SH TABLE OF CONTENTS .BR 0. " Introduction" debian/patches/017_use_syslog.patch0000644000000000000000000000203111735000254014412 0ustar Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -38,6 +38,7 @@ #include "vgaregs.h" #include "vgaversion.h" +#include #ifdef BACKGROUND #include "vgabg.h" @@ -2519,6 +2520,12 @@ void vga_gettextfont(void *font) { unsigned int getsize; + /* robert@debian.org, May, 26th 2002: check for valid font_buf buffer */ + if (!font_buf1) { + syslog(LOG_DEBUG, "svgalib: uninitialized variable: font_buf1"); + return; + } + getsize = fontbufsize; if (getsize > FONT_SIZE) getsize = FONT_SIZE; @@ -2530,6 +2537,12 @@ void vga_gettextfont(void *font) void vga_puttextfont(void *font) { unsigned int putsize; + + /* robert@debian.org, May, 26th 2002: check for valid font_buf buffer */ + if (!font_buf1 || !font_buf2) { + syslog(LOG_DEBUG, "svgalib: uninitialized variable: font_buf1 or font_buf2"); + return; + } #ifdef BACKGROUND if (-1 == mprotect(font_buf1,FONT_SIZE*2,PROT_READ|PROT_WRITE)) debian/patches/024_vesa_not_print_crap.patch0000644000000000000000000000054111735000254016257 0ustar Author: Christian Häggström Index: b/src/vesa.c =================================================================== --- a/src/vesa.c +++ b/src/vesa.c @@ -375,8 +375,6 @@ static int vesa_init(int force, int par1 return 1; }; -printf("%x\n",address ); - __svgalib_textprog|=1; /* Get I/O priviledge */ debian/patches/005_vesa_storage.patch0000644000000000000000000000065111735000254014703 0ustar Index: b/src/driver.h =================================================================== --- a/src/driver.h +++ b/src/driver.h @@ -17,7 +17,7 @@ #include "timing.h" #include "accel.h" -#define MAX_REGS 5000 /* VESA needs a lot of storage space */ +#define MAX_REGS 11196 /* VESA needs a lot of storage space */ typedef struct { void (*savepalette)(unsigned char *red, unsigned char *green, unsigned char *blue); debian/patches/006_invalid_cpp_token.patch0000644000000000000000000000054311735000254015712 0ustar Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -3914,7 +3914,7 @@ static char *process_option(int command, #define ML_GETINT(x) \ ptr = strtok(NULL, " "); if(!ptr) break; \ - mmt.##x = atoi(ptr); + mmt.x = atoi(ptr); ML_GETINT(HDisplay); ML_GETINT(HSyncStart); debian/patches/040_x86emu.patch0000644000000000000000000002351311735000254013356 0ustar Author: Matthew Garrett Author: Guillem Jover Index: b/src/Makefile =================================================================== --- a/src/Makefile +++ b/src/Makefile @@ -189,7 +189,8 @@ ifdef INCLUDE_APM_DRIVER endif ifdef INCLUDE_VESA_DRIVER VGA_DEFINES +=-DINCLUDE_VESA_DRIVER - DRIVERS += vesa.o lrmi.o + DRIVERS += vesa.o + SHLIBLIBS += -lx86 ifdef INCLUDE_VESA_DRIVER_TEST VGA_DEFINES += -DINCLUDE_VESA_DRIVER_TEST endif Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -4205,12 +4205,6 @@ static char *process_option(int command, break; case 66: /* cpu type */ ptr = strtok(NULL, " "); -#ifdef INCLUDE_VESA_DRIVER - if(ptr!=NULL){ - j = atoi(ptr); - __svgalib_lrmi_cpu_type=j; - }; -#endif break; case 67: __svgalib_neolibretto100=1; Index: b/lrmi-0.6m/Makefile =================================================================== --- a/lrmi-0.6m/Makefile +++ b/lrmi-0.6m/Makefile @@ -1,7 +1,5 @@ CFLAGS = -g -Wall -sources = lrmi.c -objects = lrmi.o all = vbetest mode3 vga_reset vbemodeinfo %.o: %.c @@ -9,17 +7,17 @@ all = vbetest mode3 vga_reset vbemodeinf all: $(all) -vbetest: vbetest.c lrmi.o - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ +vbetest: vbetest.c + $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ -lx86 -mode3: mode3.c lrmi.o - $(CC) $(CFLAGS) -o $@ $^ +mode3: mode3.c + $(CC) $(CFLAGS) -o $@ $^ -lx86 -vbemodeinfo: vbemodeinfo.c lrmi.o - $(CC) $(CFLAGS) -o $@ $^ +vbemodeinfo: vbemodeinfo.c + $(CC) $(CFLAGS) -o $@ $^ -lx86 -vga_reset: vga_reset.c lrmi.o - $(CC) $(CFLAGS) -o $@ $^ +vga_reset: vga_reset.c + $(CC) $(CFLAGS) -o $@ $^ -lx86 install: mode3 vga_reset install mode3 /sbin Index: b/Makefile =================================================================== --- a/Makefile +++ b/Makefile @@ -188,10 +188,12 @@ ifeq (y, $(IO_DRIVERS)) @echo "savetextmode: Script that saves textmode information used by 'textmode'." @cp utils/savetextmode $(bindir) endif +ifeq (y, $(LIBX86)) @echo "mode3: Restore textmode by setting VESA mode 3." @cp lrmi-0.6m/mode3 $(bindir) @echo "vga_reset: Restore textmode by resetting graphic board." @cp lrmi-0.6m/vga_reset $(bindir) +endif @echo "Installing keymap utilities in $(bindir):" @echo "svgakeymap: Perl script that generates scancode conversion maps." @cp utils/svgakeymap $(bindir) @@ -405,7 +407,7 @@ ifeq (y, $(IO_DRIVERS)) endif lrmi: -ifneq (y, $(NO_ASM)) +ifeq (y, $(LIBX86)) (cd lrmi-0.6m;\ $(MAKE)) endif Index: b/Makefile.cfg =================================================================== --- a/Makefile.cfg +++ b/Makefile.cfg @@ -63,6 +63,10 @@ ifneq (,$(findstring $(arch),i386 x86_64 IO_DRIVERS = y endif +ifneq (,$(findstring $(arch),i386 x86_64)) +LIBX86 = y +endif + # Uncomment this if you want root processes to be able to always get a new # VC. Alas, some games misuse suid root privs and become root, svgalib cannot # detect this and will allow Joe blow user to open a new virtual VC. If this @@ -151,7 +155,9 @@ INCLUDE_CHIPS_DRIVER = y INCLUDE_APM_DRIVER = y INCLUDE_NV3_DRIVER = y INCLUDE_ET6000_DRIVER = y +ifeq (y, $(LIBX86)) INCLUDE_VESA_DRIVER = y +endif INCLUDE_MX_DRIVER = y INCLUDE_PARADISE_DRIVER = y INCLUDE_RAGE_DRIVER = y Index: b/src/vesa.c =================================================================== --- a/src/vesa.c +++ b/src/vesa.c @@ -17,7 +17,7 @@ #include "vgaregs.h" #include "interface.h" #include "accel.h" -#include "lrmi.h" +#include #include "vbe.h" #define VESAREG_SAVE(i) (VGA_TOTAL_REGS+i) #define VESA_TOTAL_REGS (VGA_TOTAL_REGS + 4024) @@ -52,13 +52,13 @@ static void vesa_setpage(int page) vesa_r.eax=0x4f05; vesa_r.ebx=0; vesa_r.edx=page*64/vesa_granularity; -__svgalib_LRMI_int(0x10,&vesa_r); +LRMI_int(0x10,&vesa_r); if(vesa_read_write){ vesa_r.eax=0x4f05; vesa_r.ebx=1; vesa_r.edx=page*64/vesa_granularity; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); }; } @@ -102,7 +102,7 @@ static void vesa_getmodeinfo(int mode, v vesa_r.es = (unsigned int)vesa_data.mode >> 4; vesa_r.edi = (unsigned int)vesa_data.mode & 0xf; - if (!__svgalib_LRMI_int(0x10, &vesa_r)) { + if (!LRMI_int(0x10, &vesa_r)) { fprintf(stderr, "Can't get mode info (vm86 failure)\n"); return; } @@ -119,7 +119,7 @@ static int vesa_saveregs(unsigned char r vesa_r.es=((long)buf)>>4; vesa_r.edx=1; vesa_r.ecx=__svgalib_VESA_savebitmap; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); memcpy(®s[VGA_TOTAL_REGS],buf,vesa_regs_size); return vesa_regs_size; } @@ -137,7 +137,7 @@ static void vesa_setregs(const unsigned vesa_r.es=((long)buf)>>4; vesa_r.edx=2; vesa_r.ecx=__svgalib_VESA_savebitmap; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); } @@ -179,7 +179,7 @@ static int vesa_setmode(int mode, int pr if(__svgalib_vesatext){ vesa_r.eax=0x4f02; /* make sure we are in a regular VGA mode before we start */ vesa_r.ebx=__svgalib_VESA_textmode; /* without this, if we start in SVGA mode the result might */ - __svgalib_LRMI_int(0x10,&vesa_r); /* be something weird */ + LRMI_int(0x10,&vesa_r); /* be something weird */ }; return __svgalib_vga_driverspecs.setmode(mode, prv_mode); } @@ -187,13 +187,13 @@ static int vesa_setmode(int mode, int pr vesa_r.eax=0x4f02; vesa_r.ebx=SVGALIB_VESA[mode]|0x8000|(vesa_is_linear*0x4000); vesa_last_mode_set=vesa_r.ebx; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); vesa_r.eax = 0x4f01; vesa_r.ecx=SVGALIB_VESA[mode]; vesa_r.es = (unsigned int)vesa_data.mode >> 4; vesa_r.edi = (unsigned int)vesa_data.mode&0xf; - __svgalib_LRMI_int(0x10, &vesa_r); + LRMI_int(0x10, &vesa_r); vesa_logical_width=vesa_data.mode->bytes_per_scanline; vesa_bpp=(vesa_data.mode->bits_per_pixel+7)/8; if(vesa_logical_width==0) vesa_logical_width=vesa_bpp*vesa_data.mode->x_resolution; @@ -239,15 +239,15 @@ static int vesa_test(void) } lrmi_inited=1; - __svgalib_LRMI_init(); - vesa_data.info = __svgalib_LRMI_alloc_real(sizeof(struct vbe_info_block) + LRMI_init(); + vesa_data.info = LRMI_alloc_real(sizeof(struct vbe_info_block) + sizeof(struct vbe_mode_info_block)); vesa_data.mode = (struct vbe_mode_info_block *)(vesa_data.info + 1); vesa_r.eax = 0x4f00; vesa_r.es = (unsigned int)vesa_data.info >> 4; vesa_r.edi = 0; - __svgalib_LRMI_int(0x10, &vesa_r); + LRMI_int(0x10, &vesa_r); if (vesa_r.eax!=0x4f) return 0; return !vesa_init(0,0,0); } @@ -259,14 +259,14 @@ static void vesa_setrdpage(int page) vesa_r.eax=0x4f05; vesa_r.ebx=vesa_read_window; vesa_r.edx=page*64/vesa_granularity; -__svgalib_LRMI_int(0x10,&vesa_r); +LRMI_int(0x10,&vesa_r); } static void vesa_setwrpage(int page) { vesa_r.eax=0x4f05; vesa_r.ebx=vesa_write_window; vesa_r.edx=page*64/vesa_granularity; -__svgalib_LRMI_int(0x10,&vesa_r); +LRMI_int(0x10,&vesa_r); } @@ -279,7 +279,7 @@ static void vesa_setdisplaystart(int add vesa_r.ecx=address % vesa_logical_width; vesa_r.edx=address / vesa_logical_width; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); } @@ -290,7 +290,7 @@ static void vesa_setlogicalwidth(int wid vesa_r.eax=0x4f06; vesa_r.ebx=0; vesa_r.ecx=width / vesa_bpp ; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); vesa_logical_width=vesa_r.ebx; } @@ -300,14 +300,14 @@ static int vesa_linear(int op, int param if (op==LINEAR_ENABLE) { vesa_r.eax=0x4f02; vesa_r.ebx=vesa_last_mode_set|0x4000; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); vesa_is_linear=1; }; if (op==LINEAR_DISABLE){ vesa_r.eax=0x4f02; vesa_r.ebx=vesa_last_mode_set; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); vesa_is_linear=0; }; if (op==LINEAR_QUERY_BASE) {return vesa_linear_base ;} @@ -391,8 +391,8 @@ static int vesa_init(int force, int par1 }; if(!lrmi_inited) { - __svgalib_LRMI_init(); - vesa_data.info = __svgalib_LRMI_alloc_real(sizeof(struct vbe_info_block) + LRMI_init(); + vesa_data.info = LRMI_alloc_real(sizeof(struct vbe_info_block) + sizeof(struct vbe_mode_info_block)); vesa_data.mode = (struct vbe_mode_info_block *)(vesa_data.info + 1); lrmi_inited=1; @@ -405,7 +405,7 @@ static int vesa_init(int force, int par1 memcpy(vesa_data.info->vbe_signature, "VBE2", 4); - __svgalib_LRMI_int(0x10, &vesa_r); + LRMI_int(0x10, &vesa_r); if ((vesa_r.eax & 0xffff) != 0x4f || strncmp(vesa_data.info->vbe_signature, "VESA", 4) != 0) { fprintf(stderr,"No VESA bios detected!\n"); @@ -435,7 +435,7 @@ static int vesa_init(int force, int par1 if((vesa_chiptype>=1)&&(vesa_data.mode->mode_attributes&0x80)) vesa_linear_base=vesa_data.mode->phys_base_ptr; - if (!__svgalib_LRMI_int(0x10, &vesa_r)) { + if (!LRMI_int(0x10, &vesa_r)) { fprintf(stderr, "Can't get mode info (vm86 failure)\n"); return 1; } @@ -559,7 +559,7 @@ static int vesa_init(int force, int par1 vesa_r.edx=0; vesa_r.ecx=__svgalib_VESA_savebitmap; vesa_r.ebx=0; - __svgalib_LRMI_int(0x10,&vesa_r); + LRMI_int(0x10,&vesa_r); vesa_regs_size=vesa_r.ebx*64; SVGALIB_VESA[TEXT]=3; @@ -580,7 +580,7 @@ static int vesa_init(int force, int par1 cardspecs->matchProgrammableClock=vesa_match_programmable_clock; __svgalib_driverspecs = &__svgalib_vesa_driverspecs; - LRMI_mem1 = __svgalib_LRMI_alloc_real(vesa_regs_size); + LRMI_mem1 = LRMI_alloc_real(vesa_regs_size); __svgalib_banked_mem_base=0xa0000; __svgalib_banked_mem_size=0x10000; debian/patches/021_gl_expandchar_3_bytes_pp.patch0000644000000000000000000000060611735000254017145 0ustar Author: Peter P. Eiserloh Index: b/gl/text.c =================================================================== --- a/gl/text.c +++ b/gl/text.c @@ -288,7 +288,7 @@ static void expandcharacter(int bg, int break; case 3: *(ushort *) bitmap = bg; - *(bitmap + 2) = bg; + *(bitmap + 2) = bg >> 16; bitmap += 3; break; case 4: debian/patches/010_fPIC.patch0000644000000000000000000000106311735000254012774 0ustar Index: b/src/Makefile =================================================================== --- a/src/Makefile +++ b/src/Makefile @@ -407,9 +407,11 @@ libvgagl.a: FORCE vga.o: vga.c $(CC) $(CFLAGS) $(VGA_DEFINES) -c -o $@ $< -#lrmi must NOT be compiled as -fPIC +# XXX: Upstream used this so it may break, disabled to close an RC +# lrmi must NOT be compiled as -fPIC lrmi.o: lrmi.c - $(CC) $(CFLAGS:-fPIC=) -c -o $@ $< + $(CC) $(CFLAGS) -c -o $@ $< +# $(CC) $(CFLAGS:-fPIC=) -c -o $@ $< $(RAMDAC): %.o: %.c $(CC) $(CFLAGS) $(RAMDAC_DEFINES) -c -o $@ $< debian/patches/015_use_FONT_SIZE_const.patch0000644000000000000000000000156611735000254015712 0ustar Index: b/utils/restorefont.c =================================================================== --- a/utils/restorefont.c +++ b/utils/restorefont.c @@ -4,6 +4,7 @@ #include #include #include +#include "../src/libvga.h" /* * Note: Observe that when writing the font to a file, the file to write is @@ -15,7 +16,7 @@ int main(int argc, char *argv[]) { FILE *f; unsigned char *font; - size_t font_size = 0x2000; /* buffer size in 1.2.11 and before */ + size_t font_size = FONT_SIZE; /* buffer size in 1.2.11 and before */ int can_set = 0; struct stat statbuf; @@ -52,6 +53,9 @@ int main(int argc, char *argv[]) can_set = 1; /* Query the preferred data size: */ font_size = vga_ext_set(VGA_EXT_FONT_SIZE, 0); + if (font_size < FONT_SIZE) { + font_size = FONT_SIZE; + } } } debian/patches/022_neomagic_libretto100.patch0000644000000000000000000000647611735000254016142 0ustar Author: Guillem Jover Index: b/src/config/libvga.config =================================================================== --- a/src/config/libvga.config +++ b/src/config/libvga.config @@ -251,6 +251,16 @@ kbd_only_root_keymaps HorizSync 31.5 35.5 VertRefresh 50 90 +# If you have a NeoMagic card on a Toshiba Libretto 100, 110 use that instead + +# HorizSync 31.5 70 +# VertRefresh 50 100 +# Modeline "800x480" 50 800 856 976 1024 480 483 490 504 +hsync +vsync +# newmode 800 480 256 800 1 +# newmode 800 480 32768 1600 2 +# newmode 800 480 65536 1600 2 +# newmode 800 480 16777216 2400 3 + # Monitor timings # # These are prefered over the default timings (if monitor and chipset @@ -404,3 +414,8 @@ colortext # (main symptom is some modes are out of sync), # try enabling this. If it helps, please report to # me (matan@svgalib.org) + +# NeoMagicLibretto100 + # Enable if you have a NeoMagic card on a Toshiba + # Libretto 100, 110, etc + Index: b/src/neo.c =================================================================== --- a/src/neo.c +++ b/src/neo.c @@ -10,8 +10,7 @@ Problem: The modes whose width is longer --> Please do not select such modes :-) Note: - When use Toshiba Libretto100,110, please define "LIBRETTO100" at - line 19 in src/neo.c + When use Toshiba Libretto100,110. And add the following lines to libvga.config ------------------------------------------------------------------- HorizSync 31.5 70 @@ -40,7 +39,6 @@ Note: #undef DEBUG #undef NEO_PCI_BURST -#undef LIBRETTO100 /* Define if Toshiba Libretto100/110 */ #define TRUE (1) #define FALSE (0) @@ -101,6 +99,7 @@ static int neo_init(int, int, int); static void neo_unlock(void); static void neo_lock(void); +extern unsigned char __svgalib_neolibretto100; static int neo_memory; static int NeoChipset; static int NeoPanelWidth, NeoPanelHeight; @@ -954,11 +953,10 @@ static int neo_init(int force, int par1, break; case 0x01: NeoPanelWidth = 800; -#ifdef LIBRETTO100 + if (__svgalib_neolibretto100) NeoPanelHeight = 480; -#else /* LIBRETTO100 */ + else NeoPanelHeight = 600; -#endif /* LIBRETTO100 */ break; case 0x02: NeoPanelWidth = 1024; Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -326,6 +326,7 @@ unsigned char __svgalib_secondary = 0; / unsigned char __svgalib_novccontrol = 0; /* this is not the main card with VC'S (not yet supported) */ unsigned char __svgalib_simple = 0; unsigned char __svgalib_ragedoubleclock = 0; +unsigned char __svgalib_neolibretto100 = 0; /* default palette values */ static const unsigned char default_red[256] @@ -3641,7 +3642,7 @@ static char *vga_conf_commands[] = { "joystick0", "joystick1", "joystick2", "joystick3", "textprog", "vesatext", "vesasave", "secondary", "bandwidth", "novccontrol", "newmode", "noprocpci", "vesatextmode", "pcistart", - "ragedoubleclock", "vesacputype", + "ragedoubleclock", "vesacputype", "neomagiclibretto100", NULL}; static char *conf_mousenames[] = @@ -4191,6 +4192,9 @@ static char *process_option(int command, }; #endif break; + case 67: + __svgalib_neolibretto100=1; + break; } leave: return strtok(NULL, " "); debian/patches/002_iopl.patch0000644000000000000000000000571011735000254013162 0ustar Index: b/lrmi-0.6m/mode3.c =================================================================== --- a/lrmi-0.6m/mode3.c +++ b/lrmi-0.6m/mode3.c @@ -6,6 +6,9 @@ Set mode to VESA mode 3 (80x25 text mode #include #include #include +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include #include #include Index: b/lrmi-0.6m/vbemodeinfo.c =================================================================== --- a/lrmi-0.6m/vbemodeinfo.c +++ b/lrmi-0.6m/vbemodeinfo.c @@ -8,6 +8,9 @@ This program is in the public domain. #include #include #include +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include #include #include Index: b/lrmi-0.6m/vbetest.c =================================================================== --- a/lrmi-0.6m/vbetest.c +++ b/lrmi-0.6m/vbetest.c @@ -7,6 +7,9 @@ This program is in the public domain. #include #include #include +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include #include #include Index: b/lrmi-0.6m/vga_reset.c =================================================================== --- a/lrmi-0.6m/vga_reset.c +++ b/lrmi-0.6m/vga_reset.c @@ -6,6 +6,9 @@ Call real mode c0003 #include #include #include +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include "lrmi.h" Index: b/mach/mach64.c =================================================================== --- a/mach/mach64.c +++ b/mach/mach64.c @@ -51,6 +51,9 @@ #include #include #include +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include #include #include Index: b/src/ati.c =================================================================== --- a/src/ati.c +++ b/src/ati.c @@ -31,6 +31,9 @@ #include #include #include +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include "vga.h" #include "libvga.h" Index: b/src/chips.c =================================================================== --- a/src/chips.c +++ b/src/chips.c @@ -85,6 +85,9 @@ #include #include #include /* iopl() */ +#if __GLIBC__ >= 2 +#include /* libc6 iopl() */ +#endif #include /* sigprocmask */ #include #include "vga.h" Index: b/src/et6000.c =================================================================== --- a/src/et6000.c +++ b/src/et6000.c @@ -3,6 +3,9 @@ #include /* Testing modeline update. */ #include #include +#if __GLIBC__ >= 2 +#include +#endif #include #include #include debian/patches/025_mmap_return_value_test.patch0000644000000000000000000000104211735000254017002 0ustar Author: Guillem Jover On Linux kernels >= 2.6.9 and the introduction of flexmmap has revealed a bug in the return value test code. Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -2001,8 +2001,8 @@ static void initialize(void) }; __vga_mmap(); - if ((long) GM < 0) { - printf("svgalib: mmap error rrr\n"); + if (GM == MAP_FAILED) { + printf("svgalib: mmap error: %s\n", strerror(errno)); exit(1); } /* disable video */ debian/patches/012_warnings.patch0000644000000000000000000002061611735000254014052 0ustar Index: b/src/egadrv.c =================================================================== --- a/src/egadrv.c +++ b/src/egadrv.c @@ -10,6 +10,7 @@ #include +#include #include #include "vga.h" #include "libvga.h" Index: b/src/mach32.c =================================================================== --- a/src/mach32.c +++ b/src/mach32.c @@ -1553,8 +1553,8 @@ static int mach32_init(int force, int ch goto writerr; printf("mach32: Notice: new EEPROM file >%s< succesful created.\n", eeprom_fname); - finish_w_eeprom: } + finish_w_eeprom: /* Change eeprom contents if requested: */ if (!(eeprom_option & EEPROM_USE_MEMCFG)) mach32_eeprom[6] = 0; Index: b/src/mouse/mouse.c =================================================================== --- a/src/mouse/mouse.c +++ b/src/mouse/mouse.c @@ -7,6 +7,7 @@ #include #include "vgamouse.h" #include "../libvga.h" +#include extern int mouse_open; Index: b/src/s3.c =================================================================== --- a/src/s3.c +++ b/src/s3.c @@ -474,7 +474,6 @@ static int s3_ext_set(unsigned what, va_ dac_used->restoreState(regs); return old_values; } - default: } return 0; } Index: b/utils/convfont.c =================================================================== --- a/utils/convfont.c +++ b/utils/convfont.c @@ -14,7 +14,7 @@ FILE *sf; FILE *tf; -void +int main (int argc, char **argv) { int i; @@ -29,23 +29,23 @@ main (int argc, char **argv) "at least defining the first 128 characters is a good idea. The fontheight\n" "should be in the range 1-32.\n" ); - exit (1); + return 1; } if ((sf = fopen (argv[1], "rb")) == NULL) { printf ("convfont: Unable to open file.\n"); - exit (1); + return 1; } if ((tf = fopen (argv[3], "wb")) == NULL) { printf ("convfont: Unable to create file.\n"); - exit (1); + return 1; } fontheight = atoi (argv[2]); if (fontheight < 1 || fontheight > 32) { printf ("convfont: Invalid fontheight.\n"); - exit (1); + return 1; } fseek (sf, 0, SEEK_END); @@ -56,7 +56,7 @@ main (int argc, char **argv) if (font_nuchars < 1 || font_nuchars > 256) { printf ("convfont: Invalid number of characters in font.\n"); - exit (1); + return 1; } fread (sfontbuf, 1, sfontsize, sf); fclose (sf); @@ -77,5 +77,5 @@ main (int argc, char **argv) printf ("Writing font file.\n"); fwrite (tfontbuf, 1, 32 * 256, tf); fclose (tf); - exit (0); + return 0; } Index: b/utils/fix132x43.c =================================================================== --- a/utils/fix132x43.c +++ b/utils/fix132x43.c @@ -54,7 +54,7 @@ static void fixfont (int); -void +int main (int argc, char *argv[]) { int vgaIOBase; @@ -76,19 +76,19 @@ main (int argc, char *argv[]) #endif printf (" -r Switch to 8 line characters again (350 line frame, 70 Hz).\n"); printf ("LINES environment variable is used to detect 43 or 44 line console.\n"); - exit (0); + return 0; } if (argv[1][0] != '-') { printf ("Must specify -f, -v or -r.\n"); - exit (1); + return 1; } if (argv[1][1] != 'f' && argv[1][1] != 'v' && argv[1][1] != 'w' && argv[1][1] != 'r') { printf ("Must specify -f, -v, or -r.\n"); - exit (1); + return 1; } lines = atoi (getenv ("LINES")); @@ -197,7 +197,7 @@ main (int argc, char *argv[]) } #endif - exit (0); + return 0; } Index: b/utils/gtf/gtfcalc.c =================================================================== --- a/utils/gtf/gtfcalc.c +++ b/utils/gtf/gtfcalc.c @@ -329,7 +329,7 @@ void GTF_setConstants(GTF_constants *con #ifdef TESTING_GTF -void main(int argc,char *argv[]) +int main(int argc,char *argv[]) { FILE *f; double xPixels,yPixels,freq; @@ -359,7 +359,7 @@ void main(int argc,char *argv[]) printf("\n"); printf("GTFCALC will print a summary of the results found, and dump the CRTC\n"); printf("values to the UVCONFIG.CRT file in the format used by SciTech Display Doctor.\n"); - exit(1); + return 1; } /* Get values from command line */ @@ -377,7 +377,7 @@ void main(int argc,char *argv[]) GTF_calcTimings(xPixels,yPixels,freq,GTF_lockPF,false,interlace,&t); else { printf("Unknown command line!\n"); - exit(1); + return 1; } /* Dump summary info to standard output */ @@ -435,6 +435,8 @@ void main(int argc,char *argv[]) fprintf(f, "%.2f\n", t.dotClock); fclose(f); } + + return 0; } #endif /* TESTING */ Index: b/utils/restorefont.c =================================================================== --- a/utils/restorefont.c +++ b/utils/restorefont.c @@ -11,7 +11,7 @@ * given up). This means that there is no major security hole lurking here. */ -void main(int argc, char *argv[]) +int main(int argc, char *argv[]) { FILE *f; unsigned char *font; @@ -24,23 +24,23 @@ void main(int argc, char *argv[]) printf("Syntax: restorefont option filename\n"); printf(" -r filename Restore VGA font from file.\n"); printf(" -w filename Write current VGA font to file.\n"); - exit(0); + return 0; } if (argv[1][0] != '-') { printf("Must specify -r or -w.\n"); - exit(1); + return 1; } switch (argv[1][1]) { case 'r': case 'w': if (argc != 3) { printf("Must specify filename.\n"); - exit(1); + return 1; } break; default: printf("Invalid option. Must specify -r or -w.\n"); - exit(1); + return 1; } vga_disabledriverreport(); vga_setchipset(VGA); /* avoid SVGA detection */ @@ -71,7 +71,7 @@ void main(int argc, char *argv[]) perror("restorefont"); ex_no_errno: vga_setmode(TEXT); - exit(1); + return 1; } if (fstat(fileno(f), &statbuf)) goto error; @@ -113,5 +113,5 @@ void main(int argc, char *argv[]) break; } vga_setmode(TEXT); - exit(0); + return 0; } Index: b/utils/restorepalette.c =================================================================== --- a/utils/restorepalette.c +++ b/utils/restorepalette.c @@ -105,7 +105,7 @@ process_palette_file (char **argv) } } -void +int main (int argc, char *argv[]) { int i; @@ -143,5 +143,5 @@ main (int argc, char *argv[]) port_out (0x20, ATT_IW); /* enable display */ } } - exit (0); + return 0; } Index: b/utils/restoretextmode.c =================================================================== --- a/utils/restoretextmode.c +++ b/utils/restoretextmode.c @@ -14,7 +14,7 @@ unsigned char regs[MAX_REGS]; -void +int main (int argc, char *argv[]) { vga_init (); @@ -24,12 +24,12 @@ main (int argc, char *argv[]) printf ("Syntax: restoretextmode option filename\n"); printf (" -r filename Restore registers from file.\n"); printf (" -w filename Write registers to file.\n"); - exit (0); + return 0; } if (argv[1][0] != '-') { printf ("Must specify -r or -w.\n"); - exit (1); + return 1; } switch (argv[1][1]) { @@ -38,12 +38,12 @@ main (int argc, char *argv[]) if (argc != 3) { printf ("Must specify filename.\n"); - exit (1); + return 1; } break; default: printf ("Invalid option. Must specify -r or -w.\n"); - exit (1); + return 1; } if (argv[1][1] == 'r') { @@ -53,14 +53,14 @@ main (int argc, char *argv[]) { error: perror ("restoretextmode"); - exit (1); + return 1; } if (1 != fread (regs, MAX_REGS, 1, f)) { if (errno) goto error; puts ("restoretextmode: input file corrupted."); - exit (1); + return 1; } fclose (f); } @@ -86,5 +86,5 @@ main (int argc, char *argv[]) if (fclose (f)) goto error; } - exit (0); + return 0; } Index: b/utils/setmclk.c =================================================================== --- a/utils/setmclk.c +++ b/utils/setmclk.c @@ -41,7 +41,7 @@ #include #include "../src/libvga.h" /* For port I/O macros. */ -void +int main (void) { vga_init (); @@ -50,7 +50,7 @@ main (void) printf ("Not a Cirrus.\n"); printf ("Continue anyway (y/n)?\n"); if (getchar () != 'y') - exit (-1); + return -1; } /* Unlock extended registers. */ @@ -84,5 +84,5 @@ main (void) outb (0x3c5, NEW_MCLK); printf ("New MCLK value: %02x\n", NEW_MCLK); - exit (0); + return 0; } debian/patches/018_vgagl_against_vga.patch0000644000000000000000000000063211642635364015704 0ustar Index: b/gl/Makefile =================================================================== --- a/gl/Makefile +++ b/gl/Makefile @@ -32,7 +32,7 @@ all: libvgagl.a libvgagl.so.$(VERSION): $(MODULES) $(CC) -s -shared -Wl,-soname,libvgagl.so.$(MAJOR_VER) -o libvgagl.so.$(VERSION) \ - $(MODULES) $(SHLIBLIBS) + $(MODULES) $(SHLIBLIBS) -L$(srcdir)/sharedlib -lvga libvgagl.a: $(MODULES) rm -f libvgagl.a debian/patches/014_r128_save_regs.patch0000644000000000000000000000176711735000254014764 0ustar Index: b/src/r128.c =================================================================== --- a/src/r128.c +++ b/src/r128.c @@ -313,7 +313,7 @@ static void R128RestoreMode(R128SavePtr OUTREG(R128_AMCGPIO_MASK, restore->amcgpio_mask); OUTREG(R128_AMCGPIO_EN_REG, restore->amcgpio_en_reg); OUTREG(R128_CLOCK_CNTL_INDEX, restore->clock_cntl_index); - OUTREG(R128_GEN_RESET_CNTL, restore->gen_reset_cntl); +// OUTREG(R128_GEN_RESET_CNTL, restore->gen_reset_cntl); OUTREG(R128_DP_DATATYPE, restore->dp_datatype); R128RestoreCommonRegisters( restore); @@ -443,6 +443,10 @@ static void R128InitCommonRegisters(R128 save->mem_vga_wp_sel = 0; save->mem_vga_rp_sel = 0; save->bus_cntl = BusCntl; + + save->config_cntl = INREG(R128_CONFIG_CNTL); + save->amcgpio_en_reg = INREG(R128_AMCGPIO_EN_REG); + save->amcgpio_mask = INREG(R128_AMCGPIO_MASK); /* * If bursts are enabled, turn on discards and aborts */ debian/patches/016_disable_vgacode.patch0000644000000000000000000000043511735000254015316 0ustar Index: b/src/vgamisc.c =================================================================== --- a/src/vgamisc.c +++ b/src/vgamisc.c @@ -274,7 +274,7 @@ int vga_setlinearaddressing(void) return -1; } -#if 1 +#if 0 /* * The other code doesn't work under Linux/Alpha (I think debian/patches/001_fhs_transition.patch0000644000000000000000000001166411642635364015272 0ustar Index: b/doc/man1/savetextmode.1 =================================================================== --- a/doc/man1/savetextmode.1 +++ b/doc/man1/savetextmode.1 @@ -10,7 +10,11 @@ savetextmode, textmode \- save or restor .SH DESCRIPTION These are simple scripts to save the SVGA register state when in textmode to the files -.IR /tmp/fontdata " and " /tmp/textregs +.IR /etc/vga/fontdata " and " /etc/vga/textregs +.RI ( $HOME/.vga/fontdata " and " $HOME/.vga/textregs +if directory +.I /etc/vga +is not writeable) or to restore it from these files. The actual utilities used are @@ -40,9 +44,13 @@ left in raw mode, nothing can really hel will understand. .SH FILES -.I /tmp/fontdata +.I /etc/vga/fontdata +or +.I $HOME/.vga/fontdata .br -.I /tmp/textregs +.I /etc/vga/textregs +or +.I $HOME/.vga/textregs .SH SEE ALSO Index: b/doc/man1/svgakeymap.1 =================================================================== --- a/doc/man1/svgakeymap.1 +++ b/doc/man1/svgakeymap.1 @@ -9,7 +9,7 @@ svgakeymap \- generates keymaps for svga Generates a keymap conversion file for .BR svgalib (7) from two keytable definitions. Keytables are searched for in -.I /usr/lib/kbd/keytables +.I /usr/share/keymaps and are automatically filtered through .BR gzip (1) if necessary. @@ -22,7 +22,7 @@ The generated keymap is sent to the stan or piped in any creative manner you wish. .SH FILES -.I /usr/lib/kbd/keytables/*.map[.gz] +.I /usr/share/keymaps/*/*/*.map[.gz] .RS The system keytable files used by .BR loadkeys "(1)." Index: b/doc/README.keymap =================================================================== --- a/doc/README.keymap +++ b/doc/README.keymap @@ -83,7 +83,7 @@ file is read which lists scancodes produ equivalents in the layout expected by the program. A program called svgakeymap is provided to generate these maps from the -keytable files in /usr/lib/kbd/keytables; you must have perl for it to work. +keytable files in /usr/share/keymaps; you must have perl for it to work. Creating a keymap file with svgakeymap is easy; to make a map to convert scancodes from a US Dvorak keyboard to a US QWERTY keyboard as for our example above: Index: b/utils/runx =================================================================== --- a/utils/runx +++ b/utils/runx @@ -5,8 +5,8 @@ # running X, and 'textmode' after. This will restore the textmode registers # and the VGA palette in addition to the VGA font. -echo Saving font in /tmp/fontdata -restorefont -w /tmp/fontdata +echo Saving font in $HOME/.fontdata +restorefont -w $HOME/.fontdata startx -echo Restoring font from /tmp/fontdata -restorefont -r /tmp/fontdata +echo Restoring font from $HOME/.fontdata +restorefont -r $HOME/.fontdata Index: b/utils/savetextmode =================================================================== --- a/utils/savetextmode +++ b/utils/savetextmode @@ -1,4 +1,14 @@ #!/bin/sh -rm -f /etc/vga/textregs /etc/vga/fontdata -restoretextmode -w /etc/vga/textregs -restorefont -w /etc/vga/fontdata +dir=/etc/vga +if [ ! -w "$dir" ]; then + dir="$HOME/.vga" + mkdir -p -m 700 "$dir" +fi +if [ -f /etc/textregs -o -f /etc/fontdata ]; then + echo >&2 "WARNING: the textregs and fontdata files have moved in this" + echo >&2 " release from /etc to /etc/vga; please remove or rename" + echo >&2 " your old versions." +fi +rm -f "$dir/textregs" "$dir/fontdata" +restoretextmode -w "$dir/textregs" +restorefont -w "$dir/fontdata" Index: b/utils/svgakeymap =================================================================== --- a/utils/svgakeymap +++ b/utils/svgakeymap @@ -7,16 +7,16 @@ # svgakeymap [physical_map [program_map]] > output.keymap # # The conversion map is output to stdout; you may wish to redirect it. -# Keymaps are searched for in /usr/lib/kbd/keytables and are automatically +# Keymaps are searched for in /usr/share/keymaps and are automatically # filtered through gzip if necessary. # # Read the file README.keymap from the svgalib distribution for more info. -$ktd = "/usr/lib/kbd/keytables/"; +$ktd = "/usr/share/keymaps/"; if(scalar(@ARGV) > 0) { $inmap = $ARGV[0]; } else { - $inmap = "us"; + $inmap = "i386/qwerty/us"; } if(scalar(@ARGV) > 1) { $outmap = $ARGV[1]; @@ -34,7 +34,7 @@ foreach $bob ($inmap, $outmap) { unless(-e $bob) { # Tack a .gz on it - $bob .= ".map"; + $bob .= ".kmap"; #print "$bob\n"; unless(-e $bob) { Index: b/utils/textmode =================================================================== --- a/utils/textmode +++ b/utils/textmode @@ -1,4 +1,12 @@ #!/bin/sh -restoretextmode -r /etc/vga/textregs -restorefont -r /etc/vga/fontdata +textregs= +fontdata= +for dir in /etc/vga "$HOME/.vga" +do + test -r "$dir/textregs" && textregs="$dir/textregs" + test -r "$dir/fontdata" && fontdata="$dir/fontdata" +done + +test -n "$textregs" && restoretextmode -r "$textregs" +test -n "$fontdata" && restorefont -r "$fontdata" restorepalette debian/patches/019_shlib_symlinks.patch0000644000000000000000000000511311735000254015256 0ustar Index: b/gl/Makefile =================================================================== --- a/gl/Makefile +++ b/gl/Makefile @@ -30,9 +30,12 @@ MODULES = grlib.o driver.o line.o palet all: libvgagl.a .PHONY: all clean dep +libvgagl.so: libvgagl.so.$(VERSION) libvgagl.so.$(VERSION): $(MODULES) $(CC) -s -shared -Wl,-soname,libvgagl.so.$(MAJOR_VER) -o libvgagl.so.$(VERSION) \ $(MODULES) $(SHLIBLIBS) -L$(srcdir)/sharedlib -lvga + ln -sf libvgagl.so.$(VERSION) libvgagl.so + ln -sf libvgagl.so.$(VERSION) libvgagl.so.$(MAJOR_VER) libvgagl.a: $(MODULES) rm -f libvgagl.a @@ -65,7 +68,7 @@ dep: $(CC) $(INCLUDES) -MM $(patsubst %.o,$(srcdir)/gl/%.c,$(MODULES)) >>.depend.gl clean: - rm -f .depend.gl *.bak *.o *~ libvgagl.a libvgagl.so.$(VERSION) + rm -f .depend.gl *.bak *.o *~ libvgagl.a libvgagl.so* # # include a dependency file if one exists Index: b/Makefile =================================================================== --- a/Makefile +++ b/Makefile @@ -135,8 +135,8 @@ endif $(addprefix $(sharedlibdir)/,$(notdir $(SHAREDLIBS))). @for foo in $(notdir $(SHAREDLIBS)); do \ $(INSTALL_SHLIB) sharedlib/$$foo $(sharedlibdir)/$$foo; \ - (cd $(sharedlibdir); \ - ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ + cp -d sharedlib/`echo $$foo | sed 's/\.so\..*/.so/'` $(sharedlibdir); \ + cp -d sharedlib/`echo $$foo | sed 's/\.so\..*/.so/'`.$(MAJOR_VER) $(sharedlibdir); \ done ifdef INSTALLAOUTDIR @@ -150,8 +150,8 @@ installaoutcompat: $(addprefix $(INSTALLAOUTDIR),$(notdir $(SHAREDLIBS))). @for foo in $(notdir $(SHAREDAOUTLIBS)); do \ $(INSTALL_SHLIB) sharedlib/$$foo $(TOPDIR)/$(INSTALLAOUTDIR)$$foo; \ - (cd $(TOPDIR)/$(INSTALLAOUTDIR); \ - ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ + cp -d sharedlib/`echo $$foo | sed 's/\.so\..*/.so/'` $(sharedlibdir); \ + cp -d sharedlib/`echo $$foo | sed 's/\.so\..*/.so/'`.$(MAJOR_VER) $(sharedlibdir); \ done else Index: b/src/Makefile =================================================================== --- a/src/Makefile +++ b/src/Makefile @@ -389,11 +389,15 @@ all: libvga.so.$(VERSION) libvga.so.$(VERSION): $(ALLOBJS) $(CC) -s -shared -Wl,-soname,libvga.so.$(MAJOR_VER) \ -o libvga.so.$(VERSION) $(ALLOBJS) $(SHLIBLIBS) -lm + ln -sf libvga.so.$(VERSION) libvga.so + ln -sf libvga.so.$(VERSION) libvga.so.$(MAJOR_VER) $(sharedlibdir)/libvga.so.$(VERSION): libvga.so.$(VERSION) $(INSTALL_PROGRAM) $< $(sharedlibdir)/$< install: $(sharedlibdir)/libvga.so.$(VERSION) + cp -df sharedlib/libvga.so $(sharedlibdir)/ + cp -df sharedlib/libvga.so.$(MAJOR_VER) $(sharedlibdir)/ endif debian/patches/027_mouse_none_no_print.patch0000644000000000000000000000137311735000254016306 0ustar Author: Osvaldo La Rosa Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -4489,6 +4489,7 @@ if(B8000_MEM_POINTER==NULL){ presumably not the idea if it's been explicitly closed here! */ __svgalib_mem_fd=-2; + if (mouse_type != MOUSE_NONE) { #ifdef DEBUG printf("svgalib: Opening mouse (type = %x).\n", mouse_type | mouse_modem_ctl); #endif @@ -4496,6 +4497,7 @@ if(B8000_MEM_POINTER==NULL){ printf("svgalib: Failed to initialize mouse.\n"); else mouse_open = 1; + } /* Michael: I assume this is a misunderstanding, when svgalib was developed, there were no saved uids, thus setting effective uid sufficed... */ debian/patches/013_glibc_ge_2.patch0000644000000000000000000000055411735000254014176 0ustar Index: b/src/libvga.h =================================================================== --- a/src/libvga.h +++ b/src/libvga.h @@ -351,7 +351,7 @@ extern unsigned char *__svgalib_give_gra #define zero_sa_mask(maskptr) memset(maskptr, 0, sizeof(sigset_t)) -#if 0 +#if __GLIBC__ >= 2 #define SVGALIB_ACQUIRE_SIG SIGUSR2 #define SVGALIB_RELEASE_SIG SIGUSR1 debian/patches/031_mouse_input.patch0000644000000000000000000000555011735000254014572 0ustar Author: Guillem Jover Index: b/demos/mousetest.c =================================================================== --- a/demos/mousetest.c +++ b/demos/mousetest.c @@ -47,7 +47,7 @@ void main(void) gl_enableclipping(); #ifdef MANUALLY_SETUP_MOUSE - mouse_init("/dev/mouse", MOUSE_MICROSOFT, MOUSE_DEFAULTSAMPLERATE); + mouse_init("/dev/input/mice", MOUSE_MICROSOFT, MOUSE_DEFAULTSAMPLERATE); mouse_setxrange(0, WIDTH - 1); mouse_setyrange(0, HEIGHT - 1); mouse_setwrap(MOUSE_NOWRAP); Index: b/doc/man5/libvga.config.5 =================================================================== --- a/doc/man5/libvga.config.5 +++ b/doc/man5/libvga.config.5 @@ -80,10 +80,10 @@ To specify if you use anything else then .B mdev If the mouse device file is .B not -.I /dev/mouse -which is generally a symbolic link to the actual mouse device -file. You will usually need to use this command if you want to use the -SpaceTec Spaceball device (which is not your usual mouse). +.I /dev/input/mice +which is the actual mouse device file. You will usually need to use this +command if you want to use the SpaceTec Spaceball device (which is not +your usual mouse). .TP .BR setRTS ", " clearRTS ", " leaveRTS ", " setDTR ", " clearDTR ", and " leaveDTR @@ -203,8 +203,8 @@ anyway. .TP .BI "mdev " mousedevice Usually -.I /dev/mouse -(the default) will be a link to the mouse device. +.I /dev/input/mice +(the default) will be the mouse device. However, esp. with the Spacetec Spaceball you may want to specify a different device for .BR svgalib (7) Index: b/src/config/libvga.config =================================================================== --- a/src/config/libvga.config +++ b/src/config/libvga.config @@ -105,7 +105,7 @@ mouse_accel_offset 30 # This is the offs # reasonable limit, (Like a negative mult :) # and uses the default that's in vgamouse.h -# Usually /dev/mouse will be a link to the mouse device. +# The default device is /dev/input/mice. # However, esp. with the Spacetec Spaceball you may # want to specify a different device for svgalib to use Index: b/src/mouse/mouse.c =================================================================== --- a/src/mouse/mouse.c +++ b/src/mouse/mouse.c @@ -37,7 +37,7 @@ int mouse_init_return_fd(char *dev, int if (!mouse_open) { if (strcmp(dev, "") == 0) - m_dev = "/dev/mouse"; + m_dev = "/dev/input/mice"; else m_dev = dev; m_type = type & MOUSE_TYPE_MASK; Index: b/src/vga.c =================================================================== --- a/src/vga.c +++ b/src/vga.c @@ -449,7 +449,7 @@ int mouse_open = 0; static int mouse_mode = 0; static int mouse_type = -1; static int mouse_modem_ctl = 0; -static char *mouse_device = "/dev/mouse"; +static char *mouse_device = "/dev/input/mice"; #ifndef BACKGROUND static int __svgalib_oktowrite = 1; #endif debian/patches/041_use_system_round.patch0000644000000000000000000000245511734774426015656 0ustar Author: Guillem Jover --- utils/gtf/gtfcalc.c | 4 ++++ utils/gtf/scitech.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) --- a/utils/gtf/gtfcalc.c +++ b/utils/gtf/gtfcalc.c @@ -40,6 +40,8 @@ * ****************************************************************************/ +#define _XOPEN_SOURCE 600 + #include #include #include @@ -64,10 +66,12 @@ static GTF_constants GC = { /*-------------------------- Implementation -------------------------------*/ +#ifndef HAVE_ROUND static double round(double v) { return floor(v + 0.5); } +#endif static void GetInternalConstants(GTF_constants *c) /**************************************************************************** --- a/utils/gtf/scitech.h +++ b/utils/gtf/scitech.h @@ -358,6 +358,18 @@ #define _ASMAPIP _ASMAPI * #endif +/* We want the _POSIX_VERSION macro if available. */ +#ifdef __UNIX__ +#include +#endif + +/* Ideally we'd detect if the function is present at build time regardless + * of standards, but this is better than nothing. */ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L) +#define HAVE_ROUND +#endif + /* Useful macros */ #define PRIVATE static debian/patches/004_build.patch0000644000000000000000000002051411735000254013317 0ustar --- Makefile | 40 +++++++--------------------------------- Makefile.cfg | 39 +++++++++++++++++++++------------------ gl/Makefile | 4 +++- src/Makefile | 5 ++--- utils/Makefile | 6 +++--- 5 files changed, 36 insertions(+), 58 deletions(-) --- a/Makefile +++ b/Makefile @@ -110,10 +110,6 @@ default: installheaders: @echo Installing header files in $(includedir). - @if [ -f /usr/include/vga.h ]; then \ - rm -f /usr/include/vga.h /usr/include/vgagl.h; \ - echo Old header files in /usr/include removed.; \ - fi mkdir -p $(includedir) @cp $(srcdir)/src/vga.h $(includedir)/vga.h @chmod a+r $(includedir)/vga.h @@ -134,17 +130,6 @@ ifeq (a.out, $(TARGET_FORMAT)) chmod a+r $(libdir)/$$foo; \ done endif - @if [ -f /usr/lib/libvga.sa ]; then \ - rm -f /usr/lib/libvga.sa /usr/lib/libvgagl.sa; \ - echo Old stubs in /usr/lib removed.; \ - fi - @rm -f $(OBSOLETESHAREDIMAGES) -ifndef KEEPSHAREDLIBS - @echo "Removing shared library images (old & current)..." - @for i in $(OBSOLETELDIRS); do \ - rm -f `echo $(OBSOLETESHAREDIMAGES) | sed s?/lib/?$$i?g`; \ - done -endif mkdir -p $(sharedlibdir) @echo Installing shared library image as \ $(addprefix $(sharedlibdir)/,$(notdir $(SHAREDLIBS))). @@ -153,7 +138,6 @@ endif (cd $(sharedlibdir); \ ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ done - @ldconfig ifdef INSTALLAOUTDIR @@ -169,7 +153,6 @@ installaoutcompat: (cd $(TOPDIR)/$(INSTALLAOUTDIR); \ ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ done - @ldconfig else @@ -180,10 +163,8 @@ endif installstaticlib: static @echo Installing static libraries in $(libdir). - @rm -f /usr/lib/libvga.a @$(INSTALL_DATA) staticlib/libvga.a $(libdir)/libvga.a @chmod a+r $(libdir)/libvga.a - @rm -f /usr/lib/libvgagl.a @$(INSTALL_DATA) staticlib/libvgagl.a $(libdir)/libvgagl.a @chmod a+r $(libdir)/libvgagl.a @@ -192,29 +173,23 @@ installutils: textutils lrmi echo No $(bindir) directory, creating it.; \ mkdir $(bindir); \ fi - @if [ -f /usr/bin/restorefont ]; then \ - echo Removing old utilities in /usr/bin.; \ - for x in $(UTILS); do rm -f /usr/bin/$$x; done; \ - fi - @if [ -f /usr/bin/convfont ]; then \ - echo Removing inappropriate utilities in /usr/bin.; \ - rm -f /usr/bin/convfont /usr/bin/setmclk; \ - fi @echo Installing textmode utilities in $(bindir): @echo "restorefont: Save/restore textmode font." - @cp utils/restorefont $(bindir) + @$(INSTALL_SUID) utils/restorefont $(bindir) @echo "restorepalette: Set standard VGA palette." - @cp utils/restorepalette $(bindir) + @$(INSTALL_SUID) utils/restorepalette $(bindir) @echo "dumpreg: Write ASCII dump of SVGA registers." - @cp utils/dumpreg $(bindir) + @$(INSTALL_SUID) utils/dumpreg $(bindir) @echo "restoretextmode: Save/restore textmode registers." - @cp utils/restoretextmode $(bindir) + @$(INSTALL_SUID) utils/restoretextmode $(bindir) @echo "textmode: Script that tries to restore textmode." @cp utils/textmode $(bindir) @echo "savetextmode: Script that saves textmode information used by 'textmode'." @cp utils/savetextmode $(bindir) - @echo "mode3: Restore textmode by setting VESA mode 3." + @echo "mode3: Restore textmode by setting VESA mode 3." @cp lrmi-0.6m/mode3 $(bindir) + @echo "vga_reset: Restore textmode by resetting graphic board." + @cp lrmi-0.6m/vga_reset $(bindir) @echo "Installing keymap utilities in $(bindir):" @echo "svgakeymap: Perl script that generates scancode conversion maps." @cp utils/svgakeymap $(bindir) @@ -462,7 +437,6 @@ $(BACKUP): configaout distclean: (cd $(srcdir)/doc; $(MAKE) clean) - (cd $(srcdir)/doc; $(MAKE) ../0-README) (cd $(srcdir)/src; $(MAKE) clean) (cd $(srcdir)/gl; $(MAKE) clean) (cd $(srcdir)/utils; $(MAKE) clean) --- a/Makefile.cfg +++ b/Makefile.cfg @@ -126,15 +126,15 @@ INSTALLMAN = installman INCLUDE_ET4000_DRIVER = y INCLUDE_CIRRUS_DRIVER = y INCLUDE_TVGA_DRIVER = y -#INCLUDE_OAK_DRIVER = y -#INCLUDE_EGA_DRIVER = y +INCLUDE_OAK_DRIVER = y +INCLUDE_EGA_DRIVER = y INCLUDE_MACH32_DRIVER = y INCLUDE_S3_DRIVER = y -#INCLUDE_ET3000_DRIVER = y -#INCLUDE_GVGA6400_DRIVER = y -#INCLUDE_ARK_DRIVER = y -#INCLUDE_ATI_DRIVER = y -#INCLUDE_ALI_DRIVER = y +INCLUDE_ET3000_DRIVER = y +INCLUDE_GVGA6400_DRIVER = y +INCLUDE_ARK_DRIVER = y +INCLUDE_ATI_DRIVER = y +INCLUDE_ALI_DRIVER = y INCLUDE_CHIPS_DRIVER = y INCLUDE_APM_DRIVER = y INCLUDE_NV3_DRIVER = y @@ -150,7 +150,9 @@ INCLUDE_LAGUNA_DRIVER = y INCLUDE_NEO_DRIVER = y INCLUDE_R128_DRIVER = y INCLUDE_G400_DRIVER = y +ifndef SUPPRESS_FOR_LIBC5 INCLUDE_FBDEV_DRIVER = y +endif INCLUDE_SAVAGE_DRIVER = y # # Comment out any adapter you don't want to autodetect. @@ -158,15 +160,15 @@ INCLUDE_SAVAGE_DRIVER = y INCLUDE_ET4000_DRIVER_TEST = y INCLUDE_CIRRUS_DRIVER_TEST = y INCLUDE_TVGA_DRIVER_TEST = y -#INCLUDE_OAK_DRIVER_TEST = y -#INCLUDE_EGA_DRIVER_TEST = y +INCLUDE_OAK_DRIVER_TEST = y +INCLUDE_EGA_DRIVER_TEST = y INCLUDE_MACH32_DRIVER_TEST = y -#INCLUDE_GVGA6400_DRIVER_TEST = y +INCLUDE_GVGA6400_DRIVER_TEST = y INCLUDE_S3_DRIVER_TEST = y -#INCLUDE_ET3000_DRIVER_TEST = y +INCLUDE_ET3000_DRIVER_TEST = y #INCLUDE_ARK_DRIVER_TEST = y -#INCLUDE_ATI_DRIVER_TEST = y -#INCLUDE_ALI_DRIVER_TEST = y +INCLUDE_ATI_DRIVER_TEST = y +INCLUDE_ALI_DRIVER_TEST = y INCLUDE_CHIPS_DRIVER_TEST = y INCLUDE_APM_DRIVER_TEST = y INCLUDE_NV3_DRIVER_TEST = y @@ -270,9 +272,9 @@ INCLUDES = -I$(srcdir)/include -I. CFLAGS = $(WARN) $(DLLFLAGS) $(INCLUDES) $(OPTIMIZE) $(DEFINES) # ELF doesn't like -N. It is beneficial for small tools with a.out ifeq (a.out, $(TARGET_FORMAT)) - LDFLAGS = -N -s + LDFLAGS = -N else - LDFLAGS = -s + LDFLAGS = endif # Uncomment the following if you are compiling a.out shared libraries @@ -289,6 +291,7 @@ endif # Utilites used. AR = ar -INSTALL_PROGRAM = install -c -s -m 755 -o root -g bin -INSTALL_SHLIB = install -c -m 755 -o root -g bin -INSTALL_DATA = install -c -m 644 -o root -g bin +INSTALL_PROGRAM = install -c -m 755 -o root -g root +INSTALL_SUID = install -c -m 4755 -o root -g root +INSTALL_SHLIB = install -c -m 755 -o root -g root +INSTALL_DATA = install -c -m 644 -o root -g root --- a/gl/Makefile +++ b/gl/Makefile @@ -10,6 +10,8 @@ include ../Makefile.cfg srcdir = .. VPATH = $(srcdir)/gl +INCLUDES += -I$(srcdir)/src + ifeq (a.out, $(TARGET_FORMAT)) DEFINES += -DSVGA_AOUT endif @@ -30,7 +32,7 @@ all: libvgagl.a libvgagl.so.$(VERSION): $(MODULES) $(CC) -s -shared -Wl,-soname,libvgagl.so.$(MAJOR_VER) -o libvgagl.so.$(VERSION) \ - $(MODULES) + $(MODULES) $(SHLIBLIBS) libvgagl.a: $(MODULES) rm -f libvgagl.a --- a/src/Makefile +++ b/src/Makefile @@ -14,7 +14,7 @@ VPATH = $(srcdir)/src # Compiler Section (overrides Makefile.cfg) #---------------------------------------------------------------------- -INCLUDES += -I$(srcdir)/src +INCLUDES += -I$(srcdir)/src -I$(srcdir)/src/config #---------------------------------------------------------------------- # Rules Section @@ -388,11 +388,10 @@ all: libvga.so.$(VERSION) # These rules are for ELF only. libvga.so.$(VERSION): $(ALLOBJS) $(CC) -s -shared -Wl,-soname,libvga.so.$(MAJOR_VER) \ - -o libvga.so.$(VERSION) $(ALLOBJS) -lm + -o libvga.so.$(VERSION) $(ALLOBJS) $(SHLIBLIBS) -lm $(sharedlibdir)/libvga.so.$(VERSION): libvga.so.$(VERSION) $(INSTALL_PROGRAM) $< $(sharedlibdir)/$< - ldconfig install: $(sharedlibdir)/libvga.so.$(VERSION) --- a/utils/Makefile +++ b/utils/Makefile @@ -13,9 +13,10 @@ VPATH = $(srcdir)/utils # Compiler Section (overrides Makefile.cfg) #---------------------------------------------------------------------- -CFLAGS = $(WARN) $(OPTIMIZE) -I../include +CFLAGS = $(WARN) $(OPTIMIZE) -I../include -I$(srcdir)/src #Use the next one for the Alpha/AXP if you need it #LDFLAGS = -L../staticlib +LDFLAGS = -L$(srcdir)/sharedlib LIBS = -lvga -lm #---------------------------------------------------------------------- @@ -32,7 +33,6 @@ OBJECTS = restorefont.o convfont.o resto .o: $(CC) $(CFLAGS) $(LDFLAGS) -o $* $*.o $(LIBS) - chmod 4755 $* all: $(UTILPROGS) .PHONY: all clean cleanbin dep @@ -56,7 +56,7 @@ install: $(INSTALLPROG) $(UTILPROGS) $(UTILINSTALLDIR) .depend: - gcc -MM $(patsubst %.o,$(srcdir)/utils/%.c,$(OBJECTS)) >.depend + gcc -MM -I$(srcdir)/src $(patsubst %.o,$(srcdir)/utils/%.c,$(OBJECTS)) >.depend # # include a dependency file if one exists debian/patches/028_gcc-4.0.patch0000644000000000000000000000257411735000254013267 0ustar Author: Andreas Jochens Index: b/src/apm.c =================================================================== --- a/src/apm.c +++ b/src/apm.c @@ -151,12 +151,12 @@ static int apm_saveregs(unsigned char re regs[APMREG_SAVE(15)] = (k >> 8)&0xff; regs[APMREG_SAVE(16)] = (k >> 16) & 0xff ; regs[APMREG_SAVE(17)] = ( k >> 24 ) & 0xff ; - (unsigned long)regs[APMREG_SAVE(18)] = inlXR(0xf0) ; - (unsigned long)regs[APMREG_SAVE(22)] = inlXR(0xf4) ; - (unsigned long)regs[APMREG_SAVE(26)] = inlXR(0x140) ; - (unsigned short)regs[APMREG_SAVE(30)] = inlXR(0x144) ; - (unsigned long)regs[APMREG_SAVE(32)] = inXR(0x148) ; - (unsigned short)regs[APMREG_SAVE(36)] = inXR(0x14c) ; + regs[APMREG_SAVE(18)] = inlXR(0xf0) ; + regs[APMREG_SAVE(22)] = inlXR(0xf4) ; + regs[APMREG_SAVE(26)] = inlXR(0x140) ; + regs[APMREG_SAVE(30)] = inlXR(0x144) ; + regs[APMREG_SAVE(32)] = inXR(0x148) ; + regs[APMREG_SAVE(36)] = inXR(0x14c) ; return APM_TOTAL_REGS - VGA_TOTAL_REGS; } Index: b/src/vgabg.h =================================================================== --- a/src/vgabg.h +++ b/src/vgabg.h @@ -27,7 +27,6 @@ struct vga_bg_info /* Linear video memory things */ -extern void *__svgalib_linearframebuffer; extern void *__svgalib_physaddr; extern unsigned char *__svgalib_graph_mem_linear_orginal; extern unsigned char *__svgalib_graph_mem_linear_check; debian/libsvga1.postrm0000644000000000000000000000017311642634636012160 0ustar #!/bin/sh set -e if [ "$1" = purge ] && [ -d /etc/vga ]; then rmdir --ignore-fail-on-non-empty /etc/vga fi #DEBHELPER# debian/README.svgalib-dummy0000644000000000000000000000237111161535335012633 0ustar svgalib now no longer includes svgalibg-dummy1 in the shlibs file by default. If your package works with either, here is a mail I received from Richard Braakman on the subject. Thanks to him for allowing me to include it here. Subject: Bug#18091: svgalib: libsvga1 | svgalibg-dummyg1 considered harmful From: dark@xs4all.nl (Richard Braakman) Date: Wed, 11 Feb 1998 18:32:03 +0100 (CET) I'm about to add the following lines to maelstrom's debian/rules file, between the dpkg-shlibdeps and dpkg-gencontrol invocations: # Maelstrom works just as well with libsvga1 as with svgalib-dummyg1. # (with the latter only in X mode, of course). Check if the shlibs file # provided this alternative. If not, hack it in. set -e; \ if ! grep svgalib-dummyg1 debian/substvars >/dev/null ; then \ mv debian/substvars debian/substvars-unhacked ; \ sed -e 's/libsvga1\( *([^)]*)\)\{0,1\}/& | svgalib-dummyg1\1/' debian/substvars; \ fi As far as I can tell this will work with both old and new svgalibg1 versions. If libsvga1 ever provides a versioned dependency in its shlibs file, maelstrom will use the same version number for the svgalib-dummyg1 alternative. Comments, please? Richard Braakman debian/control0000644000000000000000000000424211741451620010574 0ustar Source: svgalib Section: graphics Priority: optional Maintainer: Debian QA Group Homepage: http://www.svgalib.org/ Vcs-Browser: http://git.hadrons.org/?p=debian/pkgs/svgalib.git Vcs-Git: git://git.hadrons.org/git/debian/pkgs/svgalib.git Standards-Version: 3.9.3 Build-Depends: debhelper (>= 8.1.3), libx86-dev [any-amd64 any-i386] Package: svgalib-bin Architecture: linux-any kfreebsd-any Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base Replaces: svgalib1-bin Provides: svgalib1-bin Description: console SVGA display utilities svgalib provides graphics capabilities to programs running on the system console, without going through the X Window System. It uses direct access to the video hardware to provide low-level access to the standard VGA and SVGA graphics modes. Only works with some video hardware; use with caution. . This package contains the Svgalib utility programs. Package: libsvga1 Architecture: linux-any kfreebsd-any Multi-Arch: same Section: libs Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Replaces: svgalibg1 Provides: svgalibg1 Description: console SVGA display libraries svgalib provides graphics capabilities to programs running on the system console, without going through the X Window System. It uses direct access to the video hardware to provide low-level access to the standard VGA and SVGA graphics modes. Only works with some video hardware; use with caution. . This package contains the shared libraries and config files. Package: libsvga1-dev Architecture: linux-any kfreebsd-any Section: libdevel Depends: libsvga1 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Replaces: svgalibg1-dev, libsvga1 (<< 1:1.4.3-32) Provides: svgalibg1-dev Description: console SVGA display development libraries and headers svgalib provides graphics capabilities to programs running on the system console, without going through the X Window System. It uses direct access to the video hardware to provide low-level access to the standard VGA and SVGA graphics modes. Only works with some video hardware; use with caution. . This package contains the static libraries, header files and documentation. debian/README.examples0000644000000000000000000000133311161535335011666 0ustar The files in this directory are the examples distributed with svgalib: demos.tar.gz Demo and test programs. threeDKit.tar.gz Routines to draw 3-dimensional triangles and 3D demos using these. To compile them, unpack the tarball in a temporary directory and run make: # mkdir /tmp/svgalib # cd /tmp/svgalib # tar xzf /usr/share/doc/svgalibg1/examples/demos.tar.gz # cd demos # make To use the makefile as it stands, you will need to do this as root; but then, you'll need root access to run them anyway. If you don't want to compile as root, remove the chown and chmod lines from the Makefile, and then do them manually after compilation. -- ASM Aug 99 -- MV Dec 02 debian/vga_reset.80000644000000000000000000000112411734774426011253 0ustar .TH vga_reset 8 2004-01-26 "Svgalib (>= 1.4.0)" "Svgalib User Manual" .SH NAME vga_reset \- reset video graphic board .SH SYNOPSIS .B vga_reset .SH DESCRIPTION Call real mode c000:0003, which should be the video card's initialization routine. Should work in some cases when mode3 fails to restore text mode. .SH BUGS Using this program is unsafe, and might (depending on the bios) result in a video card in a state that requires a hard reset to restore to normal, or even a hung computer. .SH SEE ALSO .BR mode3 (8). .SH AUTHOR This manual page was written by Guillem Jover . debian/svgalib-bin.default0000644000000000000000000000007011161535335012731 0ustar # Save the SVGA text mode state on boot savetextmode=no debian/libsvga1.postinst0000644000000000000000000000026211735000254012500 0ustar #!/bin/sh set -e if [ "$1" = configure ]; then # remove the mouse type saved in the prerm of packages <= 1.4.3-22 rm -f /etc/vga/libvga.installer.mousetype fi #DEBHELPER# debian/libsvga1.docs0000644000000000000000000000006511735000254011546 0ustar doc/CHANGES.mach64 doc/README.keymap doc/README.vesa debian/source/0000755000000000000000000000000011734762477010510 5ustar debian/source/format0000644000000000000000000000001411642635364011706 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211642635364010376 0ustar 7 debian/rules0000755000000000000000000000507711735000254010254 0ustar #!/usr/bin/make -f # This file is public domain software, originally written by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) SHELL := /bin/bash -O extglob # we use this makefile so we can get at SVGAlib's internal version # strings directory include Makefile.cfg bin := svgalib-bin lib := libsvga$(MAJOR_VER) dev := $(lib)-dev libdir := usr/lib/$(DEB_HOST_MULTIARCH) # upstream makefiles are lax about failures, so set -e MAKE += SHELL=/bin/sh\ -e build-indep: build-arch: dh_testdir $(MAKE) shared static $(MAKE) lrmi textutils build: build-indep build-arch .PHONY: build-indep build-arch build clean: dh_testdir dh_testroot $(MAKE) clean dh_clean install-arch: build-arch dh_testdir dh_testroot dh_prep dh_installdirs mkdir -p debian/$(dev)/$(libdir) $(MAKE) prefix=$(CURDIR)/debian/$(dev)/usr \ libdir=$(CURDIR)/debian/$(dev)/$(libdir) \ sharedlibdir=$(CURDIR)/debian/$(lib)/$(libdir) \ datadir=$(CURDIR)/debian/$(lib)/etc/vga \ bindir=$(CURDIR)/debian/$(bin)/usr/bin \ installheaders \ installsharedlib \ installstaticlib \ installconfig \ installutils mv -f debian/$(lib)/$(libdir)/lib*.so debian/$(dev)/$(libdir) cp -p lrmi-*/README debian/$(bin)/usr/share/doc/$(lib)/README.lrmi cp -p debian/README.examples \ debian/$(dev)/usr/share/doc/$(lib)/examples/README.Debian tar czf debian/$(dev)/usr/share/doc/$(lib)/examples/demos.tar.gz \ Makefile.cfg demos doc/man6/!(mach32info|plane|wrapdemo).6 \ src/libvga.h tar czf debian/$(dev)/usr/share/doc/$(lib)/examples/threeDKit.tar.gz \ Makefile.cfg doc/man3/gl_*tri*.3 doc/man6/{plane,wrapdemo}.6 \ doc/man7/threedkit.7 threeDKit/!(0-COPYING) .PHONY: install-arch clean binary-indep: # Nothing to do. binary-arch: install-arch dh_testdir dh_testroot dh_link -a dh_installchangelogs -p$(lib) doc/CHANGES dh_installdocs -a --link-doc=$(lib) dh_installexamples -a dh_installinit -p$(bin) --no-start -r -- start 61 S . dh_installman -p$(bin) doc/man1/!(convfont|fix132x43|runx|setmclk).1 \ doc/man8/*.8 dh_installman -p$(lib) doc/man5/*.5 doc/man7/!(threedkit).7 dh_installman -p$(dev) doc/man3/!(gl_*tri*).3 dh_lintian -a dh_strip -a dh_compress -a dh_fixperms -a -Xbin/dumpreg -Xbin/restorefont -Xbin/restoretextmode \ -Xbin/restorepalette dh_makeshlibs -a dh_installdeb -a dh_shlibdeps -a -ldebian/$(lib)/$(libdir) -L$(lib) dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: binary-indep binary-arch binary debian/svgalib-bin.manpages0000644000000000000000000000002311642635364013105 0ustar debian/vga_reset.8 debian/svgalib-bin.dirs0000644000000000000000000000003711643012274012246 0ustar usr/bin usr/share/doc/libsvga1 debian/libsvga1-dev.docs0000644000000000000000000000016511734774426012345 0ustar doc/DESIGN doc/TODO doc/Driver-programming-HOWTO doc/README.patching doc/README.joystick debian/README.svgalib-dummy debian/changelog0000644000000000000000000010053711741451735011056 0ustar svgalib (1:1.4.3-33) unstable; urgency=low * QA upload. * Make libsvga1-dev Replace libsvga1 << 1:1.4.3-32 due to moved doc files. Thanks to Sven Joachim . (Closes: #666550) -- Guillem Jover Thu, 12 Apr 2012 05:43:43 +0200 svgalib (1:1.4.3-32) unstable; urgency=low * Orphan package, set maintainer to Debian QA Group. * Use which instead of “command -v” in svgalib-bin.init. * Quote `which file` invokation so that “test -x” does not succeed on an empty string, causing svgalib-bin.init to fail when the package is removed but not purged. (Closes: #644264) * Rename debian/libsvga1.copyright to debian/copyright, and use «dh_installdocs --link-doc» instead of manual links through dh_link. * Now using Standards-Version 3.9.3 (no changes needed). * Remove commented out debhelper commands in debian/rules. * Move doc/TODO from libsvga1 to libsvga1-dev, and do not install 0-README into libsvga1. * Make shared library packages multiarch: - Build-Depend on debhelper 8.1.3. - Add misc:Pre-Depends substvar to Pre-Depends field in libsvga1. - Add “Multi-Arch: same” field to libsvga1. - Define DEB_HOST_MULTIARCH and use it to set libdir. - Change paths from lib/ to lib/* in debian/rules. * Cleanup debian/rules targets: - Rename build to build-arch, add empty build-indep. - Add new build target depending on build-indep and build-arch. - Rename install to install-arch. - Change install-arch to depend on build-arch. - Change binary-arch to depend only on install-arch. - Do not do anything in binary-indep. -- Guillem Jover Thu, 29 Mar 2012 07:49:12 +0200 svgalib (1:1.4.3-31) unstable; urgency=low * Fix upstream installation of setuid programs and exclude them from dh_fixperms instead of restoring the permissions afterwards. This fixes a build failure when the utilities are not built. (Closes: #623747) * Now using Standards-Version 3.9.2 (no changes needed). -- Guillem Jover Wed, 04 May 2011 06:41:22 +0200 svgalib (1:1.4.3-30) unstable; urgency=low * Now using Standards-Version 3.9.1 (no changes needed). * Use architecture wildcards: - Use linux-any instead of any in binary package Architecture fields. - Use any-amd64 and any-i386 in libx86-dev Build-Depends architecture restrictions. * Port svgalib to GNU/kFreeBSD: - Use portable termios instead of termio. - Use VT_GETACTIVE instead of VT_GETSTATE on kFreeBSD. - Only use c_line member in struct termios on Linux. - Handle systems with no SIGPWR. - Implement __svgalib_physmem for kFreeBSD. Thanks to Tuco . (Closes: #291082, #591721) - Define IUCLC to 0 if not pre-defined. - Error out if there's no known way to get the current VT active state. - Add kfreebsd-any to binary package Architecture fields. * Add ${misc:Depends} substvars to all binary package Depends fields. -- Guillem Jover Tue, 07 Sep 2010 13:52:51 +0200 svgalib (1:1.4.3-29) unstable; urgency=low * Switch to source format “3.0 (quilt)”: - Remove quilt from Build-Depends. - Remove quilt.make include from debian/rules. - Remove patch and unpatch targets from debian/rules. - Remove now unneeded debian/README.source. -- Guillem Jover Wed, 02 Dec 2009 20:15:51 +0100 svgalib (1:1.4.3-28) unstable; urgency=low * Switch to debhelper compatibility level 7. * Use dh_prep instead of “dh_clean -k”. * Add support for LSB status action on init scripts. * Now using Standards-Version 3.8.3 (no changes needed). * Try to use the system's round function instead of locally defining it, to fix a build failure with newer eglibc 2.10 which expose it by defualt. - debian/patches/041_use_system_round.patch: New file. (Closes: #550775) * Fix LSB init dependency header: - Remove $local_fs from Required-Stop as we don't do anything on stop. - Switch from $local_fs to $remote_fs as we use scripts from /usr. * Do not “set -e” on the init script as log_action_end_msg relies on the exit code of the command, be it success or failure. * Remove long obsolete svgalibg1-dev and svgalibg1 packages. (Closes: #322068, #477539) * Add lintian overrides for suid-root programs in svgalib-bin as those cannot work at all w/o them. * Fix typo in svgalib.7 man page (.RH → .RE) that was producing a warning. - debian/patches/030_manpages_typos.patch: Update. -- Guillem Jover Tue, 13 Oct 2009 03:30:24 +0200 svgalib (1:1.4.3-27) unstable; urgency=low * Add a Homepage field. * Add Vcs-Browser and Vcs-Git fields. * Add a debian/README.source file. * Now using Standards-Version 3.8.0. * Refresh patches with -pab. * Remove DPATCHLEVEL variable from patches. -- Guillem Jover Sun, 22 Jun 2008 10:04:23 +0300 svgalib (1:1.4.3-26) unstable; urgency=low * Fix typos in man pages. (Closes: #482003, #482004, #482005, #482006) - debian/patches/030_manpages_typos.patch: Update. Thanks to A. Costa . * Expand shell glob for install* targets in debian/rules. -- Guillem Jover Thu, 29 May 2008 05:55:06 +0300 svgalib (1:1.4.3-25) unstable; urgency=low * Remove Tag fields, those are better maintained outside the package. * Use binary:Version substvar instead of deprecated Source-Version. * Remove ancient Conflicts and Replaces on suidmanager, svgalib-bin, svgalib, svgalib1, svgalibg1, svgalib1-dev, svgalib-dev, svgalib-dummy1 and svgalib-dummyg1. * Now using Standards-Version 3.7.3 (no changes needed). * Enable debian/patches/030_manpages_typos.patch, which got disabled during the transition to quilt. * Fix typo in svgalib.7 (it's -> its). (Closes: #443730) Thanks to Justin Pryzby . * Use external libx86 instead of embedded LRMI code to support VESA driver on !i386 architectures (for now only amd64). (Closes: #380710) - debian/patches/040_x86emu.patch: New file. Based on a patch by Matthew Garrett . * Port svgalib to non-i386/amd64 architectures: - Disable all io based drivers for architectures other than alpha, amd64 and i386, and only enable fbdev on the rest. - Switch package Architecture fields to any. - Only suid root existing binaries for svgalib-bin. - debian/patches/026_amd64.patch: Move asm fixes to ... - debian/patches/029_binutils-2.16.patch: ... here. - debian/patches/026_amd64.patch: Rename to ... - debian/patches/026_port_non_ia32.patch: ... this. Update. -- Guillem Jover Wed, 19 Dec 2007 06:25:07 +0200 svgalib (1:1.4.3-24) unstable; urgency=low * Switched to quilt: - Add new debian/patches/series file. - Add Build-Depends on 'quilt (>= 0.40)'. - Include quilt.make from debian/rules and remove patch and unpatch targets. - Remove now unused debian/patch.mk. * Change default mouse device to '/dev/input/mice'. (Closes: #351799) - debian/patches/031_mouse_input.patch: New file. * Remove the leftover mouse saved config snippet from old versions of the package. (Closes: #377063) * Add a Tag: field to the binary package, using the data from debtags. * Add an LSB description header to the init script. -- Guillem Jover Mon, 6 Nov 2006 04:55:15 +0200 svgalib (1:1.4.3-23) unstable; urgency=low * Remove libsvga1.postinst and libsvga1.prerm, as they were modifying a conffile, and now they are empty. (Closes: #376006) - As a side effect, there's no problem anymore with not using the C locale when using bracket expressions. (Closes: #343597) * Fix bashisms by removing svgalib-bin.preinst (which was handling an upgrade path from oldstable to stable) and replace -a with && inside a [] in libsvga1.postrm. * Now using Standards-Version 3.7.2 (no changes needed). * Switch to debhelper compatibility level 5. * Update FSF's address. * Make textmode look at /etc/vga when run as user, and remove old warning about files directly under /etc. (Closes: #324766) Thanks to Daniel Richard G. for the initial patch. * Use LSB sysvinit output functions, thus svgalib-bin Depends on lsb-base. * Remove unused commented lines and GZIP setting in debian/rules. * Fix massive amounts of typos. (Closes: #356816, #356817, #356818, #356819, #356820) - debian/patches/030_manpages_typos.patch: New file. Thanks to A Costa . -- Guillem Jover Tue, 4 Jul 2006 09:54:02 +0300 svgalib (1:1.4.3-22) unstable; urgency=low * Update watch file to version 3 (no changes needed). * Now using Standards-Version 3.6.2 (no changes needed). * Fix dpatchlevel on debian/patches/028_gcc-4.0.patch. * Fix build failure with binutils-2.16 due to the new assembler strictness and supress some warnings. (Closes: #318560) - debian/patches/029_binutils-2.16.patch: New file. -- Guillem Jover Sun, 17 Jul 2005 08:26:10 +0300 svgalib (1:1.4.3-21) unstable; urgency=low * Fix build failure with gcc-4.0. (Closes: #288573) - debian/patches/028_gcc-4.0.patch: New file. Thanks to Andreas Jochens . * Rewritten the copyright file. -- Guillem Jover Tue, 1 Feb 2005 08:12:13 +0100 svgalib (1:1.4.3-20) unstable; urgency=low * debian/patches: - 026_amd64.patch: Use NO_ASM on non i386 systems. (Closes: #278833) * Added an init script to svgalib-bin package to optionally save SVGA text mode state on boot. (Closes: #240444) * Do not use a build stamp. * Use patch target instead of manual constructing the call. -- Guillem Jover Wed, 29 Dec 2004 16:57:27 +0100 svgalib (1:1.4.3-19) unstable; urgency=low * debian/patches/: - 026_amd64.patch: Added amd64 support. (Closes: #278833) Thanks to Andreas Jochens . - 027_mouse_none_no_print.patch: Do not print mouse initialization error while not using any mouse. (Closes: #284208) Thanks to Osvaldo La Rosa . * Added a watch file. -- Guillem Jover Mon, 20 Dec 2004 19:44:20 +0100 svgalib (1:1.4.3-18) unstable; urgency=low * debian/patches/: - 024_vesa_not_print_crap.patch: Do not print leftover debugging stuff. (Closes: #239666) Thanks to Christian Häggström . - 025_mmap_return_value_test.patch: Fix the test on the mmap return value revealed with the new flexmmap on Linux kernels >= 2.6.9. * debian/README.svgalib-dummy: Use new libsvga1 package names. * Update debian/patch.mk and debian/rules accordingly. * Clean debian/rules. * Generate the arch independent packages in binary-indep. -- Guillem Jover Sat, 23 Oct 2004 13:37:53 +0200 svgalib (1:1.4.3-17) unstable; urgency=low * Lower-cased first letter from package description. * Changed package names to libsvga from the non-standard svgalibg. * debian/patches/: - 004_build.patch: Provide vga_reset utility. (Closes: #228124) - 021_gl_expandchar_3_bytes_pp.patch: Fix font background color assignment when using 3 bytes per pixel. (Closes: #149197) Thanks to Peter P. Eiserloh . - 022_neomagic_libretto100.patch: Move preprocessor conditional code logic for NeoMagic cards on Toshiba Libretto 100 and 110 to the config file. (Closes: #76233) - 023_config_add_chipsets.patc: Added missing supported chipsets to the config file template. * debian/vga_reset.8: Provide a manpage. -- Guillem Jover Tue, 27 Jan 2004 04:13:03 +0100 svgalib (1:1.4.3-16) unstable; urgency=low * Switch from debian/scripts to debian/patch.mk. * Removed old libc5 compatibility packages. * debian/patches/: - 002_iopl.patch: Updated. Includes sys/io.h on modules needing it. - 012_warnings.patch: Updated. Fix more warnings. - 020_purge_linux_headers.patch: Include linux kernel headers in the source to prevent the build failing due to broken headers provided by glibc. (Closes: #223212) -- Guillem Jover Tue, 9 Dec 2003 07:12:45 +0100 svgalib (1:1.4.3-15) unstable; urgency=low * Split .diff to logical patches in debian/patches/. * Created debian/scripts/ and populated with apply and unapply patch scripts adapted from xfree86 Debian source package. * debian/patches/: - 018_vgagl_against_vga.patch: Moved and corrected -L option to link libvgagl. (Closes: #211131) - 019_shlib_symlinks.patch: Moved shared library symlink creation to upstream Makefiles. * debian/rules: Adapted to not create shared library symlinks. * Now using Standards-Version 3.6.1. -- Guillem Jover Wed, 17 Sep 2003 18:33:44 +0200 svgalib (1:1.4.3-14) unstable; urgency=low * Fix libvgagl.so not explicitly linked against all needed libraries (Closes: #210649). -- Guillem Jover Sat, 13 Sep 2003 18:36:53 +0200 svgalib (1:1.4.3-13) unstable; urgency=low * New Maintainer Team. (Closes: #173471). * Compile lrmi.c with -fPIC. (Closes: #176070, #190338). * Moved svgalibg1-dev to Section libdevel. * Force dh_shlibdeps to use package svgalibg1, so svgalib-bin Depends on it instead of svgalib1. Thanks Ender . -- Guillem Jover Wed, 16 Jul 2003 15:14:52 +0200 svgalib (1:1.4.3-12) unstable; urgency=low * QA upload. * src/vga.c: Remove gratuitous `##' to placate gcc 3.3. Closes: #195591. -- Matej Vela Sun, 1 Jun 2003 20:25:46 +0200 svgalib (1:1.4.3-11) unstable; urgency=low * QA upload. * src/driver.h: Increase MAX_REGS to 11196 for Alliance ProMotion AT24. * src/libvga.h: libc5 LinuxThreads internally used SIGUSR1/SIGUSR2, so svgalib had to make do with SIGPROF/SIGUNUSED; this is not necessary for libc6, which uses real-time signals. (Well, only on 2.1.70 and later kernels, but 2.0 is no longer supported by modutils anyway.) Profiling should work now. Closes: #66775. * utils/svgakeymap: Default to /usr/share/keymaps/i386/qwerty/us.kmap rather than /usr/share/keymaps/us.map. Closes: #109682. * debian/svgalibg1.postrm: Remove /etc/vga only if it is empty, the way dpkg would. * Move doc/Driver-programming-HOWTO from svgalibg1 to svgalibg1-dev. * Move debian/README.svgalib-dummy from svgalib-bin to svgalibg1-dev. * Leave out 0-INSTALL. * Remove non-essential output from maintainer scripts. * Makefile: Timestamp for doc/man7/svgalib.7 seems to have changed accidentally; no need to regenerate 0-README. * Makefile.cfg: - Remove `DEB_BUILD_OPTIONS=debug' support and enable `-g' by default. - Let dh_strip handle `DEB_BUILD_OPTIONS=nostrip'. * debian/rules: - Use dh_installman and Bash globbing extensions to replace the byzantine rules.manpages. - Installing directly into package build directories involves less work than with debian/tmp and dh_install. - Compress examples as tarballs rather than individually (saves 292K). - `TARGET_FORMAT=elf', `USEGLIBC=yes' are default now. * src/nvvga.h, src/vgaio.c, src/vgaio.h: Unused; remove. * 0-RELEASE: Origin uncertain, last updated in 1999; remove. * README.glibc2: `-DUSEGLIBC' no longer necessary; remove. * doc/README.kernel-2.3: `BACKGROUND=y' already commented out; remove. * doc/SECURITY.advisory: Fixed in 1997 (1.2.11); remove. * debian/lintian/svgalib-bin: Lintian no longer issues `setuid-binary' warnings for svgalib programs; remove. * debian/make-symlinks: No longer necessary; remove. * debian/svgalibg1.postinst: Remove 1.2.8 compatibility code from 1996. * debian/svgalibg1.preinst: Remove /etc compatibility code from 1997. * debian/svgalibg1.prerm: Remove /usr/doc transition code. * debian/changelog: Remove obsolete Emacs local variables. * Conforms to Standards version 3.5.8. -- Matej Vela Mon, 2 Dec 2002 00:30:43 +0100 svgalib (1:1.4.3-10) unstable; urgency=low * Yet another QA upload. * Fix `fails to build from source' bug introduced in -9 (closes: #148626). * restorepalette.c: corrected my previous patch: run vga_setpalette, but not port_in, port_out functions on framebuffer device. * svgalibg1.postrm: `rm -rf /etc/vga' on purge. * debian/rules: call upstream distclean in out clean target. -- Robert Luberda Sat, 1 Jun 2002 10:16:55 +0200 svgalib (1:1.4.3-9) unstable; urgency=low * QA upload. * Fix restorefont, restorepalette segfaults on framebuffer device (probably this is fix for #128164 and #128165, but this needs more testing, so I'm not closing the bugs now.) + src/vga.c: check in vga_(get|put)textfont functions if font_buf1 was initialized. Because the variable was NULL on FBDev, memcpy() caused segmentation fault error. + restorefont.c: set font_size to FONT_SIZE as defined in libvga.h + restorepalette.c: does nothing if chipset is FBDev. * savetextmode and textmode now use $HOME/.vga if we don't have write permission for /etc/vga directory. Documented the change in manpage (closes: #61625). * Change .so requests in manpages into symlinks. Hopefully it is only thing that got broken during repackaging. * svgalib-bin should conflit with suidmanager, not suidregister. * svgalib-bin.preinst: remove unwanted statoverrides. * Standards-Version: 3.5.6 * Handle DEB_BUILD_OPTIONS=debug,nostrip. * Don't use -V option of dh_makeshlibs - versioned dependencies on svgalib1g would probably make svgalib1-libggi2 package unusable. -- Robert Luberda Sun, 26 May 2002 22:18:44 +0200 svgalib (1:1.4.3-8) unstable; urgency=low * QA upload. * Install updated r128 driver. Quoted from upstream homepage: ` The r128 driver in 1.4.3 has serious bugs that might cause system hang on console switch and sync lose on some mode changes. Please use this driver, r128.c, instead of the one in the distribution.' * Svgalib programs can use the mouse device even when the device is only readable by root since svgalib version 1.4.2 (closes: #13985, #47060). * Fix typo in libvga.config (closes: #143181). * Repackaged with debhelper v4. * Don't use dpkg-statoverride or suid(un)register, just install some programs suid. * Package svgalib-bin: 'Conflicts: suidregister (<< 0.52)'. * debian/control: use ${shlibs:Depends}, ${misc:Depends} and ${perl:Depends} to get proper, versioned dependencies. * Add linitan override files for setuid binaries and /usr/i486-linuxlibc1 directory. All packages are lintian clean now. -- Robert Luberda Thu, 23 May 2002 08:26:20 +0200 svgalib (1:1.4.3-7) unstable; urgency=low * QA upload. * Increase MAX_REGS to 10172 - it seems the ATI Rage Mobility VESA card needs even more space (closes: #114861, #131735). * Unconditionally remove /usr/doc/svgalibg1-dev symlink in prerm, not just when /etc/vga/libvga.config is present (closes: #79925). * Refer to the X Window System correctly (closes: #124200). -- Colin Watson Fri, 29 Mar 2002 04:36:58 +0000 svgalib (1:1.4.3-6) unstable; urgency=low * QA upload. * Set SUPPRESS_FOR_LIBC5 while installing into the temporary tree as well as when building, so that libvga doesn't get rebuilt against libc6 (closes: #121142). -- Colin Watson Mon, 11 Feb 2002 02:20:04 +0000 svgalib (1:1.4.3-5) unstable; urgency=low * Orhaning the package, I think I am not skilled enough for it. -- Lenart Janos Sun, 3 Feb 2002 12:08:20 +0100 svgalib (1:1.4.3-4) unstable; urgency=low * Fixed the nasty dpkg-statoverride bug. (Closes: Bug#129443) * No more override disparity. -- Lenart Janos Wed, 16 Jan 2002 21:23:16 +0100 svgalib (1:1.4.3-3) unstable; urgency=low * New maintainer. * Added Build-Depends: altgcc, libc5-altdev. (Closes: Bug#89819) * Added Section and Priority fields. * Tuned clean in debian/rules, now cleans up well. * Removed some unneeded sections (strip). * Now uses dpkg-statoverride. -- Lenart Janos Tue, 15 Jan 2002 16:43:23 +0100 svgalib (1:1.4.3-2) unstable; urgency=low * Fix manpage symlinks (Closes: Bug#100115) * Update default keymap location for FHS (Closes: Bug#99939) -- Andy Mortimer Mon, 11 Jun 2001 19:54:01 +0100 svgalib (1:1.4.3-1) unstable; urgency=low * New upstream release. -- Andy Mortimer Wed, 30 May 2001 13:45:41 +0100 svgalib (1:1.4.2-2) unstable; urgency=low * Set Architecture to i386, since it no longer builds on the alpha. (Closes: Bug#39312) -- Andy Mortimer Mon, 12 Mar 2001 15:19:49 +0000 svgalib (1:1.4.2-1) unstable; urgency=low * New upstream version. * Since /etc/vga should only contain files from svgalib, attempt to remove it when purged: delete *.bak, and then attempt an rmdir. (Closes: Bug#70413) * Really remove the /usr/doc link on removal (Closes: Bug#65036) -- Andy Mortimer Thu, 2 Nov 2000 15:12:38 +0000 svgalib (1:1.4.1-2) unstable; urgency=low * Fix dangling symbolic link in the man directory. * Add various features from the latest pre-release on the advice of the upstream maintainer: - 'pnp' mouse patch - banshee driver fixes -- Andy Mortimer Thu, 13 Jan 2000 22:01:53 +0000 svgalib (1:1.4.1-1) unstable; urgency=low * New upstream version. (closes: Bug#53442) -- Andy Mortimer Tue, 11 Jan 2000 19:42:36 +0000 svgalib (1:1.4.0-3) unstable; urgency=low * Ooops! Fix permissions problem on install (#48262) -- Andy Mortimer Mon, 25 Oct 1999 19:20:07 +0100 svgalib (1:1.4.0-2) unstable; urgency=high * Migrate a change from the 1.4.1 pre-release series to avoid probing too much from PCI if it's not necessary (avoids funny interactions with SCSI devices). (#47512) -- Andy Mortimer Sun, 17 Oct 1999 19:07:36 +0100 svgalib (1:1.4.0-1) unstable; urgency=low * Change #if 1 to #if 0 in vgamisc.c, reenabling the old vga_getkey() function which doesn't block. Apparrently it doesn't work on the alpha, but svgalib doesn't seem to compile on the alpha anyway! If anybody does have it working, patches would be appreciated ... (#21821) * Put Makefile.cfg and libvga.h into the examples directory, and fix the pathnames in files which refer to them. (#13979) * New upstream version (#42754) -- Andy Mortimer Thu, 26 Aug 1999 19:35:09 +0100 svgalib (1:1.3.1-2) unstable; urgency=low * Fix the symlinks for a couple of manpages (#32237) -- Andy Mortimer Thu, 21 Jan 1999 21:17:50 +0000 svgalib (1:1.3.1-1) unstable; urgency=low * Switch off BACKGROUND mode, since it doesn't work on kernels older than 2.0.36 (apparrently it crashes, although it never did for me ...) * Clean up some lintian errors/warnings. * New upstream version. * Moved data files for savetextmode from /etc to /etc/vga. -- Andy Mortimer Tue, 12 Jan 1999 20:56:44 +0000 svgalib (1:1.3.0.19981020-1) unstable; urgency=low * Changes to debian/rules for compatibility with POSIX sh (ie, remove bashisms). * New upstrean beta release containing small bugfixes to VESA driver and Cirrus autodetection (#28359). * This version was never released. -- Andy Mortimer Thu, 5 Nov 1998 20:18:52 +0000 svgalib (1:1.3.0.19980916-1) unstable; urgency=medium * Package the beta version from http://www.cs.bgu.ac.il/~zivav/svgalib/, to get the updated VESA driver. The upstream version number is actually 1.3.1.19980916, but I've kept it at 1.3.0.19980916 to preserve the ordering of the versions in dpkg. (fixes 27420 26244 26646) -- Andy Mortimer Mon, 12 Oct 1998 20:49:57 +0100 svgalib (1:1.3.0-0.3) stable unstable; urgency=high * NMU: fix substvars (fixes 26177) * don't exit on PCI bus 0 (maybe fixes 26241) -- Adrian Bridgett Tue, 1 Sep 1998 20:49:57 +0100 svgalib (1:1.3.0-0.2) stable unstable; urgency=high * NMU: another loophole [fixes 25878] -- Adrian Bridgett Tue, 18 Aug 1998 19:55:05 +0100 svgalib (1:1.3.0-0.1) unstable; urgency=low * NMU: new upstream [fixes 24461, 25484] * ldconfig in all configure cases [fixes 22249] * move textmode/fontdata to secure location [fixes 23739] * latest security patch (file descriptor panic and dumpreg) by Kevin Vajk , Ben Gertzfield and Wichert Akkermann of Debian and Pavel Kankovsky and Chris Evans of LSAP -- Adrian Bridgett Sat, 15 Aug 1998 13:37:43 +0100 svgalib (1:1.2.13-3.4) unstable frozen; urgency=HIGH * NMU: fixes security flaw reported by Kevin Vajk , with modifications by Wichert Akkerman . -- Ben Gertzfield Thu, 23 Jul 1998 15:51:25 -0700 svgalib (1:1.2.13-3.3) unstable frozen; urgency=high * really fix savetextmode's /tmp security hole (fixes 23601) -- Adrian Bridgett Tue, 16 Jun 1998 20:22:27 +0100 svgalib (1:1.2.13-3.2) unstable frozen; urgency=high * more conflicts for svgalib1, svgalibg1, svgalibg1-dev (fixes 20895, 20910) * call ldconfig on postinst --configure - packaging-manual section 12 -- Adrian Bridgett Thu, 14 May 1998 23:01:14 +0100 svgalib (1:1.2.13-3.1) unstable frozen; urgency=low * Non-maintainer release since maintainer's machine is dead * Avoid /tmp race in savetextmode (fixes 20138) -- Adrian Bridgett Sun, 5 Apr 1998 13:39:16 +0100 svgalib (1:1.2.13-3) unstable frozen; urgency=medium * -2 didn't actually upload, but I'm making a new release anyway, since some information has changed (albeit only the distribution). * See the -2 changelog for more details, but this upload fixes an important bug (and several smaller ones), and should therefore go into frozen. * Upgraded to latest standards version. * Fix typos in package descriptions (should fix #18964). -- Andy Mortimer Mon, 16 Mar 1998 21:36:41 +0000 svgalib (1:1.2.13-2) unstable; urgency=low * Use suidmanager to set permissions on setuid binaries, if it's installed. * Fix file permissions (fixes #18182, and about 300 lintian warnings). * Add mouse type `unconfigured' which displays a message if a program tries to access the mouse, and make it the default. (fixes #13458) * Don't depend on svgalib | svgalib-dummy in shlibs (fixes #18091). * New mouse type "unconfigured," now the default (fixes #13979). In order to avoid annoying the Microsoft mouse owners too much, the prerm/postinst contains new code to keep the mouse settings transparently across upgrades (see /etc/vga/libvga.config). Those who still have the default config file will have to edit it once to get the microsoft mouse back, but svgalib will then track the upstream file without prompting at every upgrade. * Don't run ldconfig any more. * All doc files now go in /usr/doc/svgalibg1, and /usr/doc/svgalib is a symlink to it, rather than the other way round, to keep lintian happy. -- Andy Mortimer Thu, 12 Feb 1998 22:51:09 +0000 svgalib (1:1.2.13-1) unstable; urgency=low * svgalib-bin now Replaces: svgalib1-bin (fixes #15082). * Increased MAX_REGS to 405 in src/driver.h (fixes #13126). * New upstream release. Major features: - All calls now have manpages! Interestingly enough, this doesn't seem to close any bugs. As a result of this, many README files have been removed. - "Complete new style vga_accel support for Mach32." - Extended fontbuffer in the library and in restorefont, to fix font corruption problems with new kernels (fixes #12445). - Added TVGA9440 support. * Change /dev/console to /dev/tty0 (to which it is normally, but apparrently not always, a symlink) (fixes #10584) * My first personal release as maintainer. -- Andy Mortimer Sun, 30 Nov 1997 22:13:05 +0000 svgalib (1:1.2.11-1) unstable; urgency=low * This is a more or less non-maintainer release to finally bring out a libc6 version of svgalib, which is urgently needed for the libc6 migration of all packages depending on it. This release has been mode together by Joost Witteveen and Roman Hodek . But we both don't want to be maintainers for svgalib, if you want it, it's available. * New upstream release (made some of Joost's libc6 changes unnecessary) * removed aout stuff. * changed names of packages: svgalib1 -> svgalibg1 (libc6) svgalib1-dev -> svgalibg1-dev (libc6) svgalib1-dev -> svgalib1-altdev (libc5) svgalib1-bin -> svgalib-bin (there's no reason to put soname in a package that uses svgalib1g, I'd say). aout-svgalib -> - (obvious) * Changed most of the Depends/Conflicts/Replaces: -the shared libs now don't conflict/replaces old versions any more (different package names, should be possible to install simultaniously) -the -dev and -bin packages don't Replaces: svgalib any more (why was this ever done? seems strange to me). -svgalib1 (libc5 shared libs) must depend on svgalibg1, because there are the config files... * changed the directory of the documentation to svgalib, as the docs are common to all programmes, and svgalib seems the only common denominator. * removed $(MAKE) -f debian/rules buildclean from the "binary" target. (why was this ever put there?) * rewrote about every line of debian/rules for easy soname/minor name changes (now uses variable $(soname), etc). * allow libsvga to compile if libsvga-dev isn't installed on the system (why wasn't this possible before?) * removed call of ldconfig in Makefile that was executed in the debian/rules binary target: I don't want my system to be reconfigured when building packages. * also removed uninstall dependency of install target, it can affect the installation of the compiling system... * Changed #ifdef USEGLIC in upstream sources to #if __GLIBC__ >= 2, cause __GLIBC__ is predefined. Patch forwarded upstreams. * Added $(SHLIBLIBS) when linking the shared libs; the value ("-lc") is defined only from debian/rules. This adds a dependency to libc that is needed by ld-linux.so. * Removing of obsolete symlinks in /etc from preinst now works. -- Roman Hodek Thu, 7 Aug 1997 21:31:24 +0200 svgalib (1:1.2.10-4) unstable; urgency=low * Added symbolic links so that dpkg-shlibdeps works (Bug #7676) * Fixed postrm scripts (Bug #7648) -- Larry Daffner Wed, 26 Feb 1997 23:10:58 -0600 svgalib (1:1.2.10-3) unstable; urgency=low * Moved examples to /usr/doc/svgalib1/examples -- Larry Daffner Tue, 11 Feb 1997 21:04:31 -0600 svgalib (1:1.2.10-2) unstable; urgency=low * Added --assert-working-epoch to preinst scripts * Compiled with -D_REENTRANT -- Larry Daffner Sun, 26 Jan 1997 11:01:05 -0600 svgalib (1:1.2.10-1) unstable; urgency=low * Built to allow dynamic et4000 registers * switched to epoch numbering scheme to mirror upstream version -- Larry Daffner Tue, 21 Jan 1997 23:02:16 -0600 svgalib (1.210-4) unstable; urgency=low * Fixed source package * Fixed Conflicts: and Replaces: headers in svgalib1 to deal with old package gracefully -- Larry Daffner Mon, 9 Dec 1996 01:55:07 -0600 svgalib (1.210-3) unstable; urgency=low * Added replaces: svgalib (Bug #5691, #5692) -- Larry Daffner Fri, 29 Nov 1996 10:11:31 -0600 svgalib (1.210-2) unstable; urgency=low * corrected error in shlibs file (Bug#5235) -- Larry Daffner Sun, 3 Nov 1996 19:05:33 -0600 svgalib (1.210-1) unstable; urgency=low * New upstream version * Converted to new source package standards * New maintainer * Fixed bugs #3887, #4407, #4536, #2311 -- Larry Daffner Thu, 31 Oct 1996 19:20:40 -0600 debian/copyright0000644000000000000000000002022311734774427011140 0ustar This package was created by Andy Mortimer based on the packaging put together by Larry Daffner , with help from Wichert Akkerman . Based on the package for svgalib 1.2.8 by Richard Kettlewell, based on Ted Hajek's original Debian package. Then maintained by Lenart Janos , followed by Guillem Jover . It was downloaded from . Copyright and Licenses: driver.h, et3000.c, and others ======== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. Multi-chipset support Copyright (c) 1993 Harm Hanemaayer partially copyrighted (C) 1993 by Hartmut Schirmer egadrv.c ======== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. Multi-chipset support Copyright 1993 Harm Hanemaayer EGA support from EGAlib by Kapil Paranjape partially copyrighted (C) 1993 by Hartmut Schirmer et4000.c ======== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. Multi-chipset support Copyright (c) 1993 Harm Hanemaayer partially copyrighted (C) 1993 by Hartmut Schirmer ET4000 code taken from VGAlib ET4000 code modified to handle HiColor modes better by David Monro Dynamic register loading by Hartmut Schirmer HH: ET4000/W32 detection added and support for more than 1Mb (based on vgadoc3) (untested). HH: Detect newer ET4000/W32p. gvga6400.c ========== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. Multi-chipset support Copyright 1993 Harm Hanemaayer partially copyrighted (C) 1993 by Hartmut Schirmer GVGA 6400 driver Copyright 1994 Arno Schaefer only Hires 256 color modes (640x480, 800x600) supported libvga.h ======== SVGAlib, Copyright 1993 Harm Hanemaayer VGAlib version 1.2 - (c) 1993 Tommy Frandsen partially copyrighted (C) 1993 by Hartmut Schirmer oak.c ===== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. Multi-chipset support Copyright 1993 Harm Hanemaayer partially copyrighted (C) 1993 by Hartmut Schirmer OTI-067/077/087 support driver release 1.2 (12 September 1994) Rewritten/fleshed out by Christopher Wiles (a0017097@wsuaix.csc.wsu.edu) vga.c ===== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. Multi-chipset support Copyright (C) 1993 Harm Hanemaayer partially copyrighted (C) 1993 by Hartmut Schirmer Changes by Michael Weller. mach32.c ======== VGAlib version 1.2 - (c) 1993 Tommy Frandsen This library is free software; you can redistribute it and/or modify it without any restrictions. This library is distributed in the hope that it will be useful, but without any warranty. ATI Mach32 driver (C) 1994 Michael Weller eowmob@exp-math.uni-essen.de mat42b@aixrs1.hrz.uni-essen.de eowmob@pollux.exp-math.uni-essen.de MICHAEL WELLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MICHAEL WELLER BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. This tool contains one routine out of Xfree86, therefore I repeat its copyright here: (Actually it is longer than the copied code) Copyright 1992 by Orest Zborowski Copyright 1993 by David Wexelblat Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Orest Zborowski and David Wexelblat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Orest Zborowski and David Wexelblat make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. Copyright 1993 by Kevin E. Martin, Chapel Hill, North Carolina. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Thomas Roell not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Thomas Roell makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THOMAS ROELL, KEVIN E. MARTIN, AND RICKARD E. FAITH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Author: Thomas Roell, roell@informatik.tu-muenchen.de Rewritten for the 8514/A by Kevin E. Martin (martin@cs.unc.edu) Modified for the Mach-8 by Rickard E. Faith (faith@cs.unc.edu) Rewritten for the Mach32 by Kevin E. Martin (martin@cs.unc.edu) three-D kit =========== 3DKIT version 1.3 High speed 3D graphics and rendering library for Linux. Copyright (C) 1996, 1997 Paul Sheer psheer@icon.co.za This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA