Changeset 326 for trunk/idl-compiler/h-emitter_c
- Timestamp:
- Apr 9, 2008, 10:22:08 PM (17 years ago)
- Location:
- trunk/idl-compiler/h-emitter_c
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/h-emitter_c/h_file_emitter.c
r292 r326 32 32 * 33 33 * ***** END LICENSE BLOCK ***** */ 34 #include <os2.h> 34 #ifdef __OS2__ 35 # include <os2.h> 36 #endif /* __OS2__ */ 37 35 38 #include <stdlib.h> 36 39 #include <string.h> … … 107 110 108 111 fprintf(fh, "/* Class data structure */\n"); 112 fprintf(fh, "#ifdef NOM_%s_IMPLEMENTATION_FILE\n", pif->chrName); 113 fprintf(fh, "NOMDLLEXPORT\n"); 114 fprintf(fh, "#else\n"); 115 fprintf(fh, "NOMDLLIMPORT\n"); 116 fprintf(fh, "#endif\n"); 109 117 fprintf(fh, "NOMEXTERN struct %sClassDataStructure {\n", pif->chrName); 110 118 … … 116 124 fprintf(fh, " nomMToken %s;\n", pm->chrName); 117 125 } 118 fprintf(fh, "}%sClassData;\n\n", pif->chrName); 119 126 fprintf(fh, "} NOMDLINK %sClassData;\n\n", pif->chrName); 127 128 fprintf(fh, "#ifdef NOM_%s_IMPLEMENTATION_FILE\n", pif->chrName); 129 fprintf(fh, "NOMDLLEXPORT\n"); 130 fprintf(fh, "#else\n"); 131 fprintf(fh, "NOMDLLIMPORT\n"); 132 fprintf(fh, "#endif\n"); 120 133 fprintf(fh, "NOMEXTERN struct %sCClassDataStructure {\n", pif->chrName); 121 134 fprintf(fh, " nomMethodTabs parentMtab;\n"); … … 132 145 if(strcmp(pif->chrName , "NOMObject")) 133 146 { 147 /* FIXME: why is this here too? it's already in nomtk.h... */ 134 148 fprintf(fh, "/* This function is used to check if a given object is valid and the\n"); 135 149 fprintf(fh, " object supports the method */\n"); … … 181 195 pif->chrName, pm->chrName); 182 196 /* Forward declaration of parameter test function */ 197 fprintf(fh, "#ifdef NOM_%s_IMPLEMENTATION_FILE\n", pif->chrName); 198 fprintf(fh, "NOMDLLEXPORT\n"); 199 fprintf(fh, "#else\n"); 200 fprintf(fh, "NOMDLLIMPORT\n"); 201 fprintf(fh, "#endif\n"); 183 202 fprintf(fh, "NOMEXTERN gboolean NOMLINK parmCheckFunc_%s_%s(%s *nomSelf,\n", 184 203 pif->chrName, pm->chrName, pif->chrName); … … 266 285 267 286 fprintf(fh, "/*\n * Class creation function\n */\n"); 287 fprintf(fh, "#ifdef NOM_%s_IMPLEMENTATION_FILE\n", pif->chrName); 288 fprintf(fh, "NOMDLLEXPORT\n"); 289 fprintf(fh, "#else\n"); 290 fprintf(fh, "NOMDLLIMPORT\n"); 291 fprintf(fh, "#endif\n"); 268 292 fprintf(fh, "NOMEXTERN NOMClass * NOMLINK %sNewClass(gulong clsMajorVersion, gulong clsMinorVersion);\n\n", 269 293 pif->chrName); … … 291 315 PINTERFACE pifParent=pif; 292 316 293 while((pifParent=getParentInterface(pifParent))!=NULL HANDLE)317 while((pifParent=getParentInterface(pifParent))!=NULL) 294 318 { 295 319 GPtrArray *pArray; … … 345 369 346 370 //printInterface(pif); 347 if((pLocalPI->outFile=openOutfile(gScanner, chrTemp))!=NULL HANDLE)371 if((pLocalPI->outFile=openOutfile(gScanner, chrTemp))!=NULL) 348 372 { 349 373 emitHFileHeader(pLocalPI, pif); … … 357 381 emitHFileFooter(pLocalPI, pif); 358 382 closeOutfile(pLocalPI->outFile); 383 pLocalPI->outFile = NULL; 359 384 } 360 385 g_free(chrTemp);
Note:
See TracChangeset
for help on using the changeset viewer.