📄 w2k_sym2.c
字号:
}
default:
{
ptConvention = T("??? ");
break;
}
}
printf (atLine,
j, i, pAddress,
pie->dSection, pie->abSection,
atStack, ptConvention,
(pie->fExported ? '*' : ' '), pbSymbol);
if (pie->pAddress != NULL) dNotNull++;
if (pie->fExported ) dExported++;
}
}
if (pit->dSymbols)
{
printf (atStop,
dNotNull, (dNotNull == 1 ? T("") : T("s")),
dExported, (dExported == 1 ? T("") : T("s")));
}
imgMemoryDestroy (pit);
}
else
{
printf (atError, ptModule);
}
return;
}
// =================================================================
// OPTION MANAGEMENT
// =================================================================
VOID WINAPI Option (BOOL fPlus,
PDWORD pdOptions,
DWORD dMask,
DWORD dValue,
DWORD dDefault)
{
DWORD dNewValue = *pdOptions & dMask;
*pdOptions &= ~dMask;
if (fPlus)
{
dNewValue = dValue & dMask;
}
else
{
if (dNewValue == (dValue & dMask))
{
dNewValue = dDefault & dMask;
}
}
*pdOptions |= dNewValue;
return;
}
// =================================================================
// MAIN PROGRAM
// =================================================================
DWORD Main (DWORD argc, PTBYTE *argv, PTBYTE *argp)
{
PTBYTE ptSections = atMatchAll;
PTBYTE ptSymbols = atMatchAll;
DWORD dOptions, i, j;
BOOL fPlus;
printf (atAbout);
if (argc < 2)
{
printf (atUsage, atArguments);
printf (atMoreInfo);
}
else
{
dOptions = DISPLAY_OPTION_DEFAULT;
for (i = 1; i < argc; i++)
{
switch (argv [i] [0])
{
default:
{
DisplaySymbols (argv [i], ptSections, ptSymbols,
dOptions);
break;
}
case ':':
{
ptSections = argv [i] + 1;
break;
}
case '/':
{
ptSymbols = argv [i] + 1;
break;
}
case '+':
case '-':
{
for (j = 0; argv [i] [j]; j++)
{
switch (argv [i] [j])
{
case '+':
{
fPlus = TRUE;
break;
}
case '-':
{
fPlus = FALSE;
break;
}
case 'a':
case 'A':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_SORT,
DISPLAY_OPTION_ADDRESS,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'n':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_SORT,
DISPLAY_OPTION_NAME_IC,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'N':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_SORT,
DISPLAY_OPTION_NAME,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'i':
case 'I':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_IGNORECASE,
DISPLAY_OPTION_IGNORECASE,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'p':
case 'P':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_PREFERRED,
DISPLAY_OPTION_PREFERRED,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'r':
case 'R':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_RELATIVE,
DISPLAY_OPTION_RELATIVE,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'd':
case 'D':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_DECORATED,
DISPLAY_OPTION_DECORATED,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'x':
case 'X':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_EXPORTED,
DISPLAY_OPTION_EXPORTED,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'u':
case 'U':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_UNDEFINED,
DISPLAY_OPTION_UNDEFINED,
DISPLAY_OPTION_DEFAULT);
break;
}
case 's':
case 'S':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_SPECIAL,
DISPLAY_OPTION_SPECIAL,
DISPLAY_OPTION_DEFAULT);
break;
}
case 'z':
case 'Z':
{
Option (fPlus, &dOptions,
DISPLAY_OPTION_ZERO,
DISPLAY_OPTION_ZERO,
DISPLAY_OPTION_DEFAULT);
break;
}
}
}
break;
}
}
}
}
return 0;
}
// =================================================================
// END OF PROGRAM
// =================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -