home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ User's Journal & Wi…eveloper's Journal Tools
/
C-C__Users_Journal_and_Windows_Developers_Journal_Tools_1997.iso
/
windbase
/
memslc.3
/
trace.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-07-11
|
3KB
|
106 lines
/*****************************************************************************\
** **
** WW WW IIIIIIII NNN NN DDDDDDD BBBBBBB AA SSSSSS EEEEEEEE **
** WW W WW II NNNN NN DD DD BB BB AA AA SS EE **
** WW W WW II NN NN NN DD DD BBBBBBB AAAAAAAA SSSSSS EEEEEE **
** WW W WW II NN NNNN DD DD BB BB AA AA SS EE **
** WWWWW IIIIIIII NN NNN DDDDDDD BBBBBBB AA AA SSSSSS EEEEEEEE **
** **
** SSSSSS OOOOOO FFFFFFFF TTTTTTTT WW WW AA RRRRRRR EEEEEEEE **
** SS OO OO FF TT WW W WW AA AA RR RR EE **
** SSSSS OO OO FFFFF TT WW W WW AAAAAAAA RRRRRRR EEEEEE **
** SS OO OO FF TT WW W WW AA AA RR RR EE **
** SSSSSS OOOOOO FF TT WWWWW AA AA RR RR EEEEEEEE **
** **
*********** NOTICE ************************************************************
** This file contains valuable trade secrets and proprietary **
** assets of Windbase Software Inc. Embodying substantial **
** creative efforts and confidential information. Unauthorized **
** use, copying, decompiling, translating, disclosure or **
** transfer, of any kind, is strictly prohibited. **
** **
** COPYRIGHT (C) 1992, 1993, 1994. Windbase Software Inc. **
** ALL RIGHTS RESERVED. **
\*****************************************************************************/
#include <stdio.h>
#include <string.h>
#ifdef HAS_UNISTD_H
# include <unistd.h>
#else
# include <stdlib.h>
#endif
#define WBTRC_LEVEL1 /* Defines level 1 tracing */
#define WBTRC_LEVEL2 /* Defines level 2 tracing */
#include "../memsl.h"
#ifdef WBSTDC
void Prog1(char *name, int t1)
#else
void Prog1(name, t1)
char *name;
int t1;
#endif
{
static int i = 0;
WBTrcEntry(2,"Prog1",("%s, %d",name,t1));
if (i++ < 3)
{
WBTrcPrintFD(100,("This is prog1 test\n"));
Prog1(name,t1);
}
WBTrcVReturn(2,("%s","void return"));
}
#ifdef WBSTDC
int Prog2(char *name, int t1, long t3)
#else
int Prog2(name, t1, t3)
char *name;
int t1;
long t3;
#endif
{
WBTrcEntry(1,"Prog2",("%s, %d, %ld",name,t1,t3));
WBTrcPrintFD(1,("This is a Test\n"));
WBTrcWatch(100,"name",name,5);
*name = 'F';
WBTrcReturn(1,1,("%d",1));
}
#ifdef WBSTDC
int main(int argc, char **argv)
#else
int main(argc, argv)
int argc;
char **argv;
#endif
{
int i;
WBTrcFrcMainEntry(1); /* Would normally be WBTrcMainEntry() */
Prog1("Test1",1);
for (i = 0; i < 10; i++)
Prog2("Test2",1,3);
WBTrcHexDump(100,"Test","This is a test",50);
WBTrcHexDump(100,"argv[0]",argv[0],strlen(argv[0]));
WBTrcWatch(100,"argv[0]",argv[0],strlen(argv[0]));
*argv[0] = 'T';
WBTrcExit(0,0,("%d",0));
}