OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/uuid.h.in versions 1.3 and 1.4
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/uuid.h.in 1.3 -> 1.4

--- uuid.h.in    2004/01/19 13:48:30     1.3
+++ uuid.h.in    2004/01/19 14:11:50     1.4
@@ -33,72 +33,72 @@
 /* required system headers */
 #include <string.h>
 
-/* OSSP uuid version (compile-time information) */
-#define UUID_VERSION @UUID_VERSION_HEX@
-
 /* minimum C++ support */
 #ifdef __cplusplus
 #define DECLARATION_BEGIN extern "C" {
 #define DECLARATION_END   }
 #else
-#define DECLARATION_BEGIN /*nop*/
-#define DECLARATION_END   /*nop*/
+#define DECLARATION_BEGIN
+#define DECLARATION_END
 #endif
 
 DECLARATION_BEGIN
 
+/* OSSP uuid version (compile-time information) */
+#define UUID_VERSION  @UUID_VERSION_HEX@
+
 /* encoding octet stream lengths */
-#define UUID_LEN_BIN (128 / 8 /*bytes*/)
-#define UUID_LEN_STR (128 / 4 /*nibbles*/ + 4 /*hyphens*/)
+#define UUID_LEN_BIN  (128 /*bit*/ / 8 /*bytes*/)
+#define UUID_LEN_STR  (128 /*bit*/ / 4 /*nibbles*/ + 4 /*hyphens*/)
 
-/* return codes */
+/* API return codes */
 typedef enum {
-    UUID_RC_OK  = 0,
-    UUID_RC_ARG = 1,
-    UUID_RC_MEM = 2,
-    UUID_RC_SYS = 3,
-    UUID_RC_INT = 4,
-    UUID_RC_IMP = 5
+    UUID_RC_OK   = 0,        /* everything ok    */
+    UUID_RC_ARG  = 1,        /* invalid argument */
+    UUID_RC_MEM  = 2,        /* out of memory    */
+    UUID_RC_SYS  = 3,        /* system error     */
+    UUID_RC_INT  = 4,        /* internal error   */
+    UUID_RC_IMP  = 5         /* not implemented  */
 } uuid_rc_t;
 
-/* generation mode flags */
+/* UUID make modes */
 enum {
-    UUID_VERSION1      = (1 << 0),
-    UUID_VERSION3      = (1 << 1),
-    UUID_VERSION4      = (1 << 2),
-    UUID_MCASTRND      = (1 << 3)
+    UUID_MAKE_V1 = (1 << 0), /* DCE 1.1 v1 UUID */
+    UUID_MAKE_V3 = (1 << 1), /* DCE 1.1 v3 UUID */
+    UUID_MAKE_V4 = (1 << 2), /* DCE 1.1 v4 UUID */
+    UUID_MAKE_MC = (1 << 3)  /* enforce multi-cast MAC address */
 };
 
-/* import/export formats */
+/* UUID import/export formats */
 typedef enum {
-    UUID_FMT_BIN = 0, /* import/export */
-    UUID_FMT_STR = 1, /* import/export */
-    UUID_FMT_TXT = 2  /* export only */
+    UUID_FMT_BIN = 0,        /* binary representation (import/export) */
+    UUID_FMT_STR = 1,        /* string representation (import/export) */
+    UUID_FMT_TXT = 2         /* textual description   (export only)   */
 } uuid_fmt_t;
 
-/* abstract data type */
+/* UUID abstract data type */
 struct uuid_st;
 typedef struct uuid_st uuid_t;
 
-/* object handling */
-extern uuid_rc_t  uuid_create   (uuid_t **_uuid);
-extern uuid_rc_t  uuid_destroy  (uuid_t  *_uuid);
+/* UUID object handling */
+extern uuid_rc_t     uuid_create   (uuid_t **_uuid);
+extern uuid_rc_t     uuid_destroy  (uuid_t  *_uuid);
 
 /* UUID generation */
-extern uuid_rc_t  uuid_load     (uuid_t  *_uuid, const char *_name);
-extern uuid_rc_t  uuid_make     (uuid_t  *_uuid, unsigned int _mode, ...);
+extern uuid_rc_t     uuid_load     (uuid_t  *_uuid, const char *_name);
+extern uuid_rc_t     uuid_make     (uuid_t  *_uuid, unsigned int _mode, ...);
 
 /* UUID comparison */
-extern uuid_rc_t  uuid_isnil    (uuid_t  *_uuid,                 int *_result);
-extern uuid_rc_t  uuid_compare  (uuid_t  *_uuid, uuid_t *_uuid2, int *_result);
+extern uuid_rc_t     uuid_isnil    (uuid_t  *_uuid,                 int *_result);
+extern uuid_rc_t     uuid_compare  (uuid_t  *_uuid, uuid_t *_uuid2, int *_result);
 
 /* UUID import/export */
-extern uuid_rc_t  uuid_import   (uuid_t  *_uuid, uuid_fmt_t _fmt, const void  *_data_ptr, size_t  _data_len);
-extern uuid_rc_t  uuid_export   (uuid_t  *_uuid, uuid_fmt_t _fmt,       void **_data_ptr, size_t *_data_len);
+extern uuid_rc_t     uuid_import   (uuid_t  *_uuid, uuid_fmt_t _fmt, const void  *_data_ptr, size_t  _data_len);
+extern uuid_rc_t     uuid_export   (uuid_t  *_uuid, uuid_fmt_t _fmt,       void **_data_ptr, size_t *_data_len);
 
-/* library error handling */
-extern char      *uuid_error    (uuid_rc_t _rc);
-extern unsigned long uuid_version (void);
+/* library utilities */
+extern char         *uuid_error    (uuid_rc_t _rc);
+extern unsigned long uuid_version  (void);
 
 DECLARATION_END
 

CVSTrac 2.0.1