The MASM Forum Archive 2004 to 2012

Project Support Forums => MASM32 => WINDOWS.INC Project => Topic started by: Shantanu Gadgil on March 14, 2005, 10:30:40 AM

Title: suggested diet for WINDOWS.INC :)
Post by: Shantanu Gadgil on March 14, 2005, 10:30:40 AM
Hi hutch, I replaced the spaces and replaced them with TABs (for proper alignment/indentation) :)

Surprising results :)
before: 1,138,852
after: 905,997

The indentation could be improved but I am happy for now :)

By the way, I am using version 1.27d
Title: Re: suggested diet for WINDOWS.INC :)
Post by: hutch-- on March 14, 2005, 12:16:25 PM
I used to supply a toy that removed all of the spare spaces which dropped the file size by a couple of hundred K but the readability of the main include file over-rides the size saving.

This current version is built in parts after a reasonable amount of work to get the sequential dependencies correct so its not going to change in a hurry.
Title: Re: suggested diet for WINDOWS.INC :)
Post by: pbrennick on March 14, 2005, 01:42:00 PM
The problem with tabs is that everbody uses a different setting causing a complete loss of formatting unless you just happen to use the exact same setting as the author.  This is caused by the rule used to expand tabs.  As a result, I stopped using tabs a long time ago and use spaces with a fixed pitch font.  This absolutely guarantees that my source will look the same on all editors that also are set to a fixed pitch font.  That is why all code I put on this board looks very professional where as those posts using tabs looks ugly.

Just a note on tabs.
Paul
Title: Re: suggested diet for WINDOWS.INC :)
Post by: MichaelW on March 15, 2005, 03:12:24 AM
I also stopped using tabs in my code long ago. It is actually slightly faster to edit code with the tabs intact, but in my view this tiny advantage does not justify making the code difficult to read for anyone who uses tab settings that differ significantly from my own. BTW, SMF, currently, does not correctly handle tabs in posted code.
Title: Re: suggested diet for WINDOWS.INC :)
Post by: Ghirai on March 15, 2005, 05:59:19 PM
Well, you could also say at the beginning of your source something like "This should be viewed with a tabsize of x" :P
Title: Re: suggested diet for WINDOWS.INC :)
Post by: Mark Jones on March 16, 2005, 05:09:46 AM
I'm working on a little utility to convert between various tab and space formattings just because of this caveat. Assembler is tedious enough without formatting anomalies. :)
Title: Re: suggested diet for WINDOWS.INC :)
Post by: Mark Jones on March 20, 2005, 08:44:43 PM
 Here's what I've came up with so far in regards to the source format Tab/Space converter. Actually I guess this is my first real application. :U

Did I hear that Hutch had made something like this already?

[attachment deleted by admin]
Title: Re: suggested diet for WINDOWS.INC :)
Post by: hutch-- on March 21, 2005, 01:03:00 AM
Utility seems to work OK Mark. I just tested it on the current version and its output is reasonably readable.

The toy I used to provide did something different, it removed any additional spacing so that you would only ever have a single space and it was purely to get the size down while keeping the original as reference. The readability is very poor on the result but it drops the size from 1136852 bytes to 854582 bytes

I just ratted through the archive of 3 dev boxes and found the original called HCOMPACT.EXE.



[attachment deleted by admin]
Title: Re: suggested diet for WINDOWS.INC :)
Post by: Mark Jones on March 21, 2005, 04:17:29 AM
 Oooh neat. Indeed, the tabbed version of windows.inc is about 22kB bigger than the monospaced version, and the readibility is retained. Maybe we can put windows.inc on a diet?
Title: Re: suggested diet for WINDOWS.INC :)
Post by: Shantanu Gadgil on March 21, 2005, 04:01:01 PM
Yes!!! I am totally for the"diet"!

Thank you all for the support :)