home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
hcshdemo.zip
/
csh-os2.zip
/
SAMPLES
/
ARGS.C
next >
Wrap
C/C++ Source or Header
|
1993-09-28
|
752b
|
23 lines
/***************************************************************************/
/* */
/* */
/* Dump the argv[] and envp[] lists passed to the program. */
/* Copyright (c) 1989-1992 by Hamilton Laboratories. All rights reserved. */
/* */
/* */
/***************************************************************************/
#include <stdio.h>
#include <stdlib.h>
void cdecl main ( int argc, char *argv[], char *envp[] )
{
int i;
printf ("argc = %d\n", argc);
for (i = 0; i < argc; i++)
printf ("argv[%d] = '%s'\n", i, argv[i]);
for (i = 0; envp[i]; i++)
printf ("envp[%d] = '%s'\n", i, envp[i]);
exit(0);
}