michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:set ts=2 sw=2 sts=2 et cindent: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef READSTRINGS_H__ michael@0: #define READSTRINGS_H__ michael@0: michael@0: #include "mozilla/NullPtr.h" michael@0: michael@0: #define MAX_TEXT_LEN 600 michael@0: michael@0: #ifdef XP_WIN michael@0: # include michael@0: typedef WCHAR NS_tchar; michael@0: #else michael@0: typedef char NS_tchar; michael@0: #endif michael@0: michael@0: #ifndef NULL michael@0: #define NULL 0 michael@0: #endif michael@0: michael@0: struct StringTable michael@0: { michael@0: char title[MAX_TEXT_LEN]; michael@0: char info[MAX_TEXT_LEN]; michael@0: }; michael@0: michael@0: /** michael@0: * This function reads in localized strings from updater.ini michael@0: */ michael@0: int ReadStrings(const NS_tchar *path, StringTable *results); michael@0: michael@0: /** michael@0: * This function reads in localized strings corresponding to the keys from a given .ini michael@0: */ michael@0: int ReadStrings(const NS_tchar *path, michael@0: const char *keyList, michael@0: unsigned int numStrings, michael@0: char results[][MAX_TEXT_LEN], michael@0: const char *section = nullptr); michael@0: michael@0: #endif // READSTRINGS_H__