Diff for /include/lutil.h between versions 1.63 and 1.63.2.4

version 1.63, 2006/01/03 22:12:06 version 1.63.2.4, 2007/12/03 15:04:30
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/include/lutil.h,v 1.62 2005/11/24 00:10:06 ando Exp $ */  /* $OpenLDAP: pkg/ldap/include/lutil.h,v 1.63.2.3 2007/10/01 14:39:34 hyc Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 1998-2006 The OpenLDAP Foundation.   * Copyright 1998-2007 The OpenLDAP Foundation.
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 158  typedef struct lutil_tm { Line 158  typedef struct lutil_tm {
         int tm_mon;     /* month 0-11 */          int tm_mon;     /* month 0-11 */
         int tm_year;    /* year - 1900 */          int tm_year;    /* year - 1900 */
         int tm_usec;    /* microseconds */          int tm_usec;    /* microseconds */
           int tm_usub;    /* submicro */
 } lutil_tm;  } lutil_tm;
   
 typedef struct lutil_timet {  typedef struct lutil_timet {
Line 166  typedef struct lutil_timet { Line 167  typedef struct lutil_timet {
         unsigned int tt_usec;   /* microseconds */          unsigned int tt_usec;   /* microseconds */
 } lutil_timet;  } lutil_timet;
   
   /* Parse a timestamp string into a structure */
 LDAP_LUTIL_F( int )  LDAP_LUTIL_F( int )
 lutil_parsetime LDAP_P((  lutil_parsetime LDAP_P((
         char *atm, struct lutil_tm * ));          char *atm, struct lutil_tm * ));
   
   /* Convert structured time to time in seconds since 1900 */
 LDAP_LUTIL_F( int )  LDAP_LUTIL_F( int )
 lutil_tm2time LDAP_P((  lutil_tm2time LDAP_P((
         struct lutil_tm *, struct lutil_timet * ));          struct lutil_tm *, struct lutil_timet * ));
   
   /* Get current time as a structured time */
   LDAP_LUTIL_F( void )
   lutil_gettime LDAP_P(( struct lutil_tm * ));
   
 #ifdef _WIN32  #ifdef _WIN32
 LDAP_LUTIL_F( void )  LDAP_LUTIL_F( void )
 lutil_slashpath LDAP_P(( char* path ));  lutil_slashpath LDAP_P(( char* path ));
Line 212  lutil_pair( ber_socket_t sd[2] ); Line 219  lutil_pair( ber_socket_t sd[2] );
 LDAP_LUTIL_F( size_t )  LDAP_LUTIL_F( size_t )
 lutil_uuidstr( char *buf, size_t len );  lutil_uuidstr( char *buf, size_t len );
   
   LDAP_LUTIL_F( int )
   lutil_uuidstr_from_normalized(
           char            *uuid,
           size_t          uuidlen,
           char            *buf,
           size_t          buflen );
   
 /* csn.c */  /* csn.c */
 /* use this macro to allocate buffer for lutil_csnstr */  /* use this macro to allocate buffer for lutil_csnstr */
 #define LDAP_LUTIL_CSNSTR_BUFSIZE       64  #define LDAP_LUTIL_CSNSTR_BUFSIZE       64
Line 291  lutil_atoulx( unsigned long *v, const ch Line 305  lutil_atoulx( unsigned long *v, const ch
 #define lutil_atoul(v, s)       lutil_atoulx((v), (s), 10)  #define lutil_atoul(v, s)       lutil_atoulx((v), (s), 10)
   
 LDAP_LUTIL_F (int)  LDAP_LUTIL_F (int)
   lutil_str2bin( struct berval *in, struct berval *out, void *ctx );
   
   /* Parse and unparse time intervals */
   LDAP_LUTIL_F (int)
 lutil_parse_time( const char *in, unsigned long *tp );  lutil_parse_time( const char *in, unsigned long *tp );
   
 LDAP_LUTIL_F (int)  LDAP_LUTIL_F (int)
 lutil_unparse_time( char *buf, size_t buflen, unsigned long t );  lutil_unparse_time( char *buf, size_t buflen, unsigned long t );
   
   #ifdef timerdiv
   #define lutil_timerdiv timerdiv
   #else /* ! timerdiv */
   /* works inplace (x == t) */
   #define lutil_timerdiv(t,d,x) \
           do { \
                   time_t s = (t)->tv_sec; \
                   assert( d > 0 ); \
                   (x)->tv_sec = s / d; \
                   (x)->tv_usec = ( (t)->tv_usec + 1000000 * ( s % d ) ) / d; \
           } while ( 0 )
   #endif /* ! timerdiv */
   
   #ifdef timermul
   #define lutil_timermul timermul
   #else /* ! timermul */
   /* works inplace (x == t) */
   #define lutil_timermul(t,m,x) \
           do { \
                   time_t u = (t)->tv_usec * m; \
                   assert( m > 0 ); \
                   (x)->tv_sec = (t)->tv_sec * m + u / 1000000; \
                   (x)->tv_usec = u % 1000000; \
           } while ( 0 );
   #endif /* ! timermul */
   
 LDAP_END_DECL  LDAP_END_DECL
   
 #endif /* _LUTIL_H */  #endif /* _LUTIL_H */

Removed from v.1.63  
changed lines
  Added in v.1.63.2.4


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org