ELinks 0.18.0
xbel.c File Reference
#include <ctype.h>
#include <errno.h>
#include <expat.h>
#include <stdio.h>
#include <stdlib.h>
#include "elinks.h"
#include "bfu/dialog.h"
#include "bookmarks/bookmarks.h"
#include "bookmarks/backend/common.h"
#include "bookmarks/backend/xbel.h"
#include "intl/charsets.h"
#include "intl/libintl.h"
#include "util/conv.h"
#include "util/lists.h"
#include "util/string.h"
Include dependency graph for xbel.c:

Data Structures

struct  attributes
 
struct  read_bookmarks_xbel
 
struct  tree_node
 

Macros

#define BOOKMARKS_XBEL_FILENAME   "bookmarks.xbel"
 

Functions

static void on_element_open (void *data, const char *name, const char **attr)
 
static void on_element_close (void *data, const char *name)
 
static void on_text (void *data, const XML_Char *text, int len)
 
static struct tree_nodenew_node (struct tree_node *parent)
 
static void free_node (struct tree_node *node)
 
static void free_xbeltree (struct tree_node *node)
 
static struct tree_nodeget_child (struct tree_node *node, const char *name)
 
static char * get_attribute_value (struct tree_node *node, const char *name)
 
static void read_bookmarks_xbel (FILE *f)
 
static const char * filename_bookmarks_xbel (int writing)
 
static int xbeltree_to_bookmarks_list (const struct read_bookmarks_xbel *preload, struct tree_node *root, struct bookmark *current_parent)
 
static void write_bookmarks_list (struct secure_save_info *ssi, struct bookmark list *bookmarks_list, int n, int folder_state)
 
static void write_bookmarks_xbel (struct secure_save_info *ssi, struct bookmark list *bookmarks_list)
 
static void write_bookmarks_xbel (struct secure_save_info *ssi, struct bookmarks list *bookmarks_list)
 
static void indentation (struct secure_save_info *ssi, int num)
 
static void print_xml_entities (struct secure_save_info *ssi, const char *str)
 
static char * delete_whites (const char *s)
 

Variables

static struct tree_noderoot_node = NULL
 
static struct tree_nodecurrent_node = NULL
 
static int readok = 1
 
struct bookmarks_backend xbel_bookmarks_backend
 

Macro Definition Documentation

◆ BOOKMARKS_XBEL_FILENAME

#define BOOKMARKS_XBEL_FILENAME   "bookmarks.xbel"

Function Documentation

◆ delete_whites()

static char * delete_whites ( const char * s)
static

◆ filename_bookmarks_xbel()

static const char * filename_bookmarks_xbel ( int writing)
static

◆ free_node()

static void free_node ( struct tree_node * node)
static

◆ free_xbeltree()

static void free_xbeltree ( struct tree_node * node)
static

◆ get_attribute_value()

static char * get_attribute_value ( struct tree_node * node,
const char * name )
static

◆ get_child()

static struct tree_node * get_child ( struct tree_node * node,
const char * name )
static

◆ indentation()

static void indentation ( struct secure_save_info * ssi,
int num )
static

◆ new_node()

static struct tree_node * new_node ( struct tree_node * parent)
static

◆ on_element_close()

static void on_element_close ( void * data,
const char * name )
static

◆ on_element_open()

static void on_element_open ( void * data,
const char * name,
const char ** attr )
static

◆ on_text()

static void on_text ( void * data,
const XML_Char * text,
int len )
static

◆ print_xml_entities()

static void print_xml_entities ( struct secure_save_info * ssi,
const char * str )
static

◆ read_bookmarks_xbel()

static void read_bookmarks_xbel ( FILE * f)
static

◆ write_bookmarks_list()

static void write_bookmarks_list ( struct secure_save_info * ssi,
struct bookmark list * bookmarks_list,
int n,
int folder_state )
static

◆ write_bookmarks_xbel() [1/2]

static void write_bookmarks_xbel ( struct secure_save_info * ssi,
struct bookmark list * bookmarks_list )
static

◆ write_bookmarks_xbel() [2/2]

static void write_bookmarks_xbel ( struct secure_save_info * ssi,
struct bookmarks list * bookmarks_list )
static

◆ xbeltree_to_bookmarks_list()

static int xbeltree_to_bookmarks_list ( const struct read_bookmarks_xbel * preload,
struct tree_node * root,
struct bookmark * current_parent )
static

Variable Documentation

◆ current_node

struct tree_node* current_node = NULL
static

◆ readok

int readok = 1
static

◆ root_node

struct tree_node* root_node = NULL
static

◆ xbel_bookmarks_backend

struct bookmarks_backend xbel_bookmarks_backend
Initial value:
= {
}
static void read_bookmarks_xbel(FILE *f)
Definition xbel.c:93
static const char * filename_bookmarks_xbel(int writing)
Definition xbel.c:169
static void write_bookmarks_xbel(struct secure_save_info *ssi, struct bookmark list *bookmarks_list)