Win32: Added @uptime template token and MS_UPTIME stringid to goldlang.cfg
This commit is contained in:
parent
c265a58103
commit
2c67afec51
@ -105,6 +105,8 @@ MS_LMOCTOBER "October"
|
||||
MS_LMNOVEMBER "November"
|
||||
MS_LMDECEMBER "December"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
ST_IMPORTFILE "Import File"
|
||||
WT_IMPORTWHICHFILE " Import which file? "
|
||||
WT_IMPORTPICK " Import "
|
||||
|
@ -124,6 +124,7 @@ MS_LMOCTOBER "Oktober"
|
||||
MS_LMNOVEMBER "November"
|
||||
MS_LMDECEMBER "Dezember"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- VERSCHIEDENES
|
||||
|
@ -134,6 +134,7 @@ MS_LMOCTOBER "Ottobre"
|
||||
MS_LMNOVEMBER "Novembre"
|
||||
MS_LMDECEMBER "Dicembre"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- MISCELA DI PAROLE CHIAVE
|
||||
|
@ -115,6 +115,7 @@ MS_LMOCTOBER "Oktober"
|
||||
MS_LMNOVEMBER "November"
|
||||
MS_LMDECEMBER "December"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- MISCELLANEOUS LANGUAGE KEYWORDS
|
||||
|
@ -125,6 +125,8 @@ MS_LMOCTOBER "
|
||||
MS_LMNOVEMBER "®ï¡àì"
|
||||
MS_LMDECEMBER "¤¥ª ¡àì"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- MISCELLANEOUS LANGUAGE KEYWORDS
|
||||
|
||||
|
@ -144,6 +144,7 @@ MS_LMOCTOBER "
|
||||
MS_LMNOVEMBER "<22>®ï¡àï"
|
||||
MS_LMDECEMBER "„¥ª ¡àï"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- Œ¥î
|
||||
|
@ -122,6 +122,8 @@ MS_LMOCTOBER "
|
||||
MS_LMNOVEMBER "®ï¡àì"
|
||||
MS_LMDECEMBER "¤¥ª ¡àì"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- MISCELLANEOUS LANGUAGE KEYWORDS
|
||||
|
||||
|
@ -112,6 +112,7 @@ MS_LMOCTOBER "oktober"
|
||||
MS_LMNOVEMBER "november"
|
||||
MS_LMDECEMBER "december"
|
||||
|
||||
MS_UPTIME "%days day(s) %hours:%minutes:%seconds.%useconds"
|
||||
|
||||
----------------------------------------------------------------------
|
||||
-- MISCELLANEOUS LANGUAGE KEYWORDS
|
||||
|
@ -10,6 +10,8 @@ _____________________________________________________________________________
|
||||
‡ ¬¥âª¨ ¤«ï GoldED+ 1.1.5, /snapshot/
|
||||
_____________________________________________________________________________
|
||||
|
||||
+ Win32: „®Ў ў«Ґ ®ўл© в®ЄҐ ¤«п ⥬Ї«Ґ©в®ў @uptime Ё MS_UPTIME Ё¤ҐвЁдЁЄ в®а
|
||||
¤«п goldlang.cfg.
|
||||
- ˆá¯à ¢«¥ UUE ¤¥ª®¤¨à®¢ ¨¥ ¥áª®«ìª¨å ä ©«®¢.
|
||||
|
||||
‘ ¯è®â ®â 16 ï¢ àï 2007.
|
||||
|
@ -10,6 +10,8 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
+ Win32: Added @uptime template token and MS_UPTIME stringid to goldlang.cfg
|
||||
|
||||
- Fixed multifile UUE decoding.
|
||||
|
||||
= Snapshot for the Jan 16, 2007.
|
||||
|
@ -101,7 +101,4 @@ Global
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
AMDCaProjectFile = F:\work\_db_cvs\golded+\windows\bin\release\win32\CodeAnalyst\golded.caw
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -86,6 +86,8 @@ static LangCrc LangCrcs[] = {
|
||||
{ CRC_MS_LMNOVEMBER , NULL , "November" },
|
||||
{ CRC_MS_LMDECEMBER , NULL , "December" },
|
||||
|
||||
{ CRC_MS_UPTIME , NULL , "%days day(s) %hours:%minutes:%seconds.%useconds" },
|
||||
|
||||
{ CRC_ST_IMPORTFILE , NULL , "Import File" },
|
||||
{ CRC_WT_IMPORTWHICHFILE , NULL , " Import which file? " },
|
||||
{ CRC_WT_IMPORTPICK , NULL , " Import " },
|
||||
|
@ -70,6 +70,8 @@ const word CRC_MS_LMOCTOBER = 0x51C9;
|
||||
const word CRC_MS_LMNOVEMBER = 0x107D;
|
||||
const word CRC_MS_LMDECEMBER = 0x7733;
|
||||
|
||||
const word CRC_MS_UPTIME = 0x383A;
|
||||
|
||||
const word CRC_ST_IMPORTFILE = 0x027D;
|
||||
const word CRC_WT_IMPORTWHICHFILE = 0xF718;
|
||||
const word CRC_WT_IMPORTTXT = 0xB5DB;
|
||||
|
@ -72,6 +72,8 @@ struct LangGed {
|
||||
char* LMNovember; // MS_LMNOVEMBER
|
||||
char* LMDecember; // MS_LMDECEMBER
|
||||
|
||||
char* Uptime; // MS_UPTIME
|
||||
|
||||
char* ImportFile; // ST_IMPORTFILE
|
||||
char* ImportWhichFile; // WT_IMPORTWHICHFILE
|
||||
char* ImportTitle; // WT_IMPORTPICK
|
||||
|
@ -140,6 +140,7 @@ inline bool domain_requested(const char *str, size_t pos)
|
||||
return strnieql(str+pos, "{domain}", 8);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
void TokenXlat(int mode, std::string &input, GMsg* msg, GMsg* oldmsg, int __origarea)
|
||||
@ -682,7 +683,7 @@ void TokenXlat(int mode, std::string &input, GMsg* msg, GMsg* oldmsg, int __orig
|
||||
continue;
|
||||
}
|
||||
|
||||
#if 0
|
||||
#ifdef __WIN32__
|
||||
if (strnieql(it2str(input, dst), "@uptime", 7))
|
||||
{
|
||||
size_t days = 0;
|
||||
@ -704,21 +705,16 @@ void TokenXlat(int mode, std::string &input, GMsg* msg, GMsg* oldmsg, int __orig
|
||||
hours = seconds/(60*60); seconds %= 60*60;
|
||||
minutes = seconds/60; seconds %= 60;
|
||||
|
||||
char uptime[1024];
|
||||
/*
|
||||
FormatString(
|
||||
FormatString(
|
||||
FormatString(
|
||||
FormatString(
|
||||
FormatString("%days day(s) %hours:%minutes:%seconds.%useconds",
|
||||
"%days", days),
|
||||
"%hours", hours),
|
||||
"%minutes", minutes),
|
||||
"%seconds", seconds),
|
||||
"%useconds", useconds);
|
||||
*/
|
||||
std::string uptime(LNG->Uptime);
|
||||
|
||||
tokenxchg(input, dst, "@uptime", uptime);
|
||||
FormatString( FormatString( FormatString( FormatString( FormatString(
|
||||
uptime, "%days", days),
|
||||
"%hours", hours),
|
||||
"%minutes", minutes),
|
||||
"%seconds", seconds),
|
||||
"%useconds", useconds);
|
||||
|
||||
tokenxchg(input, dst, "@uptime", uptime.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -151,6 +151,10 @@ char* strcvtc(char* s);
|
||||
#define PRINTF_DECLARE_BUFFER(b) b, ARRAYSIZE(b), __FILE__, __LINE__
|
||||
int gsprintf(TCHAR* buffer, size_t sizeOfBuffer, const TCHAR* __file, int __line, const TCHAR* format, ...);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
std::string &FormatString(std::string &format, const char *token, const char *replace);
|
||||
std::string &FormatString(std::string &format, const char *token, size_t replace);
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// String tokenizer class
|
||||
|
@ -771,4 +771,30 @@ void tokenize(gstrarray &array, const TCHAR* str, const TCHAR *delim)
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
std::string &FormatString(std::string &format, const char *token, const char *replace)
|
||||
{
|
||||
size_t tokenLen = strlen(token);
|
||||
size_t pos = format.find(token);
|
||||
|
||||
for (; pos != std::string::npos; pos = format.find(token))
|
||||
{
|
||||
format.replace(pos, tokenLen, replace);
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
std::string &FormatString(std::string &format, const char *token, size_t replace)
|
||||
{
|
||||
char buff[128];
|
||||
gsprintf(PRINTF_DECLARE_BUFFER(buff), "%u", replace);
|
||||
return FormatString(format, token, buff);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user