make_spr_sw_abort_static.c 501 B

12345678910111213141516171819202122
  1. /*
  2. * Constructor function for a SeatPromptResult of the 'software abort'
  3. * category, whose error message is in the simplest possible form of a
  4. * static string constant.
  5. */
  6. #include "putty.h"
  7. static void spr_static_errfn(SeatPromptResult spr, BinarySink *bs)
  8. {
  9. put_dataz(bs, spr.errdata_lit);
  10. }
  11. SeatPromptResult make_spr_sw_abort_static(const char *str)
  12. {
  13. SeatPromptResult spr;
  14. spr.kind = SPRK_SW_ABORT;
  15. spr.errfn = spr_static_errfn;
  16. spr.errdata_lit = str;
  17. return spr;
  18. }