Re: On Tabs and Spaces
- From
Andreas Ericsson <ae@op5.se>
- Date
- Oct 16, 2007, 17:20 UTC
- Message-ID
- <4714F2CA.5000509@op5.se>
- In-Reply-To
- <11F85069-1013-4685-9D56-C53F0F8231BF@MIT.EDU>
Michael Witten wrote:
Show 20 quoted lines
> On 16 Oct 2007, at 3:04:21 AM, Shawn O. Pearce wrote:
>
>> The C code is all tabs, with the tabs set at 8 spaces, but the
>> actual tab width isn't too important here as we never use the tab
>> for alignment beyond the left indent.
>
> Consider this from diff-lib.c:
>
>> /* A file entry went away or appeared */
>> static void diff_index_show_file(struct rev_info *revs,
>> const char *prefix,
>> struct cache_entry *ce,
>> unsigned char *sha1, unsigned int mode)
>> {
>> diff_addremove(&revs->diffopt, prefix[0], ntohl(mode),
>> sha1, ce->name, NULL);
>> }
>
> There are mixed tabs and spaces for alignment.
> Function declarations don't count ;-)
Show 5 quoted lines
> I suppose I'll be fine if I just set tab widths to 8. > But 8 spaces! Good Lord. ;-) > > I really hate tabs. >
Well, using hard tabs is the only way we can let everyone have different levels of indentation while still having things look sort of sane.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231