ne_defs.h   ne_defs.h 
/* /*
Standard definitions for neon headers Standard definitions for neon headers
Copyright (C) 2003-2006, Joe Orton <joe@manyfish.co.uk> Copyright (C) 2003-2008, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
skipping to change at line 48 skipping to change at line 48
typedef off64_t ne_off_t; typedef off64_t ne_off_t;
#else #else
typedef off_t ne_off_t; typedef off_t ne_off_t;
#endif #endif
/* define ssize_t for Win32 */ /* define ssize_t for Win32 */
#if defined(WIN32) && !defined(ssize_t) #if defined(WIN32) && !defined(ssize_t)
#define ssize_t int #define ssize_t int
#endif #endif
#ifdef __NETWARE__
#include <time.h> /* for time_t */
#endif
#ifdef __GNUC__ #ifdef __GNUC__
#if __GNUC__ >= 3 #if __GNUC__ >= 3
#define ne_attribute_malloc __attribute__((malloc)) #define ne_attribute_malloc __attribute__((malloc))
#else #else
#define ne_attribute_malloc #define ne_attribute_malloc
#endif #endif
#if __GNUC__ > 3
#define ne_attribute_sentinel __attribute__((sentinel))
#else
#define ne_attribute_sentinel
#endif
#define ne_attribute(x) __attribute__(x) #define ne_attribute(x) __attribute__(x)
#else #else
#define ne_attribute(x) #define ne_attribute(x)
#define ne_attribute_malloc #define ne_attribute_malloc
#define ne_attribute_sentinel
#endif #endif
#ifndef NE_BUFSIZ #ifndef NE_BUFSIZ
#define NE_BUFSIZ 8192 #define NE_BUFSIZ 8192
#endif #endif
#endif /* NE_DEFS_H */ #endif /* NE_DEFS_H */
 End of changes. 4 change blocks. 
1 lines changed or deleted 11 lines changed or added


 ne_session.h   ne_session.h 
skipping to change at line 107 skipping to change at line 107
void ne_set_localaddr(ne_session *sess, const ne_inet_addr *addr); void ne_set_localaddr(ne_session *sess, const ne_inet_addr *addr);
/* DEPRECATED: Progress callback. */ /* DEPRECATED: Progress callback. */
typedef void (*ne_progress)(void *userdata, ne_off_t progress, ne_off_t tot al); typedef void (*ne_progress)(void *userdata, ne_off_t progress, ne_off_t tot al);
/* DEPRECATED API: Set a progress callback for the session; this is /* DEPRECATED API: Set a progress callback for the session; this is
* deprecated in favour of ne_set_notifier(). The progress callback * deprecated in favour of ne_set_notifier(). The progress callback
* is invoked for after each block of the request and response body to * is invoked for after each block of the request and response body to
* indicate request and response progress (there is no way to * indicate request and response progress (there is no way to
* distinguish between the two using this interface alone). * distinguish between the two using this interface alone).
* If progress is NULL, any existing callback is deregistered and will
* no longer be invoked.
* *
* NOTE: Use of this interface is mutually exclusive with the use of * NOTE: Use of this interface is mutually exclusive with the use of
* ne_set_notifier(). A call to ne_set_progress() removes the * ne_set_notifier(). A call to ne_set_progress() removes the
* notifier callback, and vice versa. */ * notifier callback, and vice versa. */
void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata ); void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata );
/* Store an opaque context for the session, 'priv' is returned by a /* Store an opaque context for the session, 'priv' is returned by a
* call to ne_session_get_private with the same ID. */ * call to ne_session_get_private with the same ID. */
void ne_set_session_private(ne_session *sess, const char *id, void *priv); void ne_set_session_private(ne_session *sess, const char *id, void *priv);
void *ne_get_session_private(ne_session *sess, const char *id); void *ne_get_session_private(ne_session *sess, const char *id);
skipping to change at line 151 skipping to change at line 153
* attempt is being made: */ * attempt is being made: */
const char *hostname; const char *hostname;
const ne_inet_addr *address; const ne_inet_addr *address;
} ci; } ci;
struct /* ne_status_connected, ne_status_disconnected */ { struct /* ne_status_connected, ne_status_disconnected */ {
/* The hostname to which a connection has just been /* The hostname to which a connection has just been
* established or closed: */ * established or closed: */
const char *hostname; const char *hostname;
} cd; } cd;
struct /* ne_status_sending and ne_status_recving */ { struct /* ne_status_sending and ne_status_recving */ {
/* Request/response body transfer progress; if total == -1, the /* Request/response body transfer progress; if total == -1,
* total size is unknown; else 0 <= progress <= total: */ * the total size is unknown; otherwise, total gives the total
* number of bytes which will be transferred. progress gives
* the number of bytes transferred so far. */
ne_off_t progress, total; ne_off_t progress, total;
} sr; } sr;
} ne_session_status_info; } ne_session_status_info;
/* Callback invoked to notify a new session status event, given by the /* Callback invoked to notify a new session status event, given by the
* 'status' argument. On invocation, the contents of exactly one of * 'status' argument. On invocation, the contents of exactly one of
* the structures in the info union will be valid, as indicated * the structures in the info union will be valid, as indicated
* above. */ * above. */
typedef void (*ne_notify_status)(void *userdata, ne_session_status status, typedef void (*ne_notify_status)(void *userdata, ne_session_status status,
const ne_session_status_info *info); const ne_session_status_info *info);
/* Set a status notification callback for the session, to report /* Set a status notification callback for the session, to report
* session status events. Only one notification callback per session * session status events. Only one notification callback per session
* can be registered; the most recent of successive calls to this * can be registered; the most recent of successive calls to this
* function takes effect. * function takes effect. If status is NULL, any existing callback
* is deregistered and will no longer be invoked.
* *
* NOTE: Use of this interface is mutually exclusive with the use of * NOTE: Use of this interface is mutually exclusive with the use of
* ne_set_progress(). A call to ne_set_notifier() removes the * ne_set_progress(). A call to ne_set_notifier() removes the
* progress callback, and vice versa. */ * progress callback, and vice versa. */
void ne_set_notifier(ne_session *sess, ne_notify_status status, void *userd ata); void ne_set_notifier(ne_session *sess, ne_notify_status status, void *userd ata);
/* Certificate verification failures. /* Certificate verification failures.
* The certificate is not yet valid: */ * The certificate is not yet valid: */
#define NE_SSL_NOTYETVALID (0x01) #define NE_SSL_NOTYETVALID (0x01)
/* The certificate has expired: */ /* The certificate has expired: */
 End of changes. 3 change blocks. 
