diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-15 13:59:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-15 13:59:34 +0000 |
commit | 8e736672475377d63007b26b58b7a5c6af335e40 (patch) | |
tree | 333a577ad77ad9fdb9833016589ab9744ab86d06 /main.c | |
download | posixtz-8e736672475377d63007b26b58b7a5c6af335e40.tar.bz2 posixtz-8e736672475377d63007b26b58b7a5c6af335e40.tar.xz |
initial commit
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -0,0 +1,23 @@ +#include <stdio.h> +#include "posixtz.h" + +int usage() { + printf("Print POSIX TZ string from compiled tzdata\n" + "Usage: posixtz FILE...\n"); + return -1; +} + +int main(int argc, char *argv[]) +{ + int i=1; + if (argc <= 1) + return usage(); + + for (i = 1; i < argc; i++) { + char *s = posix_tz(argv[i++]); + if (s != NULL) + printf("%s\n", s); + } + return 0; +} + |