*
* @param csync The context variable to allocate.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_create(CSYNC **csync, const char *local, const char *remote);
*
* @param ctx The context to initialize.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_init(CSYNC *ctx);
*
* @param ctx The context to run the update detection on.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_update(CSYNC *ctx);
*
* @param ctx The context to run the reconciliation on.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_reconcile(CSYNC *ctx);
*
* @param ctx The context to commit.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_commit(CSYNC *ctx);
*
* @param ctx The context to destroy.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_destroy(CSYNC *ctx);
*
* @param path The path pointing to the file.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_add_exclude_list(CSYNC *ctx, const char *path);
* @param ctx The csync context.
*
* @return The userdata saved in the context, NULL if an error
- * occured.
+ * occurred.
*/
void *csync_get_userdata(CSYNC *ctx);
*
* @param userdata The userdata to be stored in the context.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_set_userdata(CSYNC *ctx, void *userdata);
* @param ctx The csync context.
*
* @return The authentication callback set or NULL if an error
- * occured.
+ * occurred.
*/
csync_auth_callback csync_get_auth_callback(CSYNC *ctx);
*
* @param cb The authentication callback.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_set_auth_callback(CSYNC *ctx, csync_auth_callback cb);
*
* @param[in] level The log verbosity.
*
- * @return 0 on success, < 0 if an error occured.
+ * @return 0 on success, < 0 if an error occurred.
*/
int csync_set_log_level(int level);
* @brief Get the logging callback set.
*
* @return The logging callback set or NULL if an error
- * occured.
+ * occurred.
*/
csync_log_callback csync_get_log_callback(void);
*
* @param cb The logging callback.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_set_log_callback(csync_log_callback cb);
*
* @param[in] data The userdata to set.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_set_log_userdata(void *data);
* @param visitor A callback function to handle the file info.
* @param filter A filter, built from or'ed csync_instructions_e
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_walk_local_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter);
* @param visitor A callback function to handle the file info.
* @param filter A filter, built from and'ed csync_instructions_e
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int csync_walk_remote_tree(CSYNC *ctx, csync_treewalk_visit_func *visitor, int filter);
* @param data_compare Callback function to compare a key as data with thee
* data inside a red-black tree node.
*
- * @return 0 on success, -1 if an error occured with errno set.
+ * @return 0 on success, -1 if an error occurred with errno set.
*/
int c_rbtree_create(c_rbtree_t **rbtree, c_rbtree_compare_func *key_compare, c_rbtree_compare_func *data_compare);
* @param tree Tree to duplicate.
*
* @return Pointer to a new allocated duplicated rbtree. NULL if an error
- * occured.
+ * occurred.
*/
c_rbtree_t *c_rbtree_dup(const c_rbtree_t *tree);
*
* @param tree The tree to free.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int c_rbtree_free(c_rbtree_t *tree);
* @param data The data to insert into the tree.
*
* @return 0 on success, 1 if a duplicate has been found and < 0 if an error
- * occured with errno set.
+ * occurred with errno set.
* EINVAL if a null pointer has been passed as the tree.
* ENOMEM if there is no memory left.
*/
*
* @param tree The tree to get the head for.
*
- * @return The head node. NULL if an error occured.
+ * @return The head node. NULL if an error occurred.
*/
c_rbnode_t *c_rbtree_head(c_rbtree_t *tree);
*
* @param tree The tree to get the tail for.
*
- * @return The tail node. NULL if an error occured.
+ * @return The tail node. NULL if an error occurred.
*/
c_rbnode_t *c_rbtree_tail(c_rbtree_t *tree);
* @param data Data which should be passed to the visitor function.
* @param visitor Visitor function. This will be called for each node passed.
*
- * @return 0 on sucess, less than 0 if an error occured.
+ * @return 0 on sucess, less than 0 if an error occurred.
*/
int c_rbtree_walk(c_rbtree_t *tree, void *data, c_rbtree_visit_func *visitor);
*
* @param node Node which should be deleted.
*
- * @return 0 on success, -1 if an error occured.
+ * @return 0 on success, -1 if an error occurred.
*/
int c_rbtree_node_delete(c_rbnode_t *node);
*
* @param node The node of which you want the next node.
*
- * @return The next node, NULL if an error occured.
+ * @return The next node, NULL if an error occurred.
*/
c_rbnode_t *c_rbtree_node_next(c_rbnode_t *node);
*
* @param node The node of which you want the previous node.
*
- * @return The previous node, NULL if an error occured.
+ * @return The previous node, NULL if an error occurred.
*/
c_rbnode_t *c_rbtree_node_prev(c_rbnode_t *node);
*
* @param N The node to get the data from.
*
- * @return The data, NULL if an error occured.
+ * @return The data, NULL if an error occurred.
*/
#define c_rbtree_node_data(N) ((N) ? ((N)->data) : NULL)
*
* @param tree The tree to check.
*
- * @return 0 on success, less than 0 if an error occured.
+ * @return 0 on success, less than 0 if an error occurred.
*/
int c_rbtree_check_sanity(c_rbtree_t *tree);