3 lines changed or deleted 8 lines changed or added


 ne_string.h   ne_string.h 
/* /*
String utility functions String utility functions
Copyright (C) 1999-2007, Joe Orton <joe@manyfish.co.uk> Copyright (C) 1999-2008, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
skipping to change at line 83 skipping to change at line 83
/* Create a new string buffer object with at least 'size' bytes of /* Create a new string buffer object with at least 'size' bytes of
* allocated space. */ * allocated space. */
ne_buffer *ne_buffer_ncreate(size_t size); ne_buffer *ne_buffer_ncreate(size_t size);
/* Returns size of data in buffer, equiv to strlen(ne_buffer_data(buf)) */ /* Returns size of data in buffer, equiv to strlen(ne_buffer_data(buf)) */
#define ne_buffer_size(buf) ((buf)->used - 1) #define ne_buffer_size(buf) ((buf)->used - 1)
/* Concatenate all given strings onto the end of the buffer. The /* Concatenate all given strings onto the end of the buffer. The
* strings must all be NUL-terminated, and MUST be followed by a NULL * strings must all be NUL-terminated, and MUST be followed by a NULL
* argument marking the end of the list. */ * argument marking the end of the list. */
void ne_buffer_concat(ne_buffer *buf, ...); void ne_buffer_concat(ne_buffer *buf, ...)
ne_attribute_sentinel;
/* Append a NUL-terminated string 'str' to buf. */ /* Append a NUL-terminated string 'str' to buf. */
void ne_buffer_zappend(ne_buffer *buf, const char *str); void ne_buffer_zappend(ne_buffer *buf, const char *str);
/* Append 'len' bytes of 'data' to buf, where 'data' does not contain /* Append 'len' bytes of 'data' to buf, where 'data' does not contain
* a NUL terminator. (A NUL terminator is appended to buf) */ * a NUL terminator. (A NUL terminator is appended to buf) */
void ne_buffer_append(ne_buffer *buf, const char *data, size_t len); void ne_buffer_append(ne_buffer *buf, const char *data, size_t len);
/* Print a string to the end of the buffer using printf-style format /* Print a string to the end of the buffer using printf-style format
* string 'format' and subsqeuent arguments. At most 'max' characters * string 'format' and subsqeuent arguments. At most 'max' characters
skipping to change at line 138 skipping to change at line 139
* 'buffer'. */ * 'buffer'. */
char *ne_strerror(int errnum, char *buffer, size_t buflen); char *ne_strerror(int errnum, char *buffer, size_t buflen);
/* ne_strnzcpy copies at most 'n'-1 bytes of 'src' to 'dest', and /* ne_strnzcpy copies at most 'n'-1 bytes of 'src' to 'dest', and
* ensures that 'dest' is subsequently NUL-terminated. */ * ensures that 'dest' is subsequently NUL-terminated. */
#define ne_strnzcpy(dest, src, n) do { size_t ne__nm1 = (n) - 1; \ #define ne_strnzcpy(dest, src, n) do { size_t ne__nm1 = (n) - 1; \
strncpy(dest, src, ne__nm1); dest[ne__nm1] = '\0'; } while (0) strncpy(dest, src, ne__nm1); dest[ne__nm1] = '\0'; } while (0)
/* Return malloc-allocated concatenation of all NUL-terminated string /* Return malloc-allocated concatenation of all NUL-terminated string
* arguments, up to a terminating NULL pointer. */ * arguments, up to a terminating NULL pointer. */
char *ne_concat(const char *str, ...); char *ne_concat(const char *str, ...)
ne_attribute_sentinel;
/* Wrapper for snprintf: always NUL-terminates returned buffer, and /* Wrapper for snprintf: always NUL-terminates returned buffer, and
* returns strlen(str). */ * returns strlen(str). */
size_t ne_snprintf(char *str, size_t size, const char *fmt, ...) size_t ne_snprintf(char *str, size_t size, const char *fmt, ...)
ne_attribute((format(printf, 3, 4))); ne_attribute((format(printf, 3, 4)));
/* Wrapper for vsnprintf. */ /* Wrapper for vsnprintf. */
size_t ne_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) size_t ne_vsnprintf(char *str, size_t size, const char *fmt, va_list ap)
ne_attribute((format(printf, 3, 0))); ne_attribute((format(printf, 3, 0)));
 End of changes. 3 change blocks. 
