_main.c 1.8 KB

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