toaruos/userspace/env.c
Kevin Lange deaa6ad513 Rough support for environment variables
- libc functions not implemented yet
- see `env` for an example of reading variables
- see `esh` for an example of how to set and maintain variables for
  sending to other applications

  Both of the above will be the basis for the libc implementation.
2012-10-07 20:46:35 -07:00

19 lines
265 B
C

#include <stdio.h>
int main(int argc, char ** argv) {
unsigned int x = 0;
unsigned int nulls = 0;
for (x = 0; 1; ++x) {
if (!argv[x]) {
++nulls;
if (nulls == 2) {
break;
}
continue;
}
if (nulls == 1) {
printf("%s\n", argv[x]);
}
}
}