Drizzled Public API Documentation

llstr.cc
00001 /* Copyright (C) 2000 MySQL AB
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software
00014    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00015 
00016 /*
00017   Defines: llstr();
00018 
00019   llstr(value, buff);
00020 
00021   This function saves a int64_t value in a buffer and returns the pointer to
00022   the buffer.  This is useful when trying to portable print int64_t
00023   variables with printf() as there is no usable printf() standard one can use.
00024 */
00025 
00026 #include <config.h>
00027 #include <drizzled/internal/m_string.h>
00028 
00029 namespace drizzled
00030 {
00031 namespace internal
00032 {
00033 
00034 char *llstr(int64_t value,char *buff)
00035 {
00036   int64_t10_to_str(value,buff,-10);
00037   return buff;
00038 }
00039 
00040 char *ullstr(int64_t value,char *buff)
00041 {
00042   int64_t10_to_str(value,buff,10);
00043   return buff;
00044 }
00045 
00046 } /* namespace internal */
00047 } /* namespace drizzled */