Thank you for all clarifications! Now I am attaching the corrected patch and
the most important is that I understood the indentation finally (took a
while through :()!
Hopefully this is the last iteration for the script cases :)

-----Original Message-----
From: Panu Matilainen [mailto:pmati...@laiskiainen.org] 
Sent: Thursday, November 29, 2012 2:38 PM
To: Reshetova, Elena
Cc: rpm-maint@lists.rpm.org
Subject: Re: Plugin ponderings

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++) {
         rc++;
         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 :)

...etc.

        - Panu -

Attachment: 0001-Improving-scriptlet-related-rpm-plugin-hooks.patch
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to