rllib  1
Macros | Functions
rlsvgvdi.cpp File Reference
#include "rlsvgvdi.h"
#include "rlcutil.h"
#include <math.h>
#include <stdarg.h>
#include <winsock2.h>
#include <windows.h>
#include <io.h>
#include <direct.h>
Include dependency graph for rlsvgvdi.cpp:

Go to the source code of this file.

Macros

#define MSG_NOSIGNAL   0
 

Functions

static int beautyval (char *text)
 

Macro Definition Documentation

◆ MSG_NOSIGNAL

#define MSG_NOSIGNAL   0

Definition at line 26 of file rlsvgvdi.cpp.

Function Documentation

◆ beautyval()

static int beautyval ( char *  text)
static

Definition at line 387 of file rlsvgvdi.cpp.

388 {
389  char *cptr = strchr(text,'.');
390  if(cptr != NULL)
391  {
392  char *end = cptr + strlen(cptr) - 1;
393  while(end != cptr) // eliminate trailing 0
394  {
395  if (*end == '0') { *end = '\0'; }
396  else if(*end == '.') { *end = '\0'; break; }
397  else { break; }
398  end--;
399  }
400  if(cptr == end) *cptr = '\0';
401  }
402  return 0;
403 }