_main.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*====================================================================*
  2. *
  3. * main.c - template program;
  4. *
  5. *
  6. *--------------------------------------------------------------------*/
  7. /*====================================================================*
  8. * system header files;
  9. *--------------------------------------------------------------------*/
  10. #include <stdio.h>
  11. /*====================================================================*
  12. * custom header files;
  13. *--------------------------------------------------------------------*/
  14. #include "../tools/getoptv.h"
  15. #include "../tools/putoptv.h"
  16. #include "../tools/version.h"
  17. #include "../tools/error.h"
  18. /*====================================================================*
  19. * custom source files;
  20. *--------------------------------------------------------------------*/
  21. #ifndef MAKEFILE
  22. #include "../tools/getoptv.c"
  23. #include "../tools/putoptv.c"
  24. #include "../tools/version.c"
  25. #include "../tools/error.c"
  26. #endif
  27. /*====================================================================*
  28. *
  29. * void function (void);
  30. *
  31. *--------------------------------------------------------------------*/
  32. void function (void)
  33. {
  34. return;
  35. }
  36. /*====================================================================*
  37. *
  38. * int main (int argc, char const * argv []);
  39. *
  40. *--------------------------------------------------------------------*/
  41. int main (int argc, char const * argv [])
  42. {
  43. static char const * optv [] =
  44. {
  45. "",
  46. "",
  47. "Template Program",
  48. (char const *) (0)
  49. };
  50. signed c;
  51. while (~ (c = getoptv (argc, argv, optv)))
  52. {
  53. switch (c)
  54. {
  55. default:
  56. break;
  57. }
  58. }
  59. argc -= optind;
  60. argv += optind;
  61. if (! argc)
  62. {
  63. function ();
  64. }
  65. while ((argc) && (* argv))
  66. {
  67. function ();
  68. argc--;
  69. argv++;
  70. }
  71. exit (0);
  72. }