Changeset 142 for trunk/src/helpers/exeh.c
- Timestamp:
- Feb 21, 2002, 8:24:22 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/exeh.c
r140 r142 546 546 */ 547 547 548 VOID ParseBldLevel(PEXECUTABLE pExec)548 static VOID ParseBldLevel(PEXECUTABLE pExec) 549 549 { 550 550 PCSZ pStartOfVendor, … … 703 703 * and pszInfo fields are also set. In the above examples, 704 704 * this would return the following information: 705 * 705 706 + pszVendor = "Ulrich Mller" 706 707 + pszVersion = "0.9.0" 707 708 + pszInfo = "XWorkplace Sound Support Module" 709 * 710 * See ParseBldLevel for extended formats. 708 711 * 709 712 * If that string is not in BLDLEVEL format, only … … 1013 1016 */ 1014 1017 1015 APIRET ScanLXEntryTable(PEXECUTABLE pExec,1016 PFSYSFUNCTION paFunctions,1017 PULONG pcEntries) // out: entry table entry count; ptr can be NULL1018 static APIRET ScanLXEntryTable(PEXECUTABLE pExec, 1019 PFSYSFUNCTION paFunctions, 1020 PULONG pcEntries) // out: entry table entry count; ptr can be NULL 1018 1021 { 1019 1022 ULONG ulDummy; … … 1254 1257 */ 1255 1258 1256 APIRET ScanNEEntryTable(PEXECUTABLE pExec,1257 PFSYSFUNCTION paFunctions,1258 PULONG pcEntries) // out: entry table entry count; ptr can be NULL1259 static APIRET ScanNEEntryTable(PEXECUTABLE pExec, 1260 PFSYSFUNCTION paFunctions, 1261 PULONG pcEntries) // out: entry table entry count; ptr can be NULL 1259 1262 { 1260 1263 ULONG ulDummy; … … 1349 1352 */ 1350 1353 1351 int _Optlink Compare(const void *key,1352 const void *element)1354 static int _Optlink Compare(const void *key, 1355 const void *element) 1353 1356 { 1354 1357 USHORT usOrdinal = *((PUSHORT) key); … … 1378 1381 */ 1379 1382 1380 APIRET ScanNameTable(PEXECUTABLE pExec,1381 ULONG cFunctions,1382 PFSYSFUNCTION paFunctions)1383 static APIRET ScanNameTable(PEXECUTABLE pExec, 1384 ULONG cFunctions, 1385 PFSYSFUNCTION paFunctions) 1383 1386 { 1384 1387 ULONG ulDummy; … … 2135 2138 */ 2136 2139 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 format2140 int cbSource) // in: sizeof *pabSource2140 static 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 2141 2144 { 2142 2145 PLXITER pIter = (PLXITER)pabSource; … … 2200 2203 */ 2201 2204 2202 void memcpyw(char *pch1, const char *pch2, size_t cch)2205 static void memcpyw(char *pch1, const char *pch2, size_t cch) 2203 2206 { 2204 2207 /* … … 2234 2237 */ 2235 2238 2236 void memcpyb(char *pch1, const char *pch2, size_t cch)2239 static void memcpyb(char *pch1, const char *pch2, size_t cch) 2237 2240 { 2238 2241 /* … … 2261 2264 * (C) Knut Stange Osmundsen. Used with permission. 2262 2265 * 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 * 2263 2271 *@@added V0.9.16 (2001-12-08) [umoeller] 2264 2272 */ 2265 2273 2266 APIRET ExpandIterdata2(char *pachPage, 2267 int cchPage,2268 const char *pachSrcPage,2269 int cchSrcPage)2274 static 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 2270 2278 { 2271 2279 char * pachDestPage = pachPage; /* Store the pointer for boundrary checking. */ … … 2479 2487 */ 2480 2488 2481 APIRET GetOfsFromPageTableIndex(PEXECUTABLE pExec, // in: executable from exehOpen2482 ULONG ulObjPageTblIndexThis, // in: object page table index to look for2483 PULONG pulFlags, // out: page flags2484 PULONG pulSize, // out: page size2485 PULONG pulPageOfs) // out: page ofs (add pLXHeader->ulDataPagesOfs to this)2489 static 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) 2486 2494 { 2487 2495 OBJECTPAGETABLEENTRY *pObjPageTblEntry; … … 2509 2517 * loads and possibly unpacks one LX page. 2510 2518 * 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 * 2511 2538 *@@added V0.9.16 (2002-01-05) [umoeller] 2512 2539 */ 2513 2540 2514 APIRET exehReadLXPage(PEXECUTABLE pExec, 2515 ULONG ulObjPageTblIndex, 2541 APIRET exehReadLXPage(PEXECUTABLE pExec, // in: executable from exehOpen 2542 ULONG ulObjPageTblIndex, // in: page table index to read 2516 2543 ULONG ulExeOffset, // in: for resources, pLXHeader->ulDataPagesOfs 2517 2544 PBYTE pabCompressed, // in: ptr to temp buffer which must be 2518 2545 // pLXHeader->ulPageSize + 4 bytes in size 2519 PBYTE pbData) // in: ptr to buffer which receives actual2546 PBYTE pbData) // out: ptr to buffer which receives actual 2520 2547 // uncompressed page data (pLXHeader->ulPageSize) 2521 2548 { … … 2617 2644 * -- ERROR_NOT_ENOUGH_MEMORY 2618 2645 * 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. 2626 2647 * 2627 2648 *@@added V0.9.16 (2001-12-08) [umoeller] … … 3143 3164 { 3144 3165 free(pThis); 3145 pThis= NULL;3166 *papsz[ul] = NULL; 3146 3167 } 3147 3168 }
Note:
See TracChangeset
for help on using the changeset viewer.