From owner-freebsd-current Fri Dec 26 20:32:56 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA01648 for current-outgoing; Fri, 26 Dec 1997 20:32:56 -0800 (PST) (envelope-from owner-freebsd-current) Received: from hwcn.org (main.hwcn.org [199.212.94.65]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA01621 for ; Fri, 26 Dec 1997 20:32:46 -0800 (PST) (envelope-from hoek@hwcn.org) Received: from james.freenet.hamilton.on.ca (ac199@james.hwcn.org [199.212.94.66]) by hwcn.org (8.8.7/8.8.7) with ESMTP id XAA23067; Fri, 26 Dec 1997 23:33:23 -0500 (EST) Received: from localhost (ac199@localhost) by james.freenet.hamilton.on.ca (8.8.7/8.8.7) with SMTP id XAA25510; Fri, 26 Dec 1997 23:34:06 -0500 (EST) X-Authentication-Warning: james.freenet.hamilton.on.ca: ac199 owned process doing -bs Date: Fri, 26 Dec 1997 23:34:06 -0500 (EST) From: Tim Vanderhoek X-Sender: ac199@james.freenet.hamilton.on.ca To: Mikael Karpberg cc: Bruce Evans , current@freebsd.org Subject: Re: Bruce vandalism again In-Reply-To: <199712270242.DAA13721@ocean.campus.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sat, 27 Dec 1997, Mikael Karpberg wrote: > Really, that's so much hard work anyway. Ok, I'm not for making it harder, > doesn't a cdiff program (or option to diff) seem more sane? One that parses > the c code, and ignores inserted/removed empty lines, tabs, spaces, and > comments (possibly changeable with an option so you could get the comment Well, diff --ignore-space-change would be a pretty good start (tabs, spaces, and empty lines :). Removing comments would be a pretty trivial lex program, or there are also a couple of infamous perl regexps which match C comments. To further reduce noise, both bits of code to be diffed could be run through indent first, converting them to a mutually unacceptable but consistent style. This then could all be bundled up into one program `cdiff'. :) > time in c files, as you accidently delete a tab, and replace it with spaces, Well, if you used tabs and spaces in the right places, then this wouldn't be a problem. My rules, #1: never mix tabs and spaces to achieve the desired spacing, #2: never use tabs to align with text that wasn't aligned with the exact same number of tabs. These rules really reduce to: Make no stupid assumptions about the number of spaces in tabs. I edit with 3, 4, and 8 space tabs variously to ensure these rules are met. Needless to say, reading code not my own is always so depressing. -- Outnumbered? Maybe. Outspoken? Never! tIM...HOEk