#include <stdio.h>

typedef enum {tarasB = 0, superhackkiller1997, other_shit} users_t;

char * users[] = {"tarasB", "superhackkiller1997", "other_shit"};

typedef void(*say_ptr_t)(char *);

users_t global_usr = other_shit;

say_ptr_t bind(users_t usr) {
  void say(char * str) {
    fprintf(stderr, "%s: %s\n", users[global_usr], str);
  }
  global_usr = usr;
  say_ptr_t volatile p = say;
  return p;
}

int main(void) {
  bind(tarasB)("shit");
  bind(superhackkiller1997)("i'm god");
  bind(other_shit)("ko-ko-ko");
  return 0;
}