mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +00:00
- Convert tditest to PSEH instead of a broken MSVC SEH attempt
- Teach man how to use "subroutines" svn path=/trunk/; revision=42709
This commit is contained in:
parent
fad9449b5f
commit
c163eb9dc9
2 changed files with 68 additions and 72 deletions
|
@ -10,6 +10,7 @@
|
|||
* 26-Nov-2003 Vizzini Updated to run properly on Win2ksp4
|
||||
*/
|
||||
#include <tditest.h>
|
||||
#include <pseh/pseh2.h>
|
||||
|
||||
|
||||
#if DBG
|
||||
|
@ -544,22 +545,18 @@ NTSTATUS TdiSendDatagram(
|
|||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
try
|
||||
_SEH2_TRY
|
||||
{
|
||||
#endif
|
||||
MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
|
||||
#ifdef _MSC_VER
|
||||
}
|
||||
except(EXCEPTION_EXECUTE_HANDLER)
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
TDI_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
|
||||
IoFreeMdl(Mdl);
|
||||
IoFreeIrp(Irp);
|
||||
ExFreePool(ConnectInfo);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
#endif
|
||||
} _SEH2_END;
|
||||
|
||||
TdiBuildSendDatagram(
|
||||
Irp, /* I/O Request Packet */
|
||||
|
@ -675,14 +672,11 @@ NTSTATUS TdiReceiveDatagram(
|
|||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
try
|
||||
_SEH2_TRY
|
||||
{
|
||||
#endif
|
||||
MmProbeAndLockPages(Mdl, KernelMode, IoModifyAccess);
|
||||
#ifdef _MSC_VER
|
||||
}
|
||||
except (EXCEPTION_EXECUTE_HANDLER)
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
TDI_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
|
||||
IoFreeMdl(Mdl);
|
||||
|
@ -690,8 +684,7 @@ NTSTATUS TdiReceiveDatagram(
|
|||
ExFreePool(MdlBuffer);
|
||||
ExFreePool(ReceiveInfo);
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
#endif
|
||||
} _SEH2_END;
|
||||
|
||||
TdiBuildReceiveDatagram(
|
||||
Irp, /* I/O Request Packet */
|
||||
|
|
|
@ -119,23 +119,17 @@ AnalyzeArgv(char *argument)
|
|||
return element;
|
||||
}
|
||||
|
||||
int
|
||||
AnalyzeFile()
|
||||
{
|
||||
char *cur_string=(char*)malloc(sizeof(char)*MAXLINE);
|
||||
int symbol=0;
|
||||
char *THtag=(char*)malloc(sizeof(char)*MAXLINE);
|
||||
|
||||
|
||||
void sh_outp(void)
|
||||
void sh_outp(char *cur_string)
|
||||
{
|
||||
int symbol;
|
||||
putchar('\n');
|
||||
putchar('\n');
|
||||
for(symbol=3;putchar(cur_string[symbol]); symbol++);
|
||||
}
|
||||
|
||||
void th_outp(void)
|
||||
void th_outp(char *cur_string, char *THtag)
|
||||
{
|
||||
int symbol;
|
||||
putchar('\n');
|
||||
putchar('\n');
|
||||
putchar('\t');
|
||||
|
@ -146,10 +140,10 @@ AnalyzeFile()
|
|||
SetCl(NORMAL);
|
||||
}
|
||||
|
||||
void text_outp(void)
|
||||
void text_outp(char *cur_string)
|
||||
{
|
||||
char TagFlag=0;
|
||||
symbol=0;
|
||||
int symbol=0;
|
||||
|
||||
if(cur_string[0]=='.')
|
||||
while(cur_string[symbol]!=' ')
|
||||
|
@ -162,6 +156,15 @@ AnalyzeFile()
|
|||
putchar(' ');
|
||||
}
|
||||
|
||||
int
|
||||
AnalyzeFile()
|
||||
{
|
||||
char *cur_string=(char*)malloc(sizeof(char)*MAXLINE);
|
||||
char *THtag=(char*)malloc(sizeof(char)*MAXLINE);
|
||||
|
||||
|
||||
|
||||
|
||||
while(fgets(cur_string,MAXLINE,manfile))
|
||||
|
||||
/* TAGs processing */
|
||||
|
@ -169,7 +172,7 @@ AnalyzeFile()
|
|||
(cur_string[2]=='H')) // .SH tag
|
||||
{
|
||||
SetCl(BOLD);
|
||||
sh_outp();
|
||||
sh_outp(cur_string);
|
||||
SetCl(NORMAL);
|
||||
}
|
||||
else
|
||||
|
@ -177,7 +180,7 @@ AnalyzeFile()
|
|||
(cur_string[2]==' ')) // .I tag
|
||||
{
|
||||
SetCl(ITALIC);
|
||||
text_outp();
|
||||
text_outp(cur_string);
|
||||
SetCl(NORMAL);
|
||||
}
|
||||
else
|
||||
|
@ -195,7 +198,7 @@ AnalyzeFile()
|
|||
(cur_string[2]==' ')) // .B tag
|
||||
{
|
||||
SetCl(BOLD);
|
||||
text_outp();
|
||||
text_outp(cur_string);
|
||||
SetCl(NORMAL);
|
||||
}
|
||||
else
|
||||
|
@ -206,8 +209,8 @@ AnalyzeFile()
|
|||
putchar(' ');
|
||||
}
|
||||
|
||||
else text_outp(); // print plane text
|
||||
th_outp();
|
||||
else text_outp(cur_string); // print plane text
|
||||
th_outp(cur_string, THtag);
|
||||
/* END of TAGs processing */
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue