eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getopt.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Compatibility shim for <getopt.h>
  2. *
  3. * Copyright (C) 2006 to 2013 by Jonathan Duddington
  4. * email: [email protected]
  5. * Copyright (C) 2016 Reece H. Dunn
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, see: <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef GETOPT_H_COMPAT_SHIM
  21. #define GETOPT_H_COMPAT_SHIM
  22. #if __has_include_next(<getopt.h>)
  23. #pragma GCC system_header // Silence "warning: #include_next is a GCC extension"
  24. #include_next <getopt.h>
  25. #else
  26. struct option {
  27. char *name;
  28. int has_arg;
  29. int *flag;
  30. int val;
  31. };
  32. extern int optind;
  33. extern char *optarg;
  34. #define no_argument 0
  35. #define required_argument 1
  36. #define optional_argument 2
  37. int
  38. getopt_long(int nargc, char * const *nargv, const char *options,
  39. const struct option *long_options, int *idx);
  40. #endif
  41. #endif