GRASS Programmer's Manual  6.4.2(2012)
V_trim_dec.c
Go to the documentation of this file.
00001 
00028 #include <grass/vask.h>
00029 
00030 
00042 void V__trim_decimal(char *buf)
00043 {
00044     char *mark;
00045 
00046     /* find the . */
00047     while (*buf != '.')
00048         if (*buf++ == '\0')
00049             return;
00050 
00051     mark = buf;
00052     while (*++buf)
00053         if (*buf != '0')
00054             mark = buf + 1;
00055 
00056     while (*mark)
00057         *mark++ = 0;
00058 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines