GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
V_trim_dec.c
Go to the documentation of this file.
1 
28 #include <grass/vask.h>
29 
30 
42 void V__trim_decimal(char *buf)
43 {
44  char *mark;
45 
46  /* find the . */
47  while (*buf != '.')
48  if (*buf++ == '\0')
49  return;
50 
51  mark = buf;
52  while (*++buf)
53  if (*buf != '0')
54  mark = buf + 1;
55 
56  while (*mark)
57  *mark++ = 0;
58 }
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
Definition: g3drange.c:62
void V__trim_decimal(char *buf)
Remove trailing zeros from decimal number.
Definition: V_trim_dec.c:42