/* atalk-utils.c
* Routines for Appletalk utilities (DDP, currently).
*
- * $Id$
- *
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
* This program is free software; you can redistribute it and/or
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#include "atalk-utils.h"
+#include "emem.h"
gchar *
atalk_addr_to_str(const struct atalk_ddp_addr *addrp)
{
- static gchar str[3][14];
- static gchar *cur;
+ gchar *cur;
- if (cur == &str[0][0]) {
- cur = &str[1][0];
- } else if (cur == &str[1][0]) {
- cur = &str[2][0];
- } else {
- cur = &str[0][0];
- }
+ cur=(gchar *)ep_alloc(14);
atalk_addr_to_str_buf(addrp, cur, 14);
return cur;
}