tor_main.c 685 B

12345678910111213141516171819202122232425262728
  1. /* Copyright 2001-2004 Roger Dingledine.
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2017, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. /**
  6. * \file tor_main.c
  7. * \brief Stub module containing a main() function.
  8. *
  9. * We keep the main function in a separate module so that the unit
  10. * tests, which have their own main()s, can link against main.c.
  11. **/
  12. int tor_main(int argc, char *argv[]);
  13. /** We keep main() in a separate file so that our unit tests can use
  14. * functions from main.c.
  15. */
  16. int
  17. main(int argc, char *argv[])
  18. {
  19. int r = tor_main(argc, argv);
  20. if (r < 0 || r > 255)
  21. return 1;
  22. else
  23. return r;
  24. }