/* $Id: message_handler.sma 20 2005-04-29 14:52:24Z tilman $ */ #define MSG_ID_SET_SONGNAME 0 public message (Msg_Type:type, id, ...) { switch (id) { case MSG_ID_SET_SONGNAME: { new buf[256], artist[128], title[128], len; if (type != MSG_STRING_SET || numargs () < 4) return; getsarg (2, artist, 128); getsarg (3, title, 128); len = snprintf (buf, 256, "%s - %s", artist, title); set_songname (buf, len); } } }