Ignore:
Timestamp:
Feb 21, 2002, 8:24:22 PM (23 years ago)
Author:
umoeller
Message:

misc. updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/exeh.c

    r140 r142  
    546546 */
    547547
    548 VOID ParseBldLevel(PEXECUTABLE pExec)
     548static VOID ParseBldLevel(PEXECUTABLE pExec)
    549549{
    550550    PCSZ    pStartOfVendor,
     
    703703 *      and pszInfo fields are also set. In the above examples,
    704704 *      this would return the following information:
     705 *
    705706 +          pszVendor = "Ulrich M”ller"
    706707 +          pszVersion = "0.9.0"
    707708 +          pszInfo = "XWorkplace Sound Support Module"
     709 *
     710 *      See ParseBldLevel for extended formats.
    708711 *
    709712 *      If that string is not in BLDLEVEL format, only
     
    10131016 */
    10141017
    1015 APIRET ScanLXEntryTable(PEXECUTABLE pExec,
    1016                         PFSYSFUNCTION paFunctions,
    1017                         PULONG pcEntries)        // out: entry table entry count; ptr can be NULL
     1018static APIRET ScanLXEntryTable(PEXECUTABLE pExec,
     1019                               PFSYSFUNCTION paFunctions,
     1020                               PULONG pcEntries)        // out: entry table entry count; ptr can be NULL
    10181021{
    10191022    ULONG  ulDummy;
     
    12541257 */
    12551258
    1256 APIRET ScanNEEntryTable(PEXECUTABLE pExec,
    1257                         PFSYSFUNCTION paFunctions,
    1258                         PULONG pcEntries)        // out: entry table entry count; ptr can be NULL
     1259static APIRET ScanNEEntryTable(PEXECUTABLE pExec,
     1260                               PFSYSFUNCTION paFunctions,
     1261                               PULONG pcEntries)        // out: entry table entry count; ptr can be NULL
    12591262{
    12601263    ULONG  ulDummy;
     
    13491352 */
    13501353
    1351 int _Optlink Compare(const void *key,
    1352                      const void *element)
     1354static int _Optlink Compare(const void *key,
     1355                            const void *element)
    13531356{
    13541357    USHORT        usOrdinal = *((PUSHORT) key);
     
    13781381 */
    13791382
    1380 APIRET ScanNameTable(PEXECUTABLE pExec,
    1381                      ULONG cFunctions,
    1382                      PFSYSFUNCTION paFunctions)
     1383static APIRET ScanNameTable(PEXECUTABLE pExec,
     1384                            ULONG cFunctions,
     1385                            PFSYSFUNCTION paFunctions)
    13831386{
    13841387    ULONG   ulDummy;
     
    21352138 */
    21362139
    2137 APIRET ExpandIterdata1(char *pabTarget,         // out: page data (pagesize as in lx spec)
    2138                        int cbTarget,            // in: sizeof *pabTarget (pagesize as in lx spec)
    2139                        const char *pabSource,   // in: compressed source data in EXEPACK:1 format
    2140                        int cbSource)            // in: sizeof *pabSource
     2140static APIRET ExpandIterdata1(char *pabTarget,         // out: page data (pagesize as in lx spec)
     2141                              int cbTarget,            // in: sizeof *pabTarget (pagesize as in lx spec)
     2142                              const char *pabSource,   // in: compressed source data in EXEPACK:1 format
     2143                              int cbSource)            // in: sizeof *pabSource
    21412144{
    21422145    PLXITER             pIter = (PLXITER)pabSource;
     
    22002203 */
    22012204
    2202 void memcpyw(char *pch1, const char *pch2, size_t cch)
     2205static void memcpyw(char *pch1, const char *pch2, size_t cch)
    22032206{
    22042207    /*
     
    22342237 */
    22352238
    2236 void memcpyb(char *pch1, const char *pch2, size_t cch)
     2239static void memcpyb(char *pch1, const char *pch2, size_t cch)
    22372240{
    22382241    /*
     
    22612264 *      (C) Knut Stange Osmundsen. Used with permission.
    22622265 *
     2266 *      Note that we call special (slow) memcpy versions
     2267 *      here because the standard memcpy will fail on
     2268 *      certain bit combinations here for some unknown
     2269 *      reason.
     2270 *
    22632271 *@@added V0.9.16 (2001-12-08) [umoeller]
    22642272 */
    22652273
    2266 APIRET ExpandIterdata2(char *pachPage,
    2267                        int cchPage,
    2268                        const char *pachSrcPage,
    2269                        int cchSrcPage)
     2274static APIRET ExpandIterdata2(char *pachPage,              // out: page data (pagesize as in lx spec)
     2275                              int cchPage,                 // in: sizeof *pachPage (pagesize as in lx spec)
     2276                              const char *pachSrcPage,     // in: compressed source data in EXEPACK:1 format
     2277                              int cchSrcPage)              // in: size of source buf
    22702278{
    22712279    char *          pachDestPage = pachPage; /* Store the pointer for boundrary checking. */
     
    24792487 */
    24802488
    2481 APIRET GetOfsFromPageTableIndex(PEXECUTABLE pExec,   // in: executable from exehOpen
    2482                                 ULONG ulObjPageTblIndexThis,  // in: object page table index to look for
    2483                                 PULONG pulFlags,        // out: page flags
    2484                                 PULONG pulSize,         // out: page size
    2485                                 PULONG pulPageOfs)      // out: page ofs (add pLXHeader->ulDataPagesOfs to this)
     2489static APIRET GetOfsFromPageTableIndex(PEXECUTABLE pExec,   // in: executable from exehOpen
     2490                                       ULONG ulObjPageTblIndexThis,  // in: object page table index to look for
     2491                                       PULONG pulFlags,        // out: page flags
     2492                                       PULONG pulSize,         // out: page size
     2493                                       PULONG pulPageOfs)      // out: page ofs (add pLXHeader->ulDataPagesOfs to this)
    24862494{
    24872495    OBJECTPAGETABLEENTRY *pObjPageTblEntry;
     
    25092517 *      loads and possibly unpacks one LX page.
    25102518 *
     2519 *      In order to reduce memory allocations, the
     2520 *      caller is responsible for allocating a temp
     2521 *      buffer, which must be passed in with
     2522 *      pabCompressed.
     2523 *
     2524 *      Returns:
     2525 *
     2526 *      --  NO_ERROR: pbData was filled with data,
     2527 *          which is pLXHeader->ulPageSize in size.
     2528 *
     2529 *      --  ERROR_INVALID_SEGMENT_NUMBER: segment
     2530 *          number is out of range.
     2531 *
     2532 *      --  ERROR_BAD_FORMAT: compressed page data
     2533 *          is screwed somehow, or page size is
     2534 *          too large.
     2535 *
     2536 *      plus the error codes of doshReadAt.
     2537 *
    25112538 *@@added V0.9.16 (2002-01-05) [umoeller]
    25122539 */
    25132540
    2514 APIRET exehReadLXPage(PEXECUTABLE pExec,
    2515                       ULONG ulObjPageTblIndex,
     2541APIRET exehReadLXPage(PEXECUTABLE pExec,        // in: executable from exehOpen
     2542                      ULONG ulObjPageTblIndex,  // in: page table index to read
    25162543                      ULONG ulExeOffset,        // in: for resources, pLXHeader->ulDataPagesOfs
    25172544                      PBYTE pabCompressed,      // in: ptr to temp buffer which must be
    25182545                                                // pLXHeader->ulPageSize + 4 bytes in size
    2519                       PBYTE pbData)             // in: ptr to buffer which receives actual
     2546                      PBYTE pbData)             // out: ptr to buffer which receives actual
    25202547                                                // uncompressed page data (pLXHeader->ulPageSize)
    25212548{
     
    26172644 *      --  ERROR_NOT_ENOUGH_MEMORY
    26182645 *
    2619  *      --  ERROR_INVALID_SEGMENT_NUMBER
    2620  *
    2621  *      --  ERROR_BAD_FORMAT: cannot handle resource
    2622  *          format (probably error in decompression
    2623  *          code).
    2624  *
    2625  *      plus the error codes from doshReadAt.
     2646 *      plus the error codes from exehReadLXPage.
    26262647 *
    26272648 *@@added V0.9.16 (2001-12-08) [umoeller]
     
    31433164            {
    31443165                free(pThis);
    3145                 pThis = NULL;
     3166                *papsz[ul] = NULL;
    31463167            }
    31473168        }
Note: See TracChangeset for help on using the changeset viewer.