Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uuid_compare(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

uuid_equal(3)

uuid_is_nil(3)

uuid_compare(3)  —  Subroutines

NAME

uuid_compare - Compares two UUIDs and determines their order

Used by client, server, or management applications. 

SYNOPSIS

#include <dce/uuid.h>
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 argument. 

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 argument. 

Output

statusReturns the status code from this routine.  This status code indicates whether the routine completed successfully or, if not, why not.  The possible status codes and their meanings are as follows:

uuid_s_okSuccess. 

uuid_s_bad_version
Bad UUID version.

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. 

−1uuid1 precedes uuid2 in order. 

 0uuid1 is equal to uuid2 in order. 

 1uuid1 follows uuid2 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 non-nil, routine returns -1. 

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

       •If uuid1 is non-nil and uuid2 is NULL, routine returns 1. 

RELATED INFORMATION

Functions: uuid_equal(3), uuid_is_nil(3)

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