Ignore:
Timestamp:
Mar 25, 2007, 8:49:46 PM (18 years ago)
Author:
cinc
Message:

Code cleanups. Started H file emitter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/idl-compiler/c/nom-idl-compiler.c

    r271 r272  
    7373
    7474/* The pointer array holding the interfaces we found */
    75 GPtrArray* pInterfaceArray;
     75//GPtrArray* pInterfaceArray;
    7676
    7777/* Symbols defined for our IDL language.
     
    110110GScanner *gScanner;
    111111
    112 /* Holding info about current token. Referenced by gScanner. */
    113 //SYMBOLINFO curSymbol;
    114 
    115 /* Holding the current state of parsing and pointers to necessary lists. */
     112/* Holding the current state of parsing and pointers to necessary lists.
     113   Referenced by gScanner-user_data. */
    116114PARSEINFO parseInfo={0};
    117 PPARSEINFO pParseInfo=&parseInfo;
     115PPARSEINFO pParseInfo=&parseInfo; /* This pointer will go away, don't use */
    118116
    119117/**
     
    129127  int a;
    130128
    131   for(a=0;a<pInterfaceArray->len;a++)
    132     {
    133       PINTERFACE pif=g_ptr_array_index(pInterfaceArray, a);
     129  for(a=0;a<parseInfo.pInterfaceArray->len;a++)
     130    {
     131      PINTERFACE pif=g_ptr_array_index(parseInfo.pInterfaceArray, a);
    134132      if(!strcmp(chrName, pif->chrName))
    135133        return pif;
     
    630628
    631629  gScanner=g_scanner_new(NULL);
    632   //gScanner->user_data=(gpointer)&curSymbol;
     630  gScanner->user_data=(gpointer)&parseInfo;
    633631
    634632  gScanner->msg_handler=funcMsgHandler;
    635   pInterfaceArray=g_ptr_array_new();
     633  parseInfo.pInterfaceArray=g_ptr_array_new();
    636634
    637635  g_scanner_input_file(gScanner, fd);
     
    659657  /* Write the output file */
    660658  if(fOptionEmitH)
    661     emitHFile(pInterfaceArray);
     659    emitHFile(parseInfo.pInterfaceArray);
    662660
    663661#if 0
Note: See TracChangeset for help on using the changeset viewer.