A Simple X Image Viewer
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

46 líneas
783 B

  1. #define _POSIX_C_SOURCE 200112L
  2. #define _FEATURE_CONFIG
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include "config.h"
  6. #define QUOTE(m) #m
  7. #define PUT_MACRO(m) \
  8. printf("%s-D%s=%s", n++ ? " " : "", #m, QUOTE(m))
  9. int n = 0;
  10. inline void puts_if(const char *s, int c) {
  11. if (c)
  12. printf("%s%s", n++ ? " " : "", s);
  13. }
  14. inline void endl() {
  15. if (n) {
  16. printf("\n");
  17. n = 0;
  18. }
  19. }
  20. int main(int argc, char **argv) {
  21. int i;
  22. for (i = 1; i < argc; i++) {
  23. if (!strcmp(argv[i], "-D")) {
  24. PUT_MACRO(EXIF_SUPPORT);
  25. PUT_MACRO(GIF_SUPPORT);
  26. endl();
  27. } else if (!strcmp(argv[i], "-l")) {
  28. puts_if("-lexif", EXIF_SUPPORT);
  29. puts_if("-lgif", GIF_SUPPORT);
  30. endl();
  31. } else {
  32. fprintf(stderr, "%s: invalid argument: %s\n", argv[0], argv[i]);
  33. return 1;
  34. }
  35. }
  36. return 0;
  37. }