home *** CD-ROM | disk | FTP | other *** search
- /*
- * sdump.c
- * contains: stackdump()
- *
- */
-
- #include <stdio.h>
- #include "gfuncts.h"
-
- /*
- * void
- * stackdump(n,arg1,)
- *
- * ARGUMENT
- * (int) n - number of words to dump
- * (unsigned) args - variable number of arguments
- *
- * DESCRIPTION
- * The arguments passed on the stack are displayed from left to right in
- * hexadecimal format. The n parameter specifies how many words to dump
- *
- * AUTHOR
- * Copyright (C)1987-1990 Greenleaf Software Inc. All Rights Reserved.
- */
- #ifndef _MSC
- void GF_CDECL stackdump(n)
- #else
- #if _MSC > 4
- void GF_CDECL stackdump(n,...)
- #else
- void stackdump(n)
- #endif
- #endif
-
- int n;
- {
- void GF_CONV puthexw();
- int i,j;
- unsigned *p;
-
- p=(unsigned *)&n;
- ++p;
- if((n<=0)||(n>34))
- j=34;
- else
- j=n;
- printf("\n----------<stackdump>-----------\n" );
- i=1;
- while(j--) {
- puthexw( *p++);
- putchar(' ');
- i++;
- if(!i%8)
- putchar('\n');
- }
- printf("--------------------------------\n");
- }
-