util.h File Reference

Go to the source code of this file.

Classes

struct  gb_t
 

Macros

#define gb_flush_limit   (0x3FFFFFFF)
 
#define gb_inc(gb, delta)   { if ((gb)->bytes > gb_flush_limit || delta > gb_flush_limit) gb_flush(gb); (gb)->bytes += delta; (gb)->count++; }
 
#define gb_incb(gb, delta)   { if ((gb)->bytes > gb_flush_limit || delta > gb_flush_limit) gb_flush(gb); (gb)->bytes += delta; }
 
#define gb_incc(gb, delta)   { if ((gb)->bytes > gb_flush_limit || delta > gb_flush_limit) gb_flush(gb); (gb)->count+= delta; }
 

Functions

SQUIDCEXTERN void Tolower (char *)
 
SQUIDCEXTERN double xpercent (double part, double whole)
 
SQUIDCEXTERN int xpercentInt (double part, double whole)
 
SQUIDCEXTERN double xdiv (double nom, double denom)
 
SQUIDCEXTERN const char * xitoa (int num)
 
SQUIDCEXTERN const char * xint64toa (int64_t num)
 
double gb_to_double (const gb_t *)
 
SQUIDCEXTERN const char * double_to_str (char *buf, int buf_size, double value)
 
const char * gb_to_str (const gb_t *)
 
void gb_flush (gb_t *)
 
SQUIDCEXTERN unsigned int RoundTo (const unsigned int num, const unsigned int what)
 

Macro Definition Documentation

◆ gb_flush_limit

#define gb_flush_limit   (0x3FFFFFFF)

Definition at line 32 of file util.h.

◆ gb_inc

#define gb_inc (   gb,
  delta 
)    { if ((gb)->bytes > gb_flush_limit || delta > gb_flush_limit) gb_flush(gb); (gb)->bytes += delta; (gb)->count++; }

Definition at line 33 of file util.h.

◆ gb_incb

#define gb_incb (   gb,
  delta 
)    { if ((gb)->bytes > gb_flush_limit || delta > gb_flush_limit) gb_flush(gb); (gb)->bytes += delta; }

Definition at line 34 of file util.h.

◆ gb_incc

#define gb_incc (   gb,
  delta 
)    { if ((gb)->bytes > gb_flush_limit || delta > gb_flush_limit) gb_flush(gb); (gb)->count+= delta; }

Definition at line 35 of file util.h.

Function Documentation

◆ double_to_str()

SQUIDCEXTERN const char * double_to_str ( char *  buf,
int  buf_size,
double  value 
)

Definition at line 90 of file util.c.

Referenced by Mem::Report().

◆ gb_flush()

void gb_flush ( gb_t g)

Definition at line 77 of file util.c.

References gb_t::bytes, and gb_t::gb.

◆ gb_to_double()

double gb_to_double ( const gb_t g)

Definition at line 84 of file util.c.

References gb_t::bytes, double, and gb_t::gb.

Referenced by gb_to_str().

◆ gb_to_str()

const char * gb_to_str ( const gb_t g)

Definition at line 105 of file util.c.

References gb_to_double(), and max_cc_calls.

◆ RoundTo()

SQUIDCEXTERN unsigned int RoundTo ( const unsigned int  num,
const unsigned int  what 
)

rounds num to the next upper integer multiple of what

Definition at line 134 of file util.c.

◆ Tolower()

◆ xdiv()

◆ xint64toa()

SQUIDCEXTERN const char * xint64toa ( int64_t  num)

Definition at line 69 of file util.c.

References PRId64.

Referenced by HttpHeader::putInt64().

◆ xitoa()

SQUIDCEXTERN const char * xitoa ( int  num)

◆ xpercent()

◆ xpercentInt()

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors