severity 201816 important
clone 201816 -1
reassign -1 xemacs21
thanks

>       Touch any line in the top hunk in diff mode, and it changes
> the @@ line (incorrectly).  It seems the --- and +++ of the next file
> confuses diff mode 8(

I also confirmed this problem on both emacs21 (21.4a-1) and xemacs21
(21.4.17-1).  When I opened his diff file in diff-mode, and switched
to diff-mode, and did "toggle-read-only" on emacs21.

Then I cut "./include/asm-generic/sections.h" part and paste on top of
the file.  Then the @@ line is suddenly corrupted.  Awful!  The
original file:

        --- ./arch/sparc64/mm/init.c.~1~        Mon Jul 14 21:47:48 2003
        +++ ./arch/sparc64/mm/init.c    Mon Jul 14 23:34:34 2003
        @@ -1812,8 +1813,8 @@ void free_initmem(void)
                /*
                 * The init section is aligned to 8k in vmlinux.lds. Page align 
for >8k pagesizes.
                 */
        -       addr = PAGE_ALIGN((unsigned long)(&__init_begin));
        -       initend = (unsigned long)(&__init_end) & PAGE_MASK;
        +       addr = PAGE_ALIGN((unsigned long)(__init_begin));
        +       initend = (unsigned long)(__init_end) & PAGE_MASK;
                for (; addr < initend; addr += PAGE_SIZE) {
                        unsigned long page;
                        struct page *p;
        --- ./include/asm-generic/sections.h.~1~        Mon Jul 14 21:24:32 2003
        +++ ./include/asm-generic/sections.h    Mon Jul 14 21:56:10 2003
        @@ -3,7 +3,7 @@
        
         /* References to section boundaries */
        
        -extern char _text[], _etext[];
        +extern char _text[], _stext[], _etext[];
         extern char _data[], _edata[];
         extern char __bss_start[];
         extern char __init_begin[], __init_end[];

After my cut & paste:

        --- ./include/asm-generic/sections.h.~1~        Mon Jul 14 21:24:32 2003
        +++ ./include/asm-generic/sections.h    Mon Jul 14 21:56:10 2003
=>      @@ -3,0 +3,0 @@
        
         /* References to section boundaries */
        
        -extern char _text[], _etext[];
        +extern char _text[], _stext[], _etext[];
         extern char _data[], _edata[];
         extern char __bss_start[];
         extern char __init_begin[], __init_end[];
        --- ./arch/sparc64/mm/init.c.~1~        Mon Jul 14 21:47:48 2003
        +++ ./arch/sparc64/mm/init.c    Mon Jul 14 23:34:34 2003
        @@ -1812,8 +1813,8 @@ void free_initmem(void)
                /*
                 * The init section is aligned to 8k in vmlinux.lds. Page align 
for >8k pagesizes.
                 */
        -       addr = PAGE_ALIGN((unsigned long)(&__init_begin));
        -       initend = (unsigned long)(&__init_end) & PAGE_MASK;
        +       addr = PAGE_ALIGN((unsigned long)(__init_begin));
        +       initend = (unsigned long)(__init_end) & PAGE_MASK;
                for (; addr < initend; addr += PAGE_SIZE) {
                        unsigned long page;
                        struct page *p;


Apparently this diff does not make sense now.  My point is: diff-mode
should not change any @@ lines when I exchanged the order of each
files.  I didn't edit any lines.

I also encountered the following file (which is used in
linux-kernel-headers package, filename: 
debian/patches/linux-types-and-time.patch)
Original:

        --- include.orig/linux/time.h   2005-04-21 09:03:16.000000000 +0900
        +++ include/linux/time.h        2005-05-04 15:29:52.266871616 +0900
        @@ -1,6 +1,10 @@
         #ifndef _LINUX_TIME_H
         #define _LINUX_TIME_H
         
        +#ifndef __KERNEL__
        +#include <time.h>
        +#else
        +
         #include <linux/types.h>
         
         #ifdef __KERNEL__
        @@ -177,5 +181,6 @@ struct      itimerval {
         
         #define TIMER_ABSTIME 0x01
         
        +#endif /* __KERNEL__ DEBIAN */
         
         #endif
        --- include.orig/linux/types.h  2005-04-21 09:03:16.000000000 +0900
        +++ include/linux/types.h       2005-05-04 15:30:14.515900970 +0900
        @@ -1,6 +1,16 @@
         #ifndef _LINUX_TYPES_H
         #define _LINUX_TYPES_H
         
        +/* Debian: Use userland types instead.  */
        +#ifndef __KERNEL__
        +# include <sys/types.h>
        +/* For other kernel headers.  */
        +# include <linux/posix_types.h>
        +# include <asm/types.h>
        +/* For util-linux / cryptoloop.  How lame.  */
        +typedef __u32 __kernel_dev_t;
        +#else
        +
         #ifdef __KERNEL__
         #include <linux/config.h>
         
        @@ -169,4 +179,6 @@
                char                    f_fpack[6];
         };
         
        +#endif /* __KERNEL__ DEBIAN */
        +
         #endif /* _LINUX_TYPES_H */

After edit:

        --- include.orig/linux/types.h  2005-04-21 09:03:16.000000000 +0900
        +++ include/linux/types.h       2005-05-04 15:30:14.515900970 +0900
        @@ -1,6 +1,16 @@
         #ifndef _LINUX_TYPES_H
         #define _LINUX_TYPES_H
         
        +/* Debian: Use userland types instead.  */
        +#ifndef __KERNEL__
        +# include <sys/types.h>
        +/* For other kernel headers.  */
        +# include <linux/posix_types.h>
        +# include <asm/types.h>
        +/* For util-linux / cryptoloop.  How lame.  */
        +typedef __u32 __kernel_dev_t;
        +#else
        +
         #ifdef __KERNEL__
         #include <linux/config.h>
         
=>      @@ -169,5 +179,7 @@
                char                    f_fpack[6];
         };
         
        +#endif /* __KERNEL__ DEBIAN */
        +
         #endif /* _LINUX_TYPES_H */
        --- include.orig/linux/time.h   2005-04-21 09:03:16.000000000 +0900
        +++ include/linux/time.h        2005-05-04 15:29:52.266871616 +0900
        @@ -1,6 +1,10 @@
         #ifndef _LINUX_TIME_H
         #define _LINUX_TIME_H
         
        +#ifndef __KERNEL__
        +#include <time.h>
        +#else
        +
         #include <linux/types.h>
         
         #ifdef __KERNEL__
=>      @@ -177,6 +181,7 @@ struct      itimerval {
         
         #define TIMER_ABSTIME 0x01
         
        +#endif /* __KERNEL__ DEBIAN */
         
         #endif

This should not be corrupted.

Regards,
-- gotom


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to