Re: [openssl-dev] OpenSSL source reformat

2015-01-07 Thread Matt Caswell
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On 07/01/15 07:58, Frey (Wei) Fu wrote:
 Hi Matt,
 
 I've checked the util dir in your branch and official branch, but
 the openssl-format-source script file seems unavailable. Would you
 please point out the exact location?

Did you look in the sample-1.0.2-reformat/sample-master-reformat
branches in my repo?

The script is here:
https://github.com/mattcaswell/openssl/blob/sample-1.0.2-reformat/util/openssl-format-source


Matt
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUrP9+AAoJENnE0m0OYESRs+wH/0G1B2qy7wAQmZjSS409BOOU
5hV8tgQbc+TNuvsrG59VwY3YhJQiEA4WoAimXVeX1iA3lIj9TNniJAqBz4AnTN2d
wPKoyjPTOan0gVxu4+YG1+cYwuurNRWxVfIaNvSORmlSNRiCJhw2yqj0fleai/nQ
ruCSMKnIbZI5uAmpE9IRuZUWPoJ8L1ah7qA2aTcjYyB1XB1/+SG3tbsgEQv8hZ1e
1InQKwbpvdmeaFjQE6pjfSeARxT/IuQ5snGbl48HuTTj3Bu/uPvXl+AQLZeXu0S/
9h3AuoFHvq2G4qLes0nOy4dRQFiQ9i6ZPqRi+JE7Z2Gq0hW6wDbYEGl6XypupNw=
=tsMt
-END PGP SIGNATURE-
___
openssl-dev mailing list
openssl-dev@openssl.org
https://mta.opensslfoundation.net/mailman/listinfo/openssl-dev


Re: [openssl-dev] OpenSSL source reformat

2015-01-07 Thread Frey (Wei) Fu
Hi Matt,

I've checked the util dir in your branch and official branch, but the 
openssl-format-source script file seems unavailable. Would you please point out 
the exact location?

Thanks,
Frey

-Original Message-
From: openssl-dev [mailto:openssl-dev-boun...@openssl.org] On Behalf Of Matt 
Caswell
Sent: 2015年1月5日 20:10
To: openssl-dev@openssl.org
Subject: [openssl-dev] OpenSSL source reformat

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

