]> git.neil.brown.name Git - history.git/commitdiff
Import 2.1.125pre2 2.1.125pre2
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:16:55 +0000 (15:16 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:16:55 +0000 (15:16 -0500)
27 files changed:
Documentation/Configure.help
MAINTAINERS
Makefile
arch/i386/kernel/io_apic.c
arch/i386/lib/delay.c
arch/i386/mm/fault.c
arch/m68k/mac/macints.c
arch/m68k/mac/via6522.c
drivers/block/md.c
drivers/char/console.c
drivers/char/i2c.c
drivers/char/radio-sf16fmi.c
drivers/char/saa5249.c
drivers/char/tty_io.c
drivers/char/videodev.c
drivers/net/ppp.c
drivers/net/sdla_x25.c
drivers/scsi/scsicam.c
include/linux/linkage.h
init/main.c
ipc/shm.c
mm/vmscan.c
net/sunrpc/clnt.c
scripts/lxdialog/dialog.h
scripts/lxdialog/lxdialog.c
scripts/lxdialog/menubox.c
scripts/lxdialog/textbox.c

index 2a02597dbd8610e3981a00d8b6c427da03facb10..945da3384035ffbf23c9e8ec4cf641ba46363283 100644 (file)
@@ -225,7 +225,8 @@ CONFIG_BLK_DEV_IDE
   If you say Y here, you will use the full-featured IDE driver to
   control up to four IDE interfaces, each being able to serve a
   "master" and a "slave" device, for a total of up to eight IDE
-  disk/cdrom/tape/floppy drives.
+  disk/cdrom/tape/floppy drives.  People with SCSI-only systems
+  should say 'N' here.
 
   Useful information about large (>540MB) IDE disks, sound card IDE
   ports, module support, and other topics, is contained in
@@ -256,6 +257,8 @@ CONFIG_BLK_DEV_HD_ONLY
   more detailed information, read the Disk-HOWTO, available via FTP
   (user: anonymous) from ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO.
 
+  People with SCSI-only systems can say 'N' here.
+
 Use old disk-only driver on primary interface
 CONFIG_BLK_DEV_HD_IDE
   There are two drivers for MFM/RLL/IDE disks. Most people use just
@@ -270,11 +273,13 @@ CONFIG_BLK_DEV_HD_IDE
   addresses. Normally, just say N here; you will then use the new
   driver for all 4 interfaces.
 
+  People with SCSI-only systems can say 'N' here.
+
 Include IDE/ATA-2 DISK support
 CONFIG_BLK_DEV_IDEDISK
   This will include enhanced support for MFM/RLL/IDE hard disks. If you
   have a MFM/RLL/IDE disk, and there is no special reason to use the
-  old hard disk driver instead, say Y.  
+  old hard disk driver instead, say Y.  If all your disks are SCSI, say 'N'.
 
   If you want to compile this driver as a module ( = code which can be
   inserted in and removed from the running kernel whenever you want),
@@ -313,7 +318,7 @@ Include IDE/ATAPI TAPE support
 CONFIG_BLK_DEV_IDETAPE
   If you have an IDE tape drive using the ATAPI protocol, say Y.
   ATAPI is a newer protocol used by IDE tape and CDROM drives, similar
-  to the SCSI protocol.  
+  to the SCSI protocol (but say 'N' if your tape is a SCSI device).
 
   If you say Y here, the tape drive will be identified at boot time
   along with other IDE devices, as "hdb" or "hdc", or something
@@ -363,7 +368,7 @@ CONFIG_BLK_DEV_IDESCSI
   If both this SCSI emulation and native ATAPI support are compiled
   into the kernel, the native support will be used.
 
-  If unsure, say N.
+  People with SCSI-only systems should say 'N' here.  If unsure, say N.
 
 CMD640 chipset bugfix/support
 CONFIG_BLK_DEV_CMD640
@@ -387,7 +392,9 @@ CONFIG_BLK_DEV_CMD640
 
   The CMD640 chip is also used on add-in cards by Acculogic, and on
   the "CSA-6400E PCI to IDE controller" that some people have. For
-  details, read Documentation/ide.txt. If unsure, say Y.
+  details, read Documentation/ide.txt. 
+
+  People with SCSI-only systems should say 'N' here.  If unsure, say Y.
 
 CMD640 enhanced support
 CONFIG_BLK_DEV_CMD640_ENHANCED
@@ -405,14 +412,18 @@ CONFIG_BLK_DEV_RZ1000
   severe data corruption under many conditions.  Say Y here to include
   code which automatically detects and corrects the problem under
   Linux.  This may slow disk throughput by a few percent, but at least
-  things will operate 100% reliably. If unsure, say Y.
+  things will operate 100% reliably. 
+
+  People with SCSI-only systems can say 'N' here.  If unsure, say Y.
 
 Generic PCI IDE chipset support
 CONFIG_BLK_DEV_IDEPCI
   Enable this for PCI systems which use IDE drive(s).
   This option helps the IDE driver to automatically detect and
   configure all PCI-based IDE interfaces in your system.
-  It is safe to say Y to this question.
+
+  People with SCSI-only systems should say 'N' here.   It is safe to
+  say 'Y' to this question.
 
 Generic PCI bus-master DMA support
 CONFIG_BLK_DEV_IDEDMA
@@ -468,6 +479,8 @@ CONFIG_IDE_CHIPSETS
   chipsets.  Most of these also require special kernel boot parameters
   to actually turn on the support at runtime.
 
+  People with SCSI-only systems should say 'N' here. 
+
 Generic 4 drives/port support
 CONFIG_BLK_DEV_4DRIVES
   Certain older chipsets, including the Tekram 690CD, use a
index 79937bda07b3e411352c53a50fcf565a0fb0999e..71c6087eb86d3efd24935edba4501db40c5919f0 100644 (file)
@@ -57,8 +57,7 @@ L: Mailing list that is relevant to this area
 W: Web-page with status/info
 S: Status, one of the following:
 
-       Supported:      Someone is actually paid to look after this (wildly
-                       improbable).
+       Supported:      Someone is actually paid to look after this.
        Maintained:     Someone actually looks after it.
        Odd Fixes:      It has a maintainer but they don't have time to do
                        much other than throw the odd patch in. See below..
index 120782f39f345795e5ad24437fefa6e6c0e1abde..cc16579e7d184cc62205e9bd549da030a49bcf82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -321,10 +321,10 @@ modules_install:
        if [ -f VIDEO_MODULES ]; then inst_mod VIDEO_MODULES video; fi; \
        if [ -f FC4_MODULES   ]; then inst_mod FC4_MODULES   fc4;   fi; \
        \
-       ls *.o > .allmods; \
-       echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \
-       if [ -s .misc ]; then inst_mod .misc misc; fi; \
-       rm -f .misc .allmods; \
+       ls *.o > $$MODLIB/.allmods; \
+       echo $$MODULES | tr ' ' '\n' | sort | comm -23 $$MODLIB/.allmods - > $$MODLIB/.misc; \
+       if [ -s $$MODLIB/.misc ]; then inst_mod $$MODLIB/.misc misc; fi; \
+       rm -f $$MODLIB/.misc $$MODLIB/.allmods; \
        )
 
 # modules disabled....
