[Rpm-maint] Plugin ponderings

Panu Matilainen pmatilai at laiskiainen.org
Thu Nov 29 12:37:53 UTC 2012

On 11/29/2012 01:52 PM, Reshetova, Elena wrote:
> Yes, I am sorry: I have made two mistakes now:
> 1) patch is wrong (sent the intermediate version before the compilation and
> plenty of other changes)

Ok, thought that might be the case.

> 2) and yes, I had default indentation of 4, which was confusing me for a
> long long while :( I was just using simple Ubuntu file editing, I changed it
> now and it looks much better.

Heh. That certainly explains a lot, you must've been thinking I'm crazy 
complaining about indentation on what looks like the most horrid 
misindentation-mess you've ever seen :D

The rpm codebase does look like the indentation level is 4, because it 
actually is. It's just that its not 4 spaces or tabs of 4, but a 
combination of zero or more hardtabs of width 8, plus one softtab (4 
spaces) where needed to place things between the hard tabs.

Just in case, here's a practical (if extremely stupid :) example with 
the indentation levels spelled out below:

int foo(int x)
     int rc = 0;

     for (int i = 0; i < x; i++) {
         if (rc > 255) {
             if (rc > 65535) {
                  printf("WAY too big!");
             } else {
                  printf("too big!");
     return rc;

^^^^ 0 hardtabs, 1 softtab
^^^^^^^^ 1 hardtab, 0 softtabs
^^^^^^^^^^^^ 1 hardtab, 1 softtab
^^^^^^^^^^^^^^^^^ 2 hardtabs, 0 softtabs

> I will send a new version in a sec with things corrected.
> Sorry again for all of this!

Mistakes happen, no worries. I'm just glad we identified the source of 
indentation issues - the possibility (and consequences!) of hardtab set 
to width of four only occurred to me after seeing these last two patches.
For the future, if it seems like I'm talking complete nonsense, please 
just say so. It's entirely possible that

a) I actually am talking complete nonsense (like with the fsm commit 
stuff, still puzzling how I could remember it *that* wrong)

b) There's some local difference causing you to see something entirely 
different than I do. Be it actual functionality or editor settings :)


	- Panu -

More information about the Rpm-maint mailing list