mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
move TEXT_BUFFER_META_REC -> LINE_INFO_META_REC
This commit is contained in:
parent
9677b07488
commit
8d314eadf1
@ -67,6 +67,11 @@ typedef struct _TEXT_DEST_REC {
|
|||||||
GHashTable *meta;
|
GHashTable *meta;
|
||||||
} TEXT_DEST_REC;
|
} TEXT_DEST_REC;
|
||||||
|
|
||||||
|
typedef struct _LINE_INFO_META_REC {
|
||||||
|
gint64 server_time;
|
||||||
|
GHashTable *hash;
|
||||||
|
} LINE_INFO_META_REC;
|
||||||
|
|
||||||
#define window_get_theme(window) \
|
#define window_get_theme(window) \
|
||||||
(window != NULL && (window)->theme != NULL ? \
|
(window != NULL && (window)->theme != NULL ? \
|
||||||
(window)->theme : current_theme)
|
(window)->theme : current_theme)
|
||||||
|
@ -102,7 +102,7 @@ static void format_rec_set_dest(TEXT_BUFFER_FORMAT_REC *rec, const TEXT_DEST_REC
|
|||||||
rec->flags = dest->flags & ~PRINT_FLAG_FORMAT;
|
rec->flags = dest->flags & ~PRINT_FLAG_FORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void textbuffer_meta_rec_free(TEXT_BUFFER_META_REC *rec)
|
void textbuffer_meta_rec_free(LINE_INFO_META_REC *rec)
|
||||||
{
|
{
|
||||||
if (rec == NULL)
|
if (rec == NULL)
|
||||||
return;
|
return;
|
||||||
@ -113,7 +113,7 @@ void textbuffer_meta_rec_free(TEXT_BUFFER_META_REC *rec)
|
|||||||
g_free(rec);
|
g_free(rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void meta_hash_create(struct _TEXT_BUFFER_META_REC *meta)
|
static void meta_hash_create(struct _LINE_INFO_META_REC *meta)
|
||||||
{
|
{
|
||||||
if (meta->hash == NULL) {
|
if (meta->hash == NULL) {
|
||||||
meta->hash = g_hash_table_new_full(g_str_hash, (GEqualFunc) g_str_equal,
|
meta->hash = g_hash_table_new_full(g_str_hash, (GEqualFunc) g_str_equal,
|
||||||
@ -122,9 +122,9 @@ static void meta_hash_create(struct _TEXT_BUFFER_META_REC *meta)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static TEXT_BUFFER_META_REC *line_meta_create(GHashTable *meta_hash)
|
static LINE_INFO_META_REC *line_meta_create(GHashTable *meta_hash)
|
||||||
{
|
{
|
||||||
struct _TEXT_BUFFER_META_REC *meta;
|
struct _LINE_INFO_META_REC *meta;
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *val;
|
const char *val;
|
||||||
@ -132,7 +132,7 @@ static TEXT_BUFFER_META_REC *line_meta_create(GHashTable *meta_hash)
|
|||||||
if (meta_hash == NULL || g_hash_table_size(meta_hash) == 0)
|
if (meta_hash == NULL || g_hash_table_size(meta_hash) == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
meta = g_new0(struct _TEXT_BUFFER_META_REC, 1);
|
meta = g_new0(struct _LINE_INFO_META_REC, 1);
|
||||||
|
|
||||||
g_hash_table_iter_init(&iter, meta_hash);
|
g_hash_table_iter_init(&iter, meta_hash);
|
||||||
while (g_hash_table_iter_next(&iter, (gpointer *) &key, (gpointer *) &val)) {
|
while (g_hash_table_iter_next(&iter, (gpointer *) &key, (gpointer *) &val)) {
|
||||||
@ -362,7 +362,7 @@ char *textbuffer_line_get_text(TEXT_BUFFER_REC *buffer, LINE_REC *line, gboolean
|
|||||||
THEME_REC *theme;
|
THEME_REC *theme;
|
||||||
int formatnum;
|
int formatnum;
|
||||||
TEXT_BUFFER_FORMAT_REC *format_rec;
|
TEXT_BUFFER_FORMAT_REC *format_rec;
|
||||||
TEXT_BUFFER_META_REC *meta;
|
LINE_INFO_META_REC *meta;
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
curr = line;
|
curr = line;
|
||||||
|
@ -2,11 +2,7 @@
|
|||||||
#define IRSSI_FE_TEXT_TEXTBUFFER_FORMATS_H
|
#define IRSSI_FE_TEXT_TEXTBUFFER_FORMATS_H
|
||||||
|
|
||||||
#include <irssi/src/fe-text/textbuffer.h>
|
#include <irssi/src/fe-text/textbuffer.h>
|
||||||
|
#include <irssi/src/fe-common/core/formats.h>
|
||||||
typedef struct _TEXT_BUFFER_META_REC {
|
|
||||||
gint64 server_time;
|
|
||||||
GHashTable *hash;
|
|
||||||
} TEXT_BUFFER_META_REC;
|
|
||||||
|
|
||||||
typedef struct _TEXT_BUFFER_FORMAT_REC {
|
typedef struct _TEXT_BUFFER_FORMAT_REC {
|
||||||
char *module;
|
char *module;
|
||||||
@ -22,7 +18,7 @@ typedef struct _TEXT_BUFFER_FORMAT_REC {
|
|||||||
} TEXT_BUFFER_FORMAT_REC;
|
} TEXT_BUFFER_FORMAT_REC;
|
||||||
|
|
||||||
void textbuffer_format_rec_free(TEXT_BUFFER_FORMAT_REC *rec);
|
void textbuffer_format_rec_free(TEXT_BUFFER_FORMAT_REC *rec);
|
||||||
void textbuffer_meta_rec_free(TEXT_BUFFER_META_REC *rec);
|
void textbuffer_meta_rec_free(LINE_INFO_META_REC *rec);
|
||||||
char *textbuffer_line_get_text(TEXT_BUFFER_REC *buffer, LINE_REC *line, gboolean raw);
|
char *textbuffer_line_get_text(TEXT_BUFFER_REC *buffer, LINE_REC *line, gboolean raw);
|
||||||
void textbuffer_formats_init(void);
|
void textbuffer_formats_init(void);
|
||||||
void textbuffer_formats_deinit(void);
|
void textbuffer_formats_deinit(void);
|
||||||
|
@ -24,7 +24,7 @@ typedef struct {
|
|||||||
int level;
|
int level;
|
||||||
time_t time;
|
time_t time;
|
||||||
char *text;
|
char *text;
|
||||||
struct _TEXT_BUFFER_META_REC *meta;
|
struct _LINE_INFO_META_REC *meta;
|
||||||
struct _TEXT_BUFFER_FORMAT_REC *format;
|
struct _TEXT_BUFFER_FORMAT_REC *format;
|
||||||
} LINE_INFO_REC;
|
} LINE_INFO_REC;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ textbuffer_line_get_meta(line)
|
|||||||
PREINIT:
|
PREINIT:
|
||||||
HV *hv;
|
HV *hv;
|
||||||
LINE_REC *l;
|
LINE_REC *l;
|
||||||
TEXT_BUFFER_META_REC *m;
|
LINE_INFO_META_REC *m;
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
char *key;
|
char *key;
|
||||||
char *val;
|
char *val;
|
||||||
|
Loading…
Reference in New Issue
Block a user