LibreOffice Module onlineupdate (master) 1
Classes | Macros | Functions
readstrings.h File Reference
#include "types.hxx"
Include dependency graph for readstrings.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  StringTable
 

Macros

#define MAX_TEXT_LEN   600
 

Functions

int ReadStrings (const NS_tchar *path, StringTable *results)
 This function reads in localized strings from updater.ini. More...
 
int ReadStrings (const NS_tchar *path, const char *keyList, unsigned int numStrings, char results[][MAX_TEXT_LEN], const char *section=nullptr)
 This function reads in localized strings corresponding to the keys from a given .ini. More...
 

Macro Definition Documentation

◆ MAX_TEXT_LEN

#define MAX_TEXT_LEN   600

Definition at line 10 of file readstrings.h.

Function Documentation

◆ ReadStrings() [1/2]

int ReadStrings ( const NS_tchar path,
const char *  keyList,
unsigned int  numStrings,
char  results[][MAX_TEXT_LEN],
const char *  section 
)

This function reads in localized strings corresponding to the keys from a given .ini.

This function reads in localized strings corresponding to the keys from a given .ini.

Parameters
pathPath to the .ini file to read
keyListList of zero-delimited keys ending with two zero characters
numStringsNumber of strings to read into results buffer - must be equal to the number of keys
resultsTwo-dimensional array of strings to be filled in the same order as the keys provided
sectionOptional name of the section to read; defaults to "Strings"

Definition at line 152 of file readstrings.cxx.

References find_key(), kEquals, kNL, kRBracket, kWhitespace, MAX_TEXT_LEN, NS_strspnp(), NS_strtok(), NS_tfopen, OK, OPEN_MODE, PARSE_ERROR, READ_ERROR, READ_STRINGS_MEM_ERROR, and section.

Referenced by LaunchMacPostProcess(), ReadMaintenanceServiceStrings(), ReadStrings(), and ShowProgressUI().

◆ ReadStrings() [2/2]

int ReadStrings ( const NS_tchar path,
StringTable results 
)

This function reads in localized strings from updater.ini.

Definition at line 253 of file readstrings.cxx.

References StringTable::info, MAX_TEXT_LEN, ReadStrings(), result, and StringTable::title.