10 void itoa(
unsigned int dat,
char *output )
22 std::reverse( output, s );
32 itoa( faction, output+3 );
33 return std::string( output );
36 bool IsFGKey(
const std::string &fgcandidate )
38 if (fgcandidate.length() > 3 && fgcandidate[0] ==
'F' && fgcandidate[1] ==
'G' && fgcandidate[2] ==
':')
return true;
42 static std::string
gFG =
"FG:";
48 itoa( faction, tmp+1 );
49 return gFG+fgname+tmp;
52 static std::string
gSS =
"SS:";
56 return gSS+starsystem;
69 bool CheckFG( std::vector< std::string > &data )
72 unsigned int leg = data.size();
75 std::string *numlanded = &data[
i+1];
76 std::string *numtotal = &data[
i];
77 if (*numlanded != *numtotal) {
79 *numlanded = *numtotal;
87 std::string key =
MakeFGKey( fgname, faction );