gnunet-auction-join.c 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. This file is part of GNUnet.
  3. Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2009 GNUnet e.V.
  4. GNUnet is free software: you can redistribute it and/or modify it
  5. under the terms of the GNU Affero General Public License as published
  6. by the Free Software Foundation, either version 3 of the License,
  7. or (at your option) any later version.
  8. GNUnet is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. SPDX-License-Identifier: AGPL3.0-or-later
  15. */
  16. /**
  17. * @file auction/gnunet-auction.c
  18. * @brief auction for writing a tool
  19. * @author Christian Grothoff
  20. */
  21. #include "platform.h"
  22. #include "gnunet_util_lib.h"
  23. /* #include "gnunet_auction_service.h" */
  24. /**
  25. * Final status code.
  26. */
  27. static int ret;
  28. /**
  29. * Main function that will be run by the scheduler.
  30. *
  31. * @param cls closure
  32. * @param args remaining command-line arguments
  33. * @param cfgfile name of the configuration file used (for saving, can be NULL!)
  34. * @param cfg configuration
  35. */
  36. static void
  37. run(void *cls,
  38. char *const *args,
  39. const char *cfgfile,
  40. const struct GNUNET_CONFIGURATION_Handle *cfg)
  41. {
  42. /* main code here */
  43. }
  44. /**
  45. * The main function.
  46. *
  47. * @param argc number of arguments from the command line
  48. * @param argv command line arguments
  49. * @return 0 ok, 1 on error
  50. */
  51. int
  52. main(int argc, char *const *argv)
  53. {
  54. static const struct GNUNET_GETOPT_CommandLineOption options[] = {
  55. /* FIMXE: add options here */
  56. GNUNET_GETOPT_OPTION_END
  57. };
  58. if (GNUNET_OK !=
  59. GNUNET_STRINGS_get_utf8_args(argc, argv,
  60. &argc, &argv))
  61. return 2;
  62. ret = (GNUNET_OK ==
  63. GNUNET_PROGRAM_run(argc, argv,
  64. "gnunet-auction",
  65. gettext_noop("help text"),
  66. options,
  67. &run,
  68. NULL)) ? ret : 1;
  69. GNUNET_free((void*)argv);
  70. return ret;
  71. }
  72. /* end of gnunet-auction.c */