Changeset 6504 for trunk/licq
- Timestamp:
- 09/06/08 03:43:24 (3 months ago)
- Location:
- trunk/licq
- Files:
-
- 3 modified
-
include/licq_file.h (modified) (3 diffs)
-
src/file.cpp (modified) (2 diffs)
-
src/user.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_file.h
r6503 r6504 60 60 bool CreateSection(const char *_szSectionName); 61 61 bool ReadStr(const std::string& Key, char* data, const char* defValue = NULL, bool trim = true, int maxLength = 0); 62 bool ReadNum(const std::string& key, unsigned long &data, unsigned long defValue = 0); 63 bool ReadNum(const std::string& key, signed long &data, signed long defValue = 0); 62 64 bool ReadNum(const std::string& key, unsigned int &data, unsigned int defValue = 0); 63 65 bool ReadNum(const std::string& key, signed int &data, signed int defValue = 0); … … 68 70 69 71 bool WriteStr(const std::string& key, const char* data); 72 bool WriteNum(const std::string& key, unsigned long data); 73 bool WriteNum(const std::string& key, signed long data); 70 74 bool WriteNum(const std::string& key, unsigned int data); 71 75 bool WriteNum(const std::string& key, signed int data); … … 77 81 int Error() { return (m_nError); } 78 82 const char *FileName() { return m_szFilename; } 79 80 // Long differs in size between 32 bit systems and 64 bit systems so int81 // should be used instead. This function is kept to keep old code working but82 // since it is unlikely that we need to save any 64 bit integers these83 // function is declared as deprecated.84 LICQ_DEPRECATED bool ReadNum(const std::string& key, unsigned long &data, unsigned long defValue = 0);85 LICQ_DEPRECATED bool WriteNum(const std::string& key, unsigned long data);86 83 87 84 protected: -
trunk/licq/src/file.cpp
r6503 r6504 709 709 710 710 MAKE_READNUM(unsigned long, strtoul(strData, (char**)NULL, 10)) 711 MAKE_READNUM(signed long, strtoul(strData, (char**)NULL, 10)) 711 712 MAKE_READNUM(unsigned int, strtoul(strData, (char**)NULL, 10)) 712 713 MAKE_READNUM(signed int, atoi(strData)) … … 849 850 850 851 MAKE_WRITENUM(unsigned long, "%lu") 852 MAKE_WRITENUM(signed long, "%lu") 851 853 MAKE_WRITENUM(unsigned int, "%u") 852 854 MAKE_WRITENUM(signed int, "%i") -
trunk/licq/src/user.cpp
r6473 r6504 3927 3927 m_fConf.ReadNum("RCG", m_nRandomChatGroup, ICQ_RANDOMxCHATxGROUP_NONE); 3928 3928 m_fConf.ReadStr("AutoResponse", szTemp, ""); 3929 m_fConf.ReadNum("SSTime", (unsigned long&)m_nSSTime, 0L);3929 m_fConf.ReadNum("SSTime", m_nSSTime, 0L); 3930 3930 m_fConf.ReadNum("SSCount", m_nSSCount, 0); 3931 3931 m_fConf.ReadNum("PDINFO", m_nPDINFO, 0);
