tor_main.c 1004 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. extern const char tor_git_revision[];
  6. /** String describing which Tor Git repository version the source was
  7. * built from. This string is generated by a bit of shell kludging in
  8. * src/or/include.am, and is usually right.
  9. */
  10. const char tor_git_revision[] =
  11. #ifndef _MSC_VER
  12. #include "micro-revision.i"
  13. #endif
  14. "";
  15. /**
  16. * \file tor_main.c
  17. * \brief Stub module containing a main() function.
  18. *
  19. * We keep the main function in a separate module so that the unit
  20. * tests, which have their own main()s, can link against main.c.
  21. **/
  22. int tor_main(int argc, char *argv[]);
  23. /** We keep main() in a separate file so that our unit tests can use
  24. * functions from main.c)
  25. */
  26. int
  27. main(int argc, char *argv[])
  28. {
  29. int r = tor_main(argc, argv);
  30. if (r < 0 || r > 255)
  31. return 1;
  32. else
  33. return r;
  34. }