Ignore:
Timestamp:
Apr 7, 2007, 4:28:11 AM (18 years ago)
Author:
bird
Message:

Fixed watcom .def file parsing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/src/emxomf/emxomfld.c

    r2996 r3005  
    20702070            }
    20712071          token = _md_next_token (pMd);
    2072           if (token == _MD_LIBRARY || token == _MD_PHYSICAL || token == _MD_VIRTUAL)
    2073             dll_flag = TRUE;
    2074           if (dll_flag)
     2072          if (token == _MD_PHYSICAL)
     2073            {
     2074              dll_flag = TRUE;
     2075              fprintf (response_file, "FORMAT OS2 LX PHYSdevice\n");
     2076            }
     2077          else if (token == _MD_VIRTUAL)
     2078            {
     2079              dll_flag = TRUE;
     2080              fprintf (response_file, "FORMAT OS2 LX VIRTdevice\n");
     2081            }
     2082          else if (token == _MD_LIBRARY || dll_flag)
    20752083            {
    20762084              int fInitInstance = 1;
     
    20802088                  switch (_md_next_token (pMd))
    20812089                    {
    2082                       case _MD_INITINSTANCE:  fInitInstance = 1; continue;
    2083                       case _MD_INITGLOBAL:    fInitInstance = 0; continue;
    2084                       case _MD_TERMINSTANCE:  fTermInstance = 1; continue;
    2085                       case _MD_TERMGLOBAL:    fTermInstance = 0; continue;
    2086                       default: break;
     2090                      case _MD_INITINSTANCE:    fInitInstance = 1; continue;
     2091                      case _MD_INITGLOBAL:      fInitInstance = 0; continue;
     2092                      case _MD_TERMINSTANCE:    fTermInstance = 1; continue;
     2093                      case _MD_TERMGLOBAL:      fTermInstance = 0; continue;
     2094                      case _MD_quote:           continue;
     2095                      case _MD_word:            continue;
     2096                      default:                  break;
    20872097                    }
    20882098                  break;
    20892099                }
     2100              dll_flag = TRUE;
    20902101              fprintf (response_file, "FORMAT OS2 LX DLL %s %s\n",
    20912102                       fInitInstance ? "INITINSTANCE" : "INITGLOBAL",
     
    20932104            }
    20942105          else
    2095             switch (_md_next_token (pMd))
    2096               {
    2097                 case _MD_WINDOWAPI:
    2098                   fprintf (response_file, "FORMAT OS2 LX PM\n");
    2099                   break;
    2100                 default:
    2101                 case _MD_WINDOWCOMPAT:
    2102                   fprintf (response_file, "FORMAT OS2 LX PMCompatible\n");
    2103                   break;
    2104                 case _MD_NOTWINDOWCOMPAT:
    2105                   fprintf (response_file, "FORMAT OS2 LX FullScreen\n");
    2106                   break;
    2107               }
     2106            {
     2107              if (token == _MD_NAME)
     2108                  token = _md_next_token (pMd);
     2109              if (token == _MD_quote || token == _MD_word)
     2110                  token = _md_next_token (pMd);
     2111              switch (token)
     2112                {
     2113                  case _MD_WINDOWAPI:
     2114                    fprintf (response_file, "FORMAT OS2 LX PM\n");
     2115                    break;
     2116                  default:
     2117                  case _MD_WINDOWCOMPAT:
     2118                    fprintf (response_file, "FORMAT OS2 LX PMCompatible\n");
     2119                    break;
     2120                  case _MD_NOTWINDOWCOMPAT:
     2121                    fprintf (response_file, "FORMAT OS2 LX FullScreen\n");
     2122                    break;
     2123                }
     2124            }
    21082125          _md_close (pMd);
    21092126        }
Note: See TracChangeset for help on using the changeset viewer.