home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex048.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
741b
|
24 lines
// Example: 048 from Library Reference
#include "..\3D-Ware\dddware.h"
#include <stdio.h>
#include <string.h>
char far *env_ptr, *tmp_ptr;
short len, count;
char far buffer[256];
void main(void)
{
env_ptr = dddGetEnvSeg(); // Get a far pointer to the Env. Vars.
tmp_ptr = env_ptr;
do
{
len = strlen(tmp_ptr); // Get the length of the ASCII string.
strncpy(buffer,tmp_ptr,len); // Copy the string to a temp buffer.
printf("%s\n",tmp_ptr); // Display the string.
tmp_ptr = tmp_ptr + len +1; // Add the length of the string +1 to the pointer.
}
while (*tmp_ptr !=0); // Do this until the env. vars. are finished.
}