fmt.c

Go to the documentation of this file.
00001 /*
00002  * $Id: fmt.c 4518 2008-07-28 15:39:28Z henningw $
00003  *
00004  * Copyright (C) 2006 Voice Sistem SRL
00005  *
00006  * This file is part of Kamailio, a free SIP server.
00007  *
00008  * Kamailio is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * Kamailio is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00021  *
00022  *
00023  * History:
00024  * ---------
00025  *  2006-09-08  first version (bogdan)
00026  */
00027 
00035 #include <string.h>
00036 #include "../../dprint.h"
00037 #include "mi_mem.h"
00038 
00039 char *mi_fmt_buf = 0;
00040 int  mi_fmt_buf_len = 0;
00041 
00042 
00043 int mi_fmt_init( unsigned int size )
00044 {
00045         mi_fmt_buf = (char*)mi_malloc(size);
00046         if (mi_fmt_buf==NULL) {
00047                 LM_ERR("no more pkg mem\n");
00048                 return -1;
00049         }
00050         mi_fmt_buf_len = size;
00051         return 0;
00052 }
00053 
00054