fortune-0.2.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. diff -Nru fortune-0.2/fortune.c fortune-0.2-new/fortune.c
  2. --- fortune-0.2/fortune.c 1998-10-25 01:05:19.000000000 +0200
  3. +++ fortune-0.2-new/fortune.c 2002-09-15 18:46:36.000000000 +0200
  4. @@ -30,7 +30,7 @@
  5. #warn Your system headers say that mmap is not supported!
  6. #endif
  7. -#define VERSION "0.1"
  8. +#define VERSION "0.2"
  9. #define FORTUNEDIR "/usr/share/games/fortunes"
  10. struct option const long_options[] =
  11. @@ -38,6 +38,8 @@
  12. {"help", no_argument, 0, 'h'},
  13. {"help", no_argument, 0, '?'},
  14. {"match", required_argument, 0, 'm'},
  15. + {"set", no_argument, 0, 's'},
  16. + {"out", no_argument, 0, 'o'},
  17. {"version", no_argument, 0, 'V'},
  18. {(char *)0, 0, 0, (char)0}
  19. };
  20. @@ -140,7 +142,7 @@
  21. char *re;
  22. progisim=argv[0]; re=NULL;
  23. - while ((c = getopt_long(argc, argv, "h?m:V",
  24. + while ((c = getopt_long(argc, argv, "h?som:V",
  25. long_options, (int *) 0)) != EOF) {
  26. switch (c) {
  27. case 0 : break;
  28. @@ -150,6 +152,8 @@
  29. return 0;
  30. case 'V': fprintf(stderr,"%s version %s\n", progname, VERSION);
  31. return 0;
  32. + case 'o': break;
  33. + case 's': break;
  34. case 'm': re=optarg;
  35. default : break;
  36. }