We have previously announced our intention to reformat the entire codebase into 
a more consistent style (see our roadmap document here:
https://www.openssl.org/about/roadmap.html)

Since then we have been busy working towards doing that. I'd like to make 
available for comment a sample reformat. So far I've run it for master and 
1.0.2, but the current thinking is that this will also be applied to 1.0.1, 
1.0.0 and 0.9.8 (this is necessary to significantly ease the maintenance 
overhead)

I've put the results of the reformat up on my github account here:
https://github.com/mattcaswell/openssl

The reformat of master is on the sample-master-reformat branch, and the 1.0.2 
reformat is on sample-1.0.2-reformat.

The style itself is heavily influenced by the Linux Kernel Coding style:
https://www.kernel.org/doc/Documentation/CodingStyle

Although there are some significant differences - most notably that we are 
using spaces not tabs for indents, and the indent depth is 4 characters not 8. 
We will be publishing our own style guide in due course.

I'm not looking to open any religious wars here - so I'm not looking for 
comments on the style itself (e.g. debates about whether 2, 4 or 8 character 
indents are better (we've already had those!)) - but I'm mainly seeking 
feedback on anywhere where the reformatting has failed.
We've already looked of course...but sometimes many sets of eyes are better!

I've also made available the script that was used to do the reformatting. The 
script is called openssl-format-source and is in the util directory of the 
branches mentioned above. This script depends on GNU indent being available. It 
should be executed from the root of the source tree as follows:

util/openssl-format-source -v -c .

There are also some one-off manual tweaks (both before and after running the 
script) that need to be done which are present in the sample reformat branches. 
These are related to multi-line comments which have their own internal 
formatting - these aren't handled too well. The manual steps should be a 
one-off exercise though. The hope is that we will be able to re-run the script 
at regular intervals.

Thanks

Matt

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJUqn77AAoJENnE0m0OYESRlD8H/j8U2mxUhe7yPoJ8gwUZzy3k
4RMelsCzjBMPfiA8VgL8IvtYl7GpBZaG938RXPS9uHLSaUhGJt7vCghKEEO+OQqM
qYlNm3BNutRWAJ8S63qHqL6sgN+tUCktnwN9MJUIHLDE9Eh9natRf8sJjanBdmg+
F46RXzaQJSe2BuSvSdzaD0aamjAM3qbhESbz6Que5IlP+gkMyCCf2Ug5wB9XPQF8
VGLE2umGxaGB/qzGim/jwSIJ4q56+f+MWqdh64Sz8IxYNGeYtQ5dIgWyZ7rzb8G4
+jJkRL3WTEsBQYRHTjM4R+OM4ZreMaWqgWkdOIr4AikUgSujFOpeaNQQnOfQfVo=
=17Ml
-END PGP SIGNATURE-
___
openssl-dev mailing list
openssl-dev@openssl.org
https://mta.opensslfoundation.net/mailman/listinfo/openssl-dev
___
openssl-dev mailing list
openssl-dev@openssl.org
https://mta.opensslfoundation.net/mailman/listinfo/openssl-dev


Re: [openssl-dev] OpenSSL source reformat

2015-01-06 Thread Benny Baumann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi Matt,

first of all:
THANK YOU!

This has been overdue for ages!

Just a small tweak that would be nice I'd like to see would be to
always have block markers for loops and conditions. The lack of those
was one of the many pitfalls with the old source especially as the
indentation had been off by one level in contrast to common rules.

Including the the block markers (AKA curly brackets) at all times even
for single statements has two advantages:
- - You always have a block grouping statements to the proper statement
- - You won't create a Apple-Style Goto Fail that easily

AFAIK indent should support adding all of them automagically;
otherwise astyle is another powerful solution.

Anyway:
BIG THANKS for finally making the code readable*.

Kind regards,
BenBE.

*Comprehensible is a different kettle of fish ;-)

Am 05.01.2015 um 13:09 schrieb Matt Caswell:
 We have previously announced our intention to reformat the entire 
 codebase into a more consistent style (see our roadmap document
 here: https://www.openssl.org/about/roadmap.html)
 
 Since then we have been busy working towards doing that. I'd like
 to make available for comment a sample reformat. So far I've run it
 for master and 1.0.2, but the current thinking is that this will
 also be applied to 1.0.1, 1.0.0 and 0.9.8 (this is necessary to
 significantly ease the maintenance overhead)
 
 I've put the results of the reformat up on my github account here: 
 https://github.com/mattcaswell/openssl
 
 The reformat of master is on the sample-master-reformat branch,
 and the 1.0.2 reformat is on sample-1.0.2-reformat.
 
 The style itself is heavily influenced by the Linux Kernel Coding
 style: https://www.kernel.org/doc/Documentation/CodingStyle
 
 Although there are some significant differences - most notably that
 we are using spaces not tabs for indents, and the indent depth is
 4 characters not 8. We will be publishing our own style guide in
 due course.
 
 I'm not looking to open any religious wars here - so I'm not
 looking for comments on the style itself (e.g. debates about
 whether 2, 4 or 8 character indents are better (we've already had
 those!)) - but I'm mainly seeking feedback on anywhere where the
 reformatting has failed. We've already looked of course...but
 sometimes many sets of eyes are better!
 
 I've also made available the script that was used to do the 
 reformatting. The script is called openssl-format-source and is in
 the util directory of the branches mentioned above. This script
 depends on GNU indent being available. It should be executed from
 the root of the source tree as follows:
 
 util/openssl-format-source -v -c .
 
 There are also some one-off manual tweaks (both before and after 
 running the script) that need to be done which are present in the 
 sample reformat branches. These are related to multi-line comments 
 which have their own internal formatting - these aren't handled
 too well. The manual steps should be a one-off exercise though. The
 hope is that we will be able to re-run the script at regular
 intervals.
 
 Thanks
 
 Matt
 
 ___ openssl-dev mailing
 list openssl-dev@openssl.org 
 https://mta.opensslfoundation.net/mailman/listinfo/openssl-dev
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCgAGBQJUrB67AAoJEPHTXLno4S6tdR0P/R7MQGYZ5cRErk/55luMZLgi
Om9JmXBa4NCKedVVUXLQOlkiWu4Oa3s/J0xezTwzCR5P+B9x0miDUMjm9yKy6g4q
t3mhAAiGOKfofLVq7M6iOE72SO2Pd4FTCywVMPuE6p9vAK7o/Gufn/8W52ud8oBb
l7O5l2o6B0191q+6v3oLb8zY028FESrJgTDfq4htzvVlOkl3mnzvXP87juyrEzIb
Y4FY7DzGi146mkRro3Q3Yb0fQcNTvVajQyAMLsLTRWDSXFs998BFxMih3hlJa+gc
SvPi/rjE/gNaRxB3obc0o48hdy3Q7Q6DvpxVqwxb7Y2i3kWwJaCRCcOsEvYhfqkt
5kevKe/exKEyDWtjokWat9alB/Qla6Yb725OjOo4UQvmjT2OwULB9uFoXxig3/H/
oBES33FAAU0Kul4YwmfWb17m2QWeXHcqTITXUuS2zasMxF+2wbgb5o3bcQx7QUnd
Fxf4emHb9OVqLdiN7WyNkUBceot2IBB73hud2myfKZS9g71F5hhsdsXvoWp5e3/I
Cp1hnD2ViE5hWF4bGbKM7Eom9IeEho1idKCGGhfgRJ2tjweP66ORZnUK+Dz84N7a
Je1peZ95uAUCy2F/PI2QFpxgvSU9lHiHGpRoEQRGbCn0N24La6mi0B7APjhWgHXk
tiPO8GEKG7W5TGq0thzL
=iwE9
-END PGP SIGNATURE-
___
openssl-dev mailing list
openssl-dev@openssl.org
https://mta.opensslfoundation.net/mailman/listinfo/openssl-dev