[webkit-dev] Code clean up and compiling on 10.3.9

David D. Kilzer ddkilzer at kilzer.net
Sat Jun 25 17:43:04 PDT 2005

On Jun 25, 2005, at 5:03 PM, David Storey wrote:

> At one stage JavaScriptCore compiled on Panther (it fails again  
> now), so I decided  to have a go at cleaning up that part of the  
> project.  Unfortunately it took two days to clean up every class,  
> and by that stage when I performed the regression test, there were  
> a number (even though I didn't make any real changes).  It seemed  
> that it actually passed many more than the master copy though.  I  
> thought I would submit the changes anyway, but i followed the steps  
> on the site to produce a patch file, but it only created a blank  
> file.  I'm not sure if that was something to do with the app not  
> compiling, or if I did anything wrong.  Most the changes were just  
> white-space changes.

Try "cvs diff -u" in the JavaScriptCore directory.  However, this  
will NOT include any "new" files, which was the purpose of the script  
(if I remember correctly).  It won't include "new" files because you  
can't run "cvs add" on the files with read-only access.

I know Panther's version of the cvs command-line tool was based on  
version 1.10.x.  This version is now called "ocvs" (for old cvs) in  
Tiger, and the cvs command is now version 1.11.x.  This may explain  
why the script didn't work for you.

You might try compiling a newer version of cvs for Panther (or look  
at installing Fink or Darwin Ports).  If you make sure it appears  
"first" in your $PATH environment variable, then the script make  
start working.

> While working on the code cleanup there were a number of areas that  
> different programmers implemted differently which were not covered  
> by the style guidelines.  Maybe there should be some guidelines to  
> cover these:

If you look at the webkit.opendarwin.org web site, there is a page  
for coding style guidelines:


> 6.  Not really knowing C, i wasn't sure what the '#if apple  
> changes' -- and other such  if constructs that xCode highlights in  
> red -- are for?  I wasn't sure if these should be indented like a  
> normal if statement?

The #if and #endif stuff are "pre-processor" directives.  Unlike  
Java, compiling C, C++, Obj-C, and Obj-C++ involves a "pre-processor"  
stage that processes the source code before the compiler parses it.   
The #include statements are processed during this stage as well (even  
though they're roughly equivalent to import statements in Java).


More information about the webkit-dev mailing list