1 /** @file clients/filename-bytes.c
2 * @brief Print out raw bytes of filenames in a directory
10 int main(int attribute((unused)) argc, char **argv) {
15 if(!(dp = opendir(argv[1]))) return -1;
16 while((de = readdir(dp))) {
17 for(n = 0; de->d_name[n]; ++n) {
18 printf("%02x", (unsigned char)de->d_name[n]);
22 for(n = 0; de->d_name[n]; ++n) {
23 if(isprint((unsigned char)de->d_name[n]))
24 printf(" %c", (unsigned char)de->d_name[n]);