3 lines changed or deleted 5 lines changed or added


 ne_uri.h   ne_uri.h 
/* /*
URI manipulation routines. URI manipulation routines.
Copyright (C) 1999-2006, Joe Orton <joe@manyfish.co.uk> Copyright (C) 1999-2008, Joe Orton <joe@manyfish.co.uk>
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version. version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
skipping to change at line 68 skipping to change at line 68
typedef struct { typedef struct {
char *scheme; char *scheme;
char *host, *userinfo; char *host, *userinfo;
unsigned int port; unsigned int port;
char *path, *query, *fragment; char *path, *query, *fragment;
} ne_uri; } ne_uri;
/* Parse a URI-reference 'uri' and place parsed components in *parsed. /* Parse a URI-reference 'uri' and place parsed components in *parsed.
* Returns zero on success, non-zero on parse error. On successful or * Returns zero on success, non-zero on parse error. On successful or
* error return, all the 'char *' fields of *parsed are either set to * error return, all the 'char *' fields of *parsed are either set to
* NULL, or point to malloc-allocated NUL-terminated strings. * NULL, or point to malloc-allocated NUL-terminated strings;
* ne_uri_free can be used to free the structure after use. */ * ne_uri_free can be used to free any set fields. On success,
* parsed->path is guaranteed to be non-NULL. */
int ne_uri_parse(const char *uri, ne_uri *parsed); int ne_uri_parse(const char *uri, ne_uri *parsed);
/* Turns a URI structure back into a string. The returned string is /* Turns a URI structure back into a string. The returned string is
* malloc-allocated, and must be freed by the caller. */ * malloc-allocated, and must be freed by the caller. */
char *ne_uri_unparse(const ne_uri *uri); char *ne_uri_unparse(const ne_uri *uri);
/* Resolve a relative URI 'relative', with respect to base URI 'base', /* Resolve a relative URI 'relative', with respect to base URI 'base',
* placing the resultant URI in '*result'. On return, all the 'char * placing the resultant URI in '*result'. At least both base->path
* *' fields of *result are either set to NULL or point to * and relative->path must be non-NULL. On return, all the 'char *'
* malloc-allocated NUL-terminated strings. ne_uri_free can be used * fields of *result are either set to NULL or point to
* to free the structure after use. Returns 'result'. */ * malloc-allocated NUL-terminated strings. result->path is
* guaranteed to be non-NULL. ne_uri_free can be used to free the
* result structure after use. Returns 'result'. */
ne_uri *ne_uri_resolve(const ne_uri *base, const ne_uri *relative, ne_uri *ne_uri_resolve(const ne_uri *base, const ne_uri *relative,
ne_uri *result); ne_uri *result);
/* Compares URIs u1 and u2, returns non-zero if they are found to be /* Compares URIs u1 and u2, returns non-zero if they are found to be
* non-equal. The sign of the return value is <0 if 'u1' is less than * non-equal. The sign of the return value is <0 if 'u1' is less than
* 'u2', or >0 if 'u2' is greater than 'u1'. */ * 'u2', or >0 if 'u2' is greater than 'u1'. */
int ne_uri_cmp(const ne_uri *u1, const ne_uri *u2); int ne_uri_cmp(const ne_uri *u1, const ne_uri *u2);
/* Copy components of URI 'src' to destination 'dest'. Returns /* Copy components of URI 'src' to destination 'dest'. Returns
* 'dest'. */ * 'dest'. */
 End of changes. 3 change blocks. 
7 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/