Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uuid_compare(3rpc) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

uuid_compare(3rpc)  —  Subroutines

NAME

uuid_compare — Compares two UUIDs and determines their order;  used by client, server, or management applications

Synopsis

signed32 uuid_compare(
uuid_t ∗uuid1,
uuid_t ∗uuid2,
unsigned32 ∗status);

Parameters

Input

uuid1Specifies a pointer to a UUID. This UUID is compared with the UUID specified in uuid2. 

Use the value NULL to specify a nil UUID for this parameter. 

uuid2Specifies a pointer to a UUID. This UUID is compared with the UUID specified in uuid1. 

Use the value NULL to specify a nil UUID for this parameter. 

Output

statusReturns the status code from this routine.  This status code indicates whether the routine completed successfully or, if not, why not. 

Description

The uuid_compare() routine compares two UUIDs and determines their order.  A nil UUID is considered the first element in order.  The order of UUIDs is defined by the RPC architecture and is not a temporal (related to time) ordering.  Comparing two specific UUIDs always returns the same result regardless of the implementation or system architecture. 

You can use this routine to sort data with UUIDs as a key. 

Return Values

Returns one of the following constants:

−1The uuid1 parameter precedes the uuid2 parameter in order. 

 0The uuid1 parameter is equal to the uuid2 parameter in order. 

 1The uuid1 parameter follows the uuid2 parameter in order. 

Note that a value of 0 (zero) has the same meaning as if uuid_equal(&uuid1, &uuid2) returned a value of TRUE. 

A nil UUID is the first UUID in order.  This means the following:

   •If uuid1 is NULL and uuid2 is nonnil, the routine returns -1. 

   •If uuid1 is NULL and uuid2 is NULL, the routine returns 0. 

   •If uuid1 is nonnil and uuid2 is NULL, the routine returns 1. 

Errors

The following describes a partial list of errors that might be returned.  Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages. 

uuid_s_ok
Success.

uuid_s_bad_version
Bad UUID version.

Related Information

Functions: uuid_equal(3rpc), uuid_is_nil(3rpc). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026