/runtime/main.d

http://github.com/wilkie/djehuty · D · 26 lines · 7 code · 5 blank · 14 comment · 0 complexity · b40c211012b103be254992eb59885a3e MD5 · raw file

  1. /*
  2. * main.d
  3. *
  4. * This module provides the C entry into the application.
  5. *
  6. */
  7. import runtime.gc;
  8. // The user supplied D entry
  9. int main(char[][] args);
  10. // Description: This function is the main entry point of the application.
  11. // argc: The number of arguments
  12. // argv: An array of strings that specify the arguments.
  13. // Returns: The error code for the application.
  14. extern(C) int main(int argc, char** argv) {
  15. // Initialize the garbage collector
  16. gc_init();
  17. // Gather arguments
  18. // Terminate the garbage collector
  19. gc_term();
  20. return 0;
  21. }