Created
April 22, 2011 07:52
-
-
Save trapd00r/936234 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> /* works without */ | |
int main(int argc, char *argv[]) { | |
static const char *env[] = { | |
"HOME", | |
"XDG_CACHE_HOME", "XDG_CONFIG_HOME", "XDG_DATA_HOME", | |
"BIN_HOME", "DEVEL_HOME", | |
}; | |
int i = 0; | |
while(env[i] != NULL) { | |
printf("%20.20s: %s\n", env[i], getenv( env[i] )); | |
i++; | |
} | |
return 0; | |
} | |
/* vim: set ts=2 expandtab sw=2: */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment