tor_main.c 881 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* Copyright 2001-2004 Roger Dingledine.
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2015, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. /** String describing which Tor Git repository version the source was
  6. * built from. This string is generated by a bit of shell kludging in
  7. * src/or/include.am, and is usually right.
  8. */
  9. const char tor_git_revision[] =
  10. #ifndef _MSC_VER
  11. #include "micro-revision.i"
  12. #endif
  13. "";
  14. /**
  15. * \file tor_main.c
  16. * \brief Stub module containing a main() function. Allows unit
  17. * test binary to link against main.c.
  18. **/
  19. int tor_main(int argc, char *argv[]);
  20. /** We keep main() in a separate file so that our unit tests can use
  21. * functions from main.c)
  22. */
  23. int
  24. main(int argc, char *argv[])
  25. {
  26. int r = tor_main(argc, argv);
  27. if (r < 0 || r > 255)
  28. return 1;
  29. else
  30. return r;
  31. }