rofi  1.7.0
history.c File Reference
#include "history.h"
#include "rofi.h"
#include "settings.h"
#include <errno.h>
#include <glib.h>
#include <glib/gstdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
Include dependency graph for history.c:

Go to the source code of this file.

Data Structures

struct  __element
 

Typedefs

typedef struct __element _element
 

Functions

static int __element_sort_func (const void *ea, const void *eb, void *data __attribute__((unused)))
 
static void __history_write_element_list (FILE *fd, _element **list, unsigned int length)
 
static char ** __history_get_element_list_fields (FILE *fd, unsigned int *length)
 
static _element ** __history_get_element_list (FILE *fd, unsigned int *length)
 
void history_set (const char *filename, const char *entry)
 
void history_remove (const char *filename, const char *entry)
 
char ** history_get_list (const char *filename, unsigned int *length)
 

Typedef Documentation

◆ _element

typedef struct __element _element

History element

Function Documentation

◆ __element_sort_func()

static int __element_sort_func ( const void *  ea,
const void *  eb,
void *data   __attribute__(unused) 
)
static

Definition at line 50 of file history.c.

References __element::index.

Referenced by __history_write_element_list().

Here is the caller graph for this function:

◆ __history_get_element_list()

static _element** __history_get_element_list ( FILE *  fd,
unsigned int *  length 
)
static

Definition at line 123 of file history.c.

References __element::index, and __element::name.

Referenced by history_remove(), and history_set().

Here is the caller graph for this function:

◆ __history_get_element_list_fields()

static char** __history_get_element_list_fields ( FILE *  fd,
unsigned int *  length 
)
static

Definition at line 79 of file history.c.

Referenced by history_get_list().

Here is the caller graph for this function:

◆ __history_write_element_list()

static void __history_write_element_list ( FILE *  fd,
_element **  list,
unsigned int  length 
)
static

Definition at line 57 of file history.c.

References __element_sort_func(), config, __element::index, and Settings::max_history_size.

Referenced by history_remove(), and history_set().

Here is the call graph for this function:
Here is the caller graph for this function: