Closed Bug 249330 Opened 20 years ago Closed 20 years ago

signtool sources are a MESS - no single coding style

Categories

(NSS :: Tools, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nelson, Assigned: nelson)

Details

The source files to the signtool command have at least 4 different coding
styles IN EACH SOURCE FILE.  This became very apparent when trying to fix
bug 248751.  It needs to get fixed.  The problems are:

a) indentation:
   some code uses tab stops for indentation (indent = 8)
   some code uses the NSS convention (tabs and spaces, indent = 4)
   some code uses indent = 2.
b) brace matching
   some code uses the K&R style, which is the NSS convention
   some code moves opening braces onto a separate line.
   some code aligns the curly braces with the preceeding if/while/for.
   some code aligns the braces with the indented code
   some code places the braces on their own level of indentation.

Immediately after the final patch for bug 248751 is checked in, 
barring objection,  I propose to run the signtool sources through cb 
(the c beautifier), to convert them to K&R style with indent = 4 
(the NSS convention), and them check them in.  

Any objections?
Priority: -- → P3
Target Milestone: --- → 3.10
No longer depends on: 248751
objections? none from me...
Ran the code through cb (the c beautifier), and then edited the code to 
fix indentation of comments (which cb doesn't change), and re-wrap certain
lines.   Since cb changed nearly ALL lines of code, diffs are pointless.

Checking in certgen.c;    new revision: 1.9;  previous revision: 1.8
Checking in javascript.c; new revision: 1.5;  previous revision: 1.4
Checking in list.c;       new revision: 1.9;  previous revision: 1.8
Checking in sign.c;       new revision: 1.12; previous revision: 1.11
Checking in signtool.c;   new revision: 1.12; previous revision: 1.11
Checking in util.c;       new revision: 1.20; previous revision: 1.19
Checking in verify.c;     new revision: 1.5;  previous revision: 1.4
Checking in zip.c;        new revision: 1.5;  previous revision: 1.4
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.