CodeWarrior 6 needs Carbonized RunTSScript Compiler for Mac OS X

VERIFIED DUPLICATE of bug 40013

Status

SeaMonkey
Build Config
--
blocker
VERIFIED DUPLICATE of bug 40013
17 years ago
13 years ago

People

(Reporter: Andrew Thompson, Assigned: J.J. Enser)

Tracking

Trunk
PowerPC
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
We need a Carbon version of the RunTSScript CodeWarrior compiler, as its required 
by NSStdLib to make the 'Stubs' target. Currently this compiler is in CVS at 
mozilla/build/mac/RunTSScript.

Did Netscape develop this? Where does it come from, how do I get the source to be 
able to carbonise it?
(Reporter)

Updated

17 years ago
Blocks: 53682

Comment 1

17 years ago
Mac.
Assignee: cls → jj
(Reporter)

Comment 2

17 years ago
Was talking to Patrick Beard about this. Since all we do with RunTS (and indeed
with ToolServer) is run the MakeStub tool in MPW to make the Stub library
required to compile everything else, it might be easier to replace MakeStub and
thus eliminate ToolServer altogether!

As Patrick explained to me what MakeStub does isn't complex. It takes a list of
SYMBOLS in a .exp file, and converts it to a .c file, with lines of the form
exten void $SYMBOL() =0;

Compile this .c and you have your stubs library.

There are 2 possible ways to replace this - either do it in Perl (and run it in
MacPerl on MacOS9 and X or using OS X's command line perl), or do it in C and
make a plugin CodeWarrior compiler 'MozMakeStub'.

Digging around on the net I came accross this on a BeOS mailing list. The author
said he just typed it into the email so it probably doesn't compile, but it
shows how simple the code is... there's a sample plugins folder in the
CodeWarrior SDK which for 6 allows you to build Classic and Carbon CodeWarrior
plugins. Should be a snap to adapt this code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int nfuncs;
char * funcs[4096];

int
main(
int argc,
char * argv[])
{
int ix;
for (ix=1; ix<argc; ix++) {
FILE * f = fopen(argv[ix], "r");
if (!f) {
perror(argv[ix]);
}
else {
char * ptr;
char line[1024];
while (1) {
line[0] = 0;
fgets(line, 1024, f);
if (!line[0]) {
break;
}
if (line[0] == '#') {
continue;
}
ptr = &line[strlen(line)-1];
*ptr = 0; /* nuke NL */
funcs[nfuncs] = strdup(line);
nfuncs++;
}
}
}
printf("#pragma export on\n");
for (ix=0; ix<nfuncs; ix++) {
printf("extern \"C\" void %s(void);\n", funcs[ix]);
}
printf("#pragma export reset\n");
for (ix=0; ix<nfuncs; ix++) {
printf("void %s(void) {}\n", funcs[ix]);
}
return 0;
}

Comment 3

17 years ago
scc wrote RunTSScript. But I think we should eliminate the ToolServer dependency 
altogether; see bug 40013
(Reporter)

Comment 4

17 years ago
Ok, let's dupe this onto that, since that's a better solution than fixing this
and it'll remove the need to fix this.

*** This bug has been marked as a duplicate of 40013 ***
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE

Comment 5

17 years ago
verified.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.