index be0ce3b1a4165b4c9a936c9cf1d5bdda4f662895..fa8ef26bbdafe5a3c261a59a2bdaefe544877f9d 100644 (file)
@@ -723,10 +723,20 @@ void __init print_IO_APIC(void)
                );
        }
 
-       printk("IRQ to pin mappings:\n");
-       for (i = 0; i < PIN_MAP_SIZE; i++)
-               printk("%d->%d(%d) ", i, irq_2_pin[i].pin, irq_2_pin[i].next);
-       printk("\n");
+       printk(KERN_DEBUG "IRQ to pin mappings:\n");
+       for (i = 0; i < NR_IRQS; i++) {
+               struct irq_pin_list *entry = irq_2_pin + i;
+               if (entry->pin < 0)
+                       continue;
+               printk(KERN_DEBUG "IRQ%d ", i);
+               for (;;) {
+                       printk("-> %d", entry->pin);
+                       if (!entry->next)
+                               break;
+                       entry = irq_2_pin + entry->next;
+               }
+               printk("\n");
+       }
 
        printk(".................................... done.\n");
 
index 12b6b468370f744dd41852ecf079638ca164ff9e..ae8aec6360f961e80f3d7223c2fa04ce74fb1b8e 100644 (file)
@@ -5,7 +5,9 @@
  *     Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
  *
  *     The __delay function must _NOT_ be inlined as its execution time
