mirror of https://github.com/WebAssembly/wasi-sdk
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
383 B
19 lines
383 B
#include <stdlib.h>
|
|
#include <assert.h>
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
extern char **environ;
|
|
|
|
int main(void) {
|
|
assert(environ != NULL);
|
|
for (char **p = environ; *p; ++p) {
|
|
assert(p != NULL);
|
|
}
|
|
for (char **p = environ; *p; ++p) {
|
|
if (strncmp(*p, "HELLO=", 5) == 0) {
|
|
printf("HELLO = %s\n", *p + 6);
|
|
}
|
|
}
|
|
return 0;
|
|
}
|