Changeset 222 for trunk/src/helpers/apps.c
- Timestamp:
- Sep 3, 2002, 8:17:46 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/apps.c
r212 r222 804 804 */ 805 805 806 staticAPIRET CheckAndQualifyExecutable(PPROGDETAILS pDetails, // in/out: program details806 STATIC APIRET CheckAndQualifyExecutable(PPROGDETAILS pDetails, // in/out: program details 807 807 PXSTRING pstrExecutablePatched) // in/out: buffer for q'fied exec (must be init'ed) 808 808 { … … 859 859 */ 860 860 861 staticAPIRET CallBatchCorrectly(PPROGDETAILS pProgDetails,861 STATIC APIRET CallBatchCorrectly(PPROGDETAILS pProgDetails, 862 862 PXSTRING pstrExecutablePatched, // in/out: buffer for q'fied exec (must be init'ed) 863 863 PXSTRING pstrParams, // in/out: modified parameters (reallocated) … … 979 979 return arc; 980 980 } 981 982 #ifdef _PMPRINTF_983 984 static void DumpMemoryBlock(PBYTE pb, // in: start address985 ULONG ulSize, // in: size of block986 ULONG ulIndent) // in: how many spaces to put987 // before each output line988 {989 TRY_QUIET(excpt1)990 {991 PBYTE pbCurrent = pb; // current byte992 ULONG ulCount = 0,993 ulCharsInLine = 0; // if this grows > 7, a new line is started994 CHAR szTemp[1000];995 CHAR szLine[400] = "",996 szAscii[30] = " "; // ASCII representation; filled for every line997 PSZ pszLine = szLine,998 pszAscii = szAscii;999 1000 for (pbCurrent = pb;1001 ulCount < ulSize;1002 pbCurrent++, ulCount++)1003 {1004 if (ulCharsInLine == 0)1005 {1006 memset(szLine, ' ', ulIndent);1007 pszLine += ulIndent;1008 }1009 pszLine += sprintf(pszLine, "%02lX ", (ULONG)*pbCurrent);1010 1011 if ( (*pbCurrent > 31) && (*pbCurrent < 127) )1012 // printable character:1013 *pszAscii = *pbCurrent;1014 else1015 *pszAscii = '.';1016 pszAscii++;1017 1018 ulCharsInLine++;1019 if ( (ulCharsInLine > 7) // 8 bytes added?1020 || (ulCount == ulSize-1) // end of buffer reached?1021 )1022 {1023 // if we haven't had eight bytes yet,1024 // fill buffer up to eight bytes with spaces1025 ULONG ul2;1026 for (ul2 = ulCharsInLine;1027 ul2 < 8;1028 ul2++)1029 pszLine += sprintf(pszLine, " ");1030 1031 sprintf(szTemp, "%04lX: %s %ss",1032 (ulCount & 0xFFFFFFF8), // offset in hex1033 szLine, // bytes string1034 szAscii); // ASCII string1035 1036 _Pmpf(("%s", szTemp));1037 1038 // restart line buffer1039 pszLine = szLine;1040 1041 // clear ASCII buffer1042 strcpy(szAscii, " ");1043 pszAscii = szAscii;1044 1045 // reset line counter1046 ulCharsInLine = 0;1047 }1048 }1049 1050 }1051 CATCH(excpt1)1052 {1053 _Pmpf(("Crash in " __FUNCTION__ ));1054 } END_CATCH();1055 }1056 1057 #endif1058 981 1059 982 /* … … 1599 1522 */ 1600 1523 1601 staticAPIRET CallDosStartSession(HAPP *phapp,1524 STATIC APIRET CallDosStartSession(HAPP *phapp, 1602 1525 const PROGDETAILS *pNewProgDetails, // in: program spec (req.) 1603 1526 ULONG cbFailingName, … … 1754 1677 */ 1755 1678 1756 staticAPIRET CallWinStartApp(HAPP *phapp, // out: application handle if NO_ERROR is returned1679 STATIC APIRET CallWinStartApp(HAPP *phapp, // out: application handle if NO_ERROR is returned 1757 1680 HWND hwndNotify, // in: notify window or NULLHANDLE 1758 1681 const PROGDETAILS *pcProgDetails, // in: program spec (req.)
Note:
See TracChangeset
for help on using the changeset viewer.