LibreOffice Module onlineupdate (master) 1
Classes | Namespaces | Functions
nsVersionComparator.cxx File Reference
#include "nsVersionComparator.h"
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
Include dependency graph for nsVersionComparator.cxx:

Go to the source code of this file.

Classes

struct  VersionPart
 

Namespaces

namespace  mozilla
 Compares two VersionParts.
 

Functions

static char * ParseVP (char *aPart, VersionPart &aResult)
 Parse a version part into a number and "extra text". More...
 
static int32_t ns_strcmp (const char *aStr1, const char *aStr2)
 Parse a version part into a number and "extra text". More...
 
static int32_t ns_strnncmp (const char *aStr1, uint32_t aLen1, const char *aStr2, uint32_t aLen2)
 
static int32_t ns_cmp (int32_t aNum1, int32_t aNum2)
 
static int32_t CompareVP (VersionPart &aVer1, VersionPart &aVer2)
 Compares two VersionParts. More...
 
int32_t mozilla::CompareVersions (const char *aStrA, const char *aStrB)
 

Function Documentation

◆ CompareVP()

static int32_t CompareVP ( VersionPart aVer1,
VersionPart aVer2 
)
static

◆ ns_cmp()

static int32_t ns_cmp ( int32_t  aNum1,
int32_t  aNum2 
)
static

Definition at line 271 of file nsVersionComparator.cxx.

Referenced by CompareVP().

◆ ns_strcmp()

static int32_t ns_strcmp ( const char *  aStr1,
const char *  aStr2 
)
static

Parse a version part into a number and "extra text".

Returns
A pointer to the next versionpart, or null if none.

Definition at line 219 of file nsVersionComparator.cxx.

Referenced by CompareVP().

◆ ns_strnncmp()

static int32_t ns_strnncmp ( const char *  aStr1,
uint32_t  aLen1,
const char *  aStr2,
uint32_t  aLen2 
)
static

Definition at line 236 of file nsVersionComparator.cxx.

Referenced by CompareVP().

◆ ParseVP()

static char * ParseVP ( char *  aPart,
VersionPart aResult 
)
static

Parse a version part into a number and "extra text".

Returns
A pointer to the next versionpart, or null if none.

Definition at line 53 of file nsVersionComparator.cxx.

References VersionPart::extraD, VersionPart::numA, VersionPart::numC, VersionPart::strB, and VersionPart::strBlen.

Referenced by mozilla::CompareVersions().