encoding,
&decoded,
&bytes_decoded);
- if ((rc < 0) || (decoded == NULL)) {
+ if (rc < 0) {
printf("failed to decode content\n");
return;
}
- rc = write(STDOUT_FILENO, content, length);
- free(decoded);
+ if (rc == 0){
+ rc = write(STDOUT_FILENO, content, length);
+ }
+ else {
+ rc = write(STDOUT_FILENO, decoded, bytes_decoded);
+ free(decoded);
+ }
}
}
ma.printme = optarg;
}
}
- StartLibCitadel(8);
if (filename == NULL) {
printf("Filename requried! -f\n");