mirror of
https://gitlab.com/blau_araujo/cblc.git
synced 2025-05-09 18:16:37 -03:00
remoção do exemplo anterior de getenv
This commit is contained in:
parent
5c66f0e140
commit
88d08cab14
1 changed files with 0 additions and 26 deletions
|
@ -1,26 +0,0 @@
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
void print_list(char *list[]) {
|
|
||||||
int i = 0;
|
|
||||||
while (list[i] != NULL) {
|
|
||||||
printf("[%d] => %s\n", i, list[i]);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Para informar que 'environ' existe...
|
|
||||||
extern char **environ;
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
|
|
||||||
print_list(environ);
|
|
||||||
|
|
||||||
// printf("environ[0] => %p => %s\n", environ[0], environ[0]);
|
|
||||||
|
|
||||||
// char *env = getenv("SHELL");
|
|
||||||
// printf("getenv(\042SHELL\042) => %p => %s\n", env, env);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue