Differences From Artifact [47058a7cb6]:
- File
generators/library/LibraryGenerator.m
— part of check-in
[eeba79d088]
at
2020-12-27 18:50:37
on branch trunk
— Add a generator for the linklib
This will eventually also generate the glue code and the function list
and make sfdc & cvinclude.pl entirely obsolete. It will also reduce the
maintenance burden because once everything is generated from
library.xml, there is a single file in which a function needs to be
added / changed instead of 5. (user: js, size: 6188) [annotate] [blame] [check-ins using]
To Artifact [4d246f30a8]:
- File
generators/library/LibraryGenerator.m
— part of check-in
[bb25f8b0fe]
at
2020-12-27 19:13:35
on branch trunk
— Don't use sfdc / cvinclude.pl anymore
The linklib generator already completely obsoletes it. (user: js, size: 6202) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
30 31 32 33 34 35 36 | @interface LibraryGenerator: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(LibraryGenerator) @implementation LibraryGenerator | < < < < < < < | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | @interface LibraryGenerator: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(LibraryGenerator) @implementation LibraryGenerator - (void)generateLinkLibInDirectory: (OFString *)directory { OFXMLElement *library = [OFXMLElement elementWithFile: [directory stringByAppendingPathComponent: @"library.xml"]]; OFString *linklibPath = [[directory stringByAppendingPathComponent: @"linklib"] stringByAppendingPathComponent: @"linklib.m"]; |
︙ | ︙ | |||
173 174 175 176 177 178 179 | @"\n" @"\t", libBase, libBase]; if (![returnType isEqual: @"void"]) [linklib writeString: @"return "]; | | | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | @"\n" @"\t", libBase, libBase]; if (![returnType isEqual: @"void"]) [linklib writeString: @"return "]; [linklib writeString: @"__extension__ (("]; [linklib writeString: returnType]; if (![returnType hasSuffix: @"*"]) [linklib writeString: @" "]; [linklib writeString: @"(*)("]; argumentIndex = 0; for (OFXMLElement *argument in arguments) { |
︙ | ︙ | |||
217 218 219 220 221 222 223 224 | [linklib writeString: @"}\n"]; if (++funcIndex < functions.count) [linklib writeString: @"\n"]; } } @end | > > > > > > > | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | [linklib writeString: @"}\n"]; if (++funcIndex < functions.count) [linklib writeString: @"\n"]; } } - (void)applicationDidFinishLaunching { [self generateLinkLibInDirectory: @"../../src/runtime"]; [OFApplication terminate]; } @end |