nocmdline.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * nocmdline.c - stubs in applications which don't do the
  3. * standard(ish) PuTTY tools' command-line parsing
  4. */
  5. #include <stdio.h>
  6. #include <assert.h>
  7. #include <stdlib.h>
  8. #include "putty.h"
  9. /*
  10. * Stub version of the function in cmdline.c which provides the
  11. * password to SSH authentication by remembering it having been passed
  12. * as a command-line option. If we're not doing normal command-line
  13. * handling, then there is no such option, so that function always
  14. * returns failure.
  15. */
  16. int cmdline_get_passwd_input(prompts_t *p)
  17. {
  18. return -1;
  19. }
  20. /*
  21. * The main cmdline_process_param function is normally called from
  22. * applications' main(). An application linking against this stub
  23. * module shouldn't have a main() that calls it in the first place :-)
  24. * but it is just occasionally called by other supporting functions,
  25. * such as one in uxputty.c which sometimes handles a non-option
  26. * argument by making up equivalent options and passing them back to
  27. * this function. So we have to provide a link-time stub of this
  28. * function, but it had better not end up being called at run time.
  29. */
  30. int cmdline_process_param(const char *p, char *value,
  31. int need_save, Conf *conf)
  32. {
  33. unreachable("cmdline_process_param should never be called");
  34. }