- *     depends wildly on alignment on many x86 processors.
+ *     depends wildly on alignment on many x86 processors. The additional
+ *     jump magic is needed to get the timing stable on all the CPU's
+ *     we have to worry about.
  */
 
 #include <linux/sched.h>
 void __delay(unsigned long loops)
 {
        __asm__ __volatile__(
-               "1:\tdecl %0\n\tjns 1b"
+               "\tjmp 1f\n"
+               ".align 16\n"
+               "1:\tjmp 2f\n"
+               ".align 16\n"
+               "2:\tdecl %0\n\tjns 2b"
                :/* no outputs */
                :"a" (loops)
                :"ax");
index 358ff50332e9b7ffba08135906da110516e35d26..d28005947f324fbec166777c60864677c2917e66 100644 (file)
@@ -103,8 +103,8 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
 
        tsk = current;
        mm = tsk->mm;
-       if (in_interrupt())
-               die("page fault from irq handler",regs,error_code);
+       if (in_interrupt() || mm == &init_mm)
+               die("page fault without a user context",regs,error_code);
 
        down(&mm->mmap_sem);
 
index ac8a66a10796628ea7d19f80a2533d127905e054..b703cb27587994b315b18f6fa30117e653806223 100644 (file)
@@ -69,6 +69,7 @@
  * - 
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
index 1e76b343f9731fd6c54d3c279cede0b009be96c4..08ca49071d27ca7439b15cc65f19cdd29dbe7b27 100644 (file)
@@ -5,7 +5,6 @@
  *     via them as are assorted bits and bobs - eg rtc, adb.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
index b6cf3d34e26ec951b57233929003b13aa59a27f4..847162c03a71cd949653f915049d4736db9f7640 100644 (file)
@@ -696,7 +696,6 @@ static int md_ioctl (struct inode *inode, struct file *file,
     RO_IOCTLS(inode->i_rdev,arg);
     
     default:
-    printk ("Unknown md_ioctl %d\n", cmd);
     return -EINVAL;
   }
 
index bd5c3ee7c3b06d24ad6a5bf7ddf8c99cdf9030c0..6a3b8fbd94c0d266d280be13d08cdf07b29f6e56 100644 (file)
@@ -99,6 +99,7 @@
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
+#include <asm/bitops.h>
 
 #include <asm/linux_logo.h>
 
@@ -1962,14 +1963,14 @@ void vt_console_print(struct console *co, const char * b, unsigned count)
 {
        int currcons = fg_console;
        unsigned char c;
-       static int printing = 0;
+       static unsigned long printing = 0;
        const ushort *start;
        ushort cnt = 0;
        ushort myx = x;
 
-       if (!printable || printing)
-               return;  /* console not yet initialized */
-       printing = 1;
+       /* console busy or not yet initialized */
+       if (!printable || test_and_set_bit(0, &printing))
+               return;
 
        if (kmsg_redirect && vc_cons_allocated(kmsg_redirect - 1))
                currcons = kmsg_redirect - 1;
@@ -1981,7 +1982,7 @@ void vt_console_print(struct console *co, const char * b, unsigned count)
        }
 
        if (vcmode != KD_TEXT)
-               return;
+               goto quit;
 
        /* undraw cursor first */
        if (IS_FG)
@@ -1993,9 +1994,7 @@ void vt_console_print(struct console *co, const char * b, unsigned count)
         * Problems caused when we have need_wrap set on '\n' character */
        disable_bh(CONSOLE_BH); 
        while (count--) {
-               enable_bh(CONSOLE_BH);
                c = *b++;
-               disable_bh(CONSOLE_BH);
                if (c == 10 || c == 13 || c == 8 || need_wrap) {
                        if (cnt > 0) {
                                if (IS_VISIBLE)
@@ -2042,7 +2041,7 @@ void vt_console_print(struct console *co, const char * b, unsigned count)
        poke_blanked_console();
 
 quit:
-       printing = 0;
+       clear_bit(0, &printing);
 }
 
 static kdev_t vt_console_device(struct console *c)
index 9741f4be44c3cec995e4ba50e64ac5e0eb477c84..851929e94794977d2fc96144a033d6f3f27b7aec 100644 (file)
@@ -21,7 +21,7 @@
 #define I2C_DEBUG(x)  if (i2c_debug) (x)
 
 static int scan      = 0;
-static int verbose   = 1;
+static int verbose   = 0;
 static int i2c_debug = 0;
 
 MODULE_PARM(scan,"i");
index 192fa5236f536937352fbf662891d6e76bacd175..efc6738dd80d67e1ab8d5d278168da7787b28a53 100644 (file)
@@ -26,7 +26,7 @@ struct fmi_device
 {
        int port;
         int curvol; /* 1 or 0 */
-        unsigned long curfreq; /* RSF16_PREC * freq in MHz */
+        unsigned long curfreq; /* freq in kHz */
         __u32 flags;
 };
 
index f3185252f2aa771a16931ea6b9c9eb5e197a094a..608ac56ba670fdd2c26e6dee4896e4cc27b64c96 100644 (file)
@@ -149,7 +149,6 @@ static int saa5249_attach(struct i2c_device *device)
        if(device->bus->id!=I2C_BUSID_BT848)
                return -EINVAL;
        
-       printk(KERN_DEBUG "saa5249_attach: bus %p\n", device->bus);
        strcpy(device->name, IF_NAME);
        
        /*
@@ -205,7 +204,6 @@ static int saa5249_attach(struct i2c_device *device)
 static int saa5249_detach(struct i2c_device *device)
 {
        struct video_device *vd=device->data;
-       printk(KERN_DEBUG "saa5249_detach\n");
        video_unregister_device(vd);
        kfree(vd->priv);
        kfree(vd);
@@ -215,7 +213,6 @@ static int saa5249_detach(struct i2c_device *device)
 static int saa5249_command(struct i2c_device *device,
                             unsigned int cmd, void *arg)
 {
-       printk(KERN_DEBUG "saa5249_command\n");
        return -EINVAL;
 }
 
@@ -621,11 +618,9 @@ static int saa5249_open(struct video_device *vd, int nb)
        struct saa5249_device *t=vd->priv;
        int pgbuf;
 
-       printk("t=%p\n",t);
        if (t->bus==NULL) 
                return -ENODEV;
 
-       printk("Do i2c %p\n",t->bus);
        if (i2c_senddata(t, CCTWR, 0, 0, -1) ||         /* Select R11 */
                                                /* Turn off parity checks (we do this ourselves) */
                i2c_senddata(t, CCTWR, 1, disp_modes[t->disp_mode][0], 0, -1) ||
@@ -636,7 +631,6 @@ static int saa5249_open(struct video_device *vd, int nb)
                return -EIO;
        }
 
-       printk("clean\n");
        for (pgbuf = 0; pgbuf < NUM_DAUS; pgbuf++) 
        {
                memset(t->vdau[pgbuf].pgbuf, ' ', sizeof(t->vdau[0].pgbuf));
@@ -648,7 +642,6 @@ static int saa5249_open(struct video_device *vd, int nb)
                t->is_searching[pgbuf] = FALSE;
        }
        t->virtual_mode=FALSE;
-       printk("Go\n");
        MOD_INC_USE_COUNT;
        return 0;
 }
index e8b116fbd93c96d622dd3f614e2f32aac7351d35..2a2f2deea1fbf11a6729aa222c966590b0b55315 100644 (file)
@@ -390,7 +390,9 @@ void do_tty_hangup(void *data)
 {
        struct tty_struct *tty = (struct tty_struct *) data;
        struct file * filp;
+       struct file * cons_filp = NULL;
        struct task_struct *p;
+       int    closecount = 0, n;
 
        if (!tty)
                return;
@@ -407,10 +409,13 @@ void do_tty_hangup(void *data)
                if (!filp->f_dentry->d_inode)
                        continue;
                if (filp->f_dentry->d_inode->i_rdev == CONSOLE_DEV ||
-                   filp->f_dentry->d_inode->i_rdev == SYSCONS_DEV)
+                   filp->f_dentry->d_inode->i_rdev == SYSCONS_DEV) {
+                       cons_filp = filp;
                        continue;
+               }
                if (filp->f_op != &tty_fops)
                        continue;
+               closecount++;
                tty_fasync(-1, filp, 0);
                filp->f_op = &hung_up_tty_fops;
        }
