version 1.14 | | version 1.15 |
---|
| | |
/* | | /* |
* static char *rcsid_utils_c = | | * static char *rcsid_utils_c = |
* "$Id: utils.c,v 1.14 2005/04/16 22:05:09 ryo_saeba Exp $"; | | * "$Id: utils.c,v 1.15 2005/05/06 21:10:07 tchize Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
} | | } |
} | | } |
| | |
| | /* |
| | * Strip out the media tags from a String. |
| | * Warning the input string will contain the result string |
| | */ |
| | void strip_media_tag(char *message){ |
| | int in_tag=0; |
| | char* dest; |
| | char* src; |
| | src=dest=message; |
| | while (*src!='\0'){ |
| | if (*src=='['){ |
| | in_tag=1; |
| | } else if (in_tag && (*src==']')) |
| | in_tag=0; |
| | else if (!in_tag){ |
| | *dest=*src; |
| | dest++; |
| | } |
| | src++; |
| | } |
| | *dest='\0'; |
| | } |