1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <stdlib.h> #include <err.h> #include "xi2path.h" int main(int argc, char *argv[]) { if (argc < 2) errx(EXIT_FAILURE, "usage: %s id", argv[0]); char path[12]; xi2path(path, strtol(argv[1], NULL, 10)); printf("%s\n", path); return EXIT_SUCCESS; }