@@ -470,7 +475,17 @@ void do_tty_hangup(void *data)
        tty->session = 0;
        tty->pgrp = -1;
        tty->ctrl_status = 0;
-       if (tty->driver.hangup)
+       /*
+        *      If one of the devices matches a console pointer, we
+        *      cannot just call hangup() because that will cause
+        *      tty->count and state->count to go out of sync.
+        *      So we just call close() the right number of times.
+        */
+       if (cons_filp) {
+               if (tty->driver.close)
+                       for (n = 0; n < closecount; n++)
+                               tty->driver.close(tty, cons_filp);
+       } else if (tty->driver.hangup)
                (tty->driver.hangup)(tty);
        unlock_kernel();
 }
@@ -1243,6 +1258,7 @@ retry_open:
                if (!c)
                         return -ENODEV;
                 device = c->device(c);
+               filp->f_flags |= O_NONBLOCK; /* Don't let /dev/console block */
                noctty = 1;
        }
 #ifdef CONFIG_UNIX98_PTYS
index 2ba0bd030ee366f7125caca64250495e36d8f09f..e8ce8ddcaaa6fbcf2c4039622ddc8878d6054c9f 100644 (file)
@@ -333,7 +333,7 @@ int videodev_init(void)
 {
        struct video_init *vfli = video_init_list;
        
-       printk(KERN_INFO "Linux video capture interface: v0.01 ALPHA\n");
+       printk(KERN_INFO "Linux video capture interface: v1.00\n");
        if(register_chrdev(VIDEO_MAJOR,"video_capture", &video_fops))
        {
                printk("video_dev: unable to get major %d\n", VIDEO_MAJOR);
index 8288e5f1912259868e52bb62cb2e53888a1f968c..90bbffa8d0c73a68fc475678093c1b493d7999e1 100644 (file)
@@ -1291,6 +1291,9 @@ ppp_dev_close (struct device *dev)
 
        CHECK_PPP_MAGIC(ppp);
 
+       /* ppp_dev_close may be called with tbusy==1 so we must set it to 0 */
+       dev->tbusy=0;
+
        MOD_DEC_USE_COUNT;
 
        return 0;
index 4f9ac70f6c95d82ae48ae8c88ad83f5be8a9b061..4b92186d15242a81598ed44dc5fd6d936a538887 100644 (file)
@@ -830,7 +830,7 @@ static struct net_device_stats* if_stats (struct device* dev)
 {
        x25_channel_t* chan = dev->priv;
        if(chan==NULL)
-               return chan;
+               return NULL;
        return &chan->ifstats;
 }
 
index 3d434d2f69f50f4de976c6fea33c53d17010205a..6c0b6edd5cbb8a2147796764a576caa385732f55 100644 (file)
@@ -114,6 +114,8 @@ static int partsize(struct buffer_head *bh, unsigned long capacity,
        end_head = largest->end_head;
        end_sector = largest->end_sector & 0x3f;
 
+        if( end_head + 1 == 0 || end_sector == 0 ) return -1;
+
 #ifdef DEBUG
        printk ("scsicam_bios_param : end at h = %d, c = %d, s = %d\n",
            end_head, end_cyl, end_sector);
index cd5cdb3493183fd9e3ebcfed266f1924c75d5e05..5ac782d40d7a4e1c2adf2ab1ad24c73c7337e567 100644 (file)
@@ -36,7 +36,7 @@
 #ifdef __ASSEMBLY__
 
 #define ALIGN __ALIGN
-#define ALIGN_STRING __ALIGN_STRING
+#define ALIGN_STR __ALIGN_STR
 
 #define ENTRY(name) \
   .globl SYMBOL_NAME(name); \
index 0e234075a9e7b270bbbe1a15c4170ec8325f36f6..9ef856fedee59890d97f9ce95739db6180110732 100644 (file)
 #include <linux/dio.h>
 #endif
 
+#ifdef CONFIG_ZORRO
+#include <linux/zorro.h>
+#endif
+
 #ifdef CONFIG_MTRR
 #  include <asm/mtrr.h>
 #endif
@@ -1174,9 +1178,6 @@ static void __init do_basic_setup(void)
 #ifdef CONFIG_SYSCTL
        sysctl_init();
 #endif
-#ifdef CONFIG_DIO
-       dio_init();
-#endif
 
        /*
         * Ok, at this point all CPU's should be initialized, so
@@ -1197,6 +1198,12 @@ static void __init do_basic_setup(void)
 #ifdef CONFIG_ARCH_ACORN
        ecard_init();
 #endif
+#ifdef CONFIG_ZORRO
+       zorro_init();
+#endif
+#ifdef CONFIG_DIO
+       dio_init();
+#endif
 
        /* Networking initialization needs a process context */ 
        sock_init();
index 0ec61b1e3bfac58c9485a4a6b6d4d7da383c557b..48714cd163d9d47f40f018495124bfe0c42e4ebb 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -18,6 +18,7 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/vmalloc.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
@@ -101,7 +102,7 @@ found:
                return -ENOMEM;
        }
 
-       shp->shm_pages = (ulong *) kmalloc (numpages*sizeof(ulong),GFP_KERNEL);
+       shp->shm_pages = (ulong *) vmalloc (numpages*sizeof(ulong));
        if (!shp->shm_pages) {
                shm_segs[id] = (struct shmid_ds *) IPC_UNUSED;
                wake_up (&shm_lock);
@@ -204,7 +205,7 @@ static void killseg (int id)
                        shm_swp--;
                }
        }
-       kfree(shp->shm_pages);
+       vfree(shp->shm_pages);
        shm_tot -= numpages;
        kfree(shp);
        return;
index 884e67150c1565763341085ef93bdb7c75c8a979..f3cdb93107e77c8af10b30ae0fb207450e64d6b7 100644 (file)
@@ -511,9 +511,10 @@ void __init kswapd_setup(void)
 int kswapd(void *unused)
 {
        struct wait_queue wait = { current, NULL };
+
        current->session = 1;
        current->pgrp = 1;
-       sprintf(current->comm, "kswapd");
+       strcpy(current->comm, "kswapd");
        sigfillset(&current->blocked);
        
        /*
index 6c4e8ea8eb6c557167f13f0d50918f9db87d63cd..dc06be6b0ed3987252737f8eb173639b19f1f29c 100644 (file)
@@ -383,7 +383,7 @@ call_reserveresult(struct rpc_task *task)
                xprt_reserve(task);
                goto out;
        } else if (task->tk_status == -ETIMEDOUT) {
-               printk("RPC: task timed out\n");
+               dprintk("RPC: task timed out\n");
                task->tk_action = call_timeout;
                goto out;
        } else {
index 3be5feb21a0256dbe8e646bc71862bb4d719a89e..0e30d00d0b25caffc5118f1f3f3fe370edb297cd 100644 (file)
 
 #include CURSES_LOC
 
+/*
+ * Colors in ncurses 1.9.9e do not work properly since foreground and
+ * background colors are OR'd rather than separately masked.  This version
+ * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
+ * with standard curses.  The simplest fix (to make this work with standard
+ * curses) uses the wbkgdset() function, not used in the original hack.
+ * Turn it off if we're building with 1.9.9e, since it just confuses things.
+ */
+#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
+#define OLD_NCURSES 1
+#undef  wbkgdset
+#define wbkgdset(w,p) /*nothing*/
+#else
+#define OLD_NCURSES 0
+#endif
+
+#define TR(params) _tracef params
+
 #define ESC 27
 #define TAB 9
 #define MAX_LEN 2048
index 33f99fb09565656ebbe1808c0b3f08c53cacc77c..6f4c1fd4eba5f96dfa2519cffec8a00b89932396 100644 (file)
@@ -63,6 +63,9 @@ main (int argc, const char * const * argv)
     (void) setlocale (LC_ALL, "");
 #endif
 
+#ifdef TRACE
+    trace(TRACE_CALLS|TRACE_UPDATE);
+#endif
     if (argc < 2) {
        Usage (argv[0]);
        exit (-1);
index 5d5a6b46fd86095fda993cb8de62b40891782a44..a9762037885e0b908d617f71501ed13d852bd9e7 100644 (file)
@@ -70,8 +70,12 @@ print_item (WINDOW * win, const char *item, int choice, int selected, int hotkey
     /* Clear 'residue' of last item */
     wattrset (win, menubox_attr);
     wmove (win, choice, 0);
+#if OLD_NCURSES
     for (i = 0; i < menu_width; i++)
        waddch (win, ' ');
+#else
+    wclrtoeol(win);
+#endif
     wattrset (win, selected ? item_selected_attr : item_attr);
     mvwaddstr (win, choice, item_x, menu_item);
     if (hotkey) {
@@ -173,6 +177,7 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
     for (i = 0; i < width - 2; i++)
        waddch (dialog, ACS_HLINE);
     wattrset (dialog, dialog_attr);
+    wbkgdset (dialog, dialog_attr & A_COLOR);
     waddch (dialog, ACS_RTEE);
 
     if (title != NULL) {
index df50f2c54da4f002181c6af9a6b8dc79d5f4a66f..5127e5f2c0175dbad9b9faa3b9b5d3d645da6bb8 100644 (file)
@@ -90,6 +90,8 @@ dialog_textbox (const char *title, const char *file, int height, int width)
 
     /* Create window for text region, used for scrolling text */
     text = subwin (dialog, height - 4, width - 2, y + 1, x + 1);
+    wattrset (text, dialog_attr);
+    wbkgdset (text, dialog_attr & A_COLOR);
 
     keypad (text, TRUE);
 
@@ -101,6 +103,7 @@ dialog_textbox (const char *title, const char *file, int height, int width)
     for (i = 0; i < width - 2; i++)
        waddch (dialog, ACS_HLINE);
     wattrset (dialog, dialog_attr);
+    wbkgdset (dialog, dialog_attr & A_COLOR);
     waddch (dialog, ACS_RTEE);
 
     if (title != NULL) {
@@ -459,8 +462,12 @@ print_line (WINDOW * win, int row, int width)
 
     getyx (win, y, x);
     /* Clear 'residue' of previous line */
+#if OLD_NCURSES
     for (i = 0; i < width - x; i++)
        waddch (win, ' ');
+#else
+    wclrtoeol(win);
+#endif
 }
 
 /*
@@ -530,6 +537,7 @@ print_position (WINDOW * win, int height, int width)
        exit (-1);
     }
     wattrset (win, position_indicator_attr);
+    wbkgdset (win, position_indicator_attr & A_COLOR);
     percent = !file_size ?
        100 : ((fpos - bytes_read + page - buf) * 100) / file_size;
     wmove (win, height - 3, width - 9);