b3b79ff0d8
Files correlati : Tutti Ricompilazione Demo : [ ] Commento : Hello 32 bits world! git-svn-id: svn://10.65.10.50/trunk@10098 c028cbd2-c16b-5b4b-a496-9718f37d4682
38 lines
698 B
C++
Executable File
38 lines
698 B
C++
Executable File
#include "wxinc.h"
|
|
#include "xvt.h"
|
|
|
|
BOOLEAN aga_get_host_name(char* name, int maxlen)
|
|
{
|
|
wxString str = wxGetHostName();
|
|
const int len = str.Length();
|
|
strncpy(name, str, maxlen);
|
|
name[maxlen-1] = '\0';
|
|
return len > 0;
|
|
}
|
|
|
|
BOOLEAN aga_get_user_name(char* name, int maxlen)
|
|
{
|
|
wxString str = wxGetUserId();
|
|
str.MakeUpper();
|
|
const int len = str.Length();
|
|
strncpy(name, str, maxlen);
|
|
name[maxlen-1] = '\0';
|
|
return len > 0;
|
|
}
|
|
|
|
void aga_log(const char* fmt, ...)
|
|
{
|
|
static bool bStarted = false;
|
|
FILE* log = fopen("aga.log", bStarted ? "a" : "w");
|
|
|
|
va_list argptr;
|
|
va_start(argptr,fmt);
|
|
vfprintf(log, fmt, argptr);
|
|
va_end(argptr);
|
|
fprintf(log, "\n");
|
|
|
|
fclose(log);
|
|
bStarted = true;
|
|
}
|
|
|