Advanced Strategic Command
Macros | Typedefs | Functions | Variables
misc.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <ctype.h>
#include <stdarg.h>
#include <iostream>
#include <SDL.h>
#include "global.h"
#include "misc.h"
#include "ascstring.h"
Include dependency graph for misc.cpp:

Go to the source code of this file.

Macros

#define UPDC32(octet, crc)   (crc_32_tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8))
 

Typedefs

typedef unsigned int UNS_32_BITS
 

Functions

int getFirstBit (int zahl)
 Count the number of zero bits on the LSB side of "zahl". More...
 
char * strrr (int a)
 converts a to a string. More...
 
char * strrr (Uint32 a)
 
char * strrr (double f)
 converts a to a string. More...
 
int crc32buf (const void *vbuf, int len)
 
int atoi (const std::string &s)
 
double atof (const std::string &s)
 
char * strupr (const char *a)
 
char * itoa (int a, char *b, int c)
 

Variables

const char * digit [] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }
 
const char * letter []
 
char strstring [1000]
 
static UNS_32_BITS crc_32_tab []
 

Macro Definition Documentation

#define UPDC32 (   octet,
  crc 
)    (crc_32_tab[((crc) ^ (octet)) & 0xff] ^ ((crc) >> 8))

Definition at line 132 of file misc.cpp.

Referenced by crc32buf().

Typedef Documentation

typedef unsigned int UNS_32_BITS

Definition at line 82 of file misc.cpp.

Function Documentation

double atof ( const std::string &  s)
int atoi ( const std::string &  s)
int crc32buf ( const void *  vbuf,
int  len 
)

Definition at line 135 of file misc.cpp.

References UPDC32.

Referenced by Password::encodepassword().

int getFirstBit ( int  zahl)
char* itoa ( int  a,
char *  b,
int  c 
)
char* strrr ( int  a)
char* strrr ( Uint32  a)

Definition at line 71 of file misc.cpp.

References strstring.

char* strrr ( double  a)

converts a to a string.

Returns
a pointer to a static array, which will be overwritten in the next call

Definition at line 76 of file misc.cpp.

References strstring.

char* strupr ( const char *  a)

Definition at line 164 of file misc.cpp.

References malloc().

Referenced by ASCStringHelpers::_Strupr().

Variable Documentation

UNS_32_BITS crc_32_tab[]
static

Definition at line 85 of file misc.cpp.

const char* digit[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }

Definition at line 37 of file misc.cpp.

Referenced by int2string().

const char* letter[]
Initial value:
= { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }

Definition at line 38 of file misc.cpp.

char strstring[1000]

Definition at line 42 of file misc.cpp.

Referenced by strrr().