fork(7) download
  1. diff --git a/usr_sbin/editpolicy.c b/usr_sbin/editpolicy.c
  2. index 45dd0ef..09e3b10 100644
  3. --- a/usr_sbin/editpolicy.c
  4. +++ b/usr_sbin/editpolicy.c
  5. @@ -2270,6 +2270,21 @@ static void ccs_show_list(void)
  6. }
  7.  
  8. /**
  9. + * ccs_click1 - Callback for clicking the left mouse button
  10. + *
  11. + * Returns nothing.
  12. + */
  13. +static void ccs_click1(MEVENT mevent)
  14. +{
  15. + struct ccs_screen *ptr = &ccs_screen[ccs_current_screen];
  16. + /* header is 3 tall */
  17. + if (mevent.y < 3)
  18. + return;
  19. + ptr->y = mevent.y - 3;
  20. + ccs_show_current();
  21. +}
  22. +
  23. +/**
  24.   * ccs_resize_window - Callback for resize event.
  25.   *
  26.   * Returns nothing.
  27. @@ -3222,6 +3237,8 @@ static enum ccs_screen_type ccs_generic_list_loop(void)
  28.   ptr->current = saved_cursor[ccs_current_screen].current;
  29.   ptr->y = saved_cursor[ccs_current_screen].y;
  30.   }
  31. + MEVENT mevent;
  32. + mousemask(ALL_MOUSE_EVENTS, NULL);
  33.  start:
  34.   if (ccs_current_screen == CCS_SCREEN_DOMAIN_LIST) {
  35.   if (!ccs_domain_sort_type) {
  36. @@ -3281,6 +3298,13 @@ start2:
  37.   if (c == ERR)
  38.   continue; /* Ignore invalid key. */
  39. switch (c) {
  40. + case KEY_MOUSE:
  41. + if (getmouse(&mevent) == OK) {
  42. + if (mevent.bstate & BUTTON1_CLICKED) {
  43. + ccs_click1(mevent);
  44. + }
  45. + }
  46. + break;
  47. case KEY_RESIZE:
  48. ccs_resize_window();
  49. ccs_show_list();
  50.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:7: error: invalid suffix "dd0ef..09e3b10" on integer constant
prog.cpp:5: error: stray ‘@’ in program
prog.cpp:5: error: stray ‘@’ in program
prog.cpp:5: error: stray ‘@’ in program
prog.cpp:5: error: stray ‘@’ in program
prog.cpp:38:35: warning: "/*" within comment
prog.cpp:1: error: expected constructor, destructor, or type conversion before ‘--’ token
prog.cpp:6: error: expected declaration before ‘}’ token
stdout
Standard output is empty