version 1.35 | | version 1.36 |
---|
| | |
/* | | /* |
* static char *rcsid_plugins_c = | | * static char *rcsid_plugins_c = |
* "$Id: plugins.c,v 1.35 2005/05/07 11:51:20 tchize Exp $"; | | * "$Id: plugins.c,v 1.36 2005/05/20 19:28:02 akirschbaum Exp $"; |
*/ | | */ |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
| | |
EXIT_X(current)=*(int*)PParm->Value[2]; | | EXIT_X(current)=*(int*)PParm->Value[2]; |
EXIT_Y(current)=*(int*)PParm->Value[3]; | | EXIT_Y(current)=*(int*)PParm->Value[3]; |
if (*(int*)PParm->Value[4]) SET_FLAG(current,FLAG_UNIQUE); | | if (*(int*)PParm->Value[4]) SET_FLAG(current,FLAG_UNIQUE); |
if (PParm->Value[5]) current->msg=add_string ((char*)PParm->Value[5]); | | if (PParm->Value[5]) { |
| | char *txt = PParm->Value[5]; |
| | char *tmp = NULL; |
| | |
| | /* ensure trailing '\n' */ |
| | int len = strlen(txt); |
| | if (len == 0 || txt[len-1] != '\n') { |
| | tmp = malloc(len+2); |
| | sprintf(tmp, "%s\n", txt); |
| | txt = tmp; |
| | } |
| | |
| | current->msg = add_string (txt); |
| | |
| | free(tmp); |
| | } |
enter_exit ((object*) PParm->Value[0],current); | | enter_exit ((object*) PParm->Value[0],current); |
free_object (current); | | free_object (current); |
return NULL; | | return NULL; |