ekg2
GIT master
|
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "stuff.h"
#include "themes.h"
#include "xmalloc.h"
#include "windows.h"
#include "userlist.h"
#include "debug.h"
#include "dynstuff_inline.h"
#include "queries.h"
Struktury danych | |
struct | format |
Definicje | |
#define | ROL(x) (((x>>25)&0x7f)|((x<<7)&0xffffff80)) |
#define | NPAR 16 /* ECMA-48 CSI have got max 16 params (NPAR) defined in <linux/console_struct.h> */ |
#define | FORE_COMMON(x) |
#define | FORE_COMMON_BOLD(x) |
#define | BACK_COMMON(x) |
Funkcje | |
static void | theme_cache_reset () |
static void | list_format_free (struct format *data) |
static void | formats_add (struct format **lista, struct format *new) |
static void | formats_destroy (struct format **lista) |
static int | gim_hash (const char *name) |
const char * | format_find (const char *name) |
static const char * | format_ansi (char ch) |
static void | format_ansi_append (string_t str, char ch) |
static char * | va_format_string (const char *format, va_list ap) |
fstring_t * | fstring_new (const char *str) |
fstring_t * | fstring_new_format (const char *format,...) |
void | fstring_free (fstring_t *str) |
char * | format_string (const char *format,...) |
static char * | split_line (char **ptr) |
static void | window_print (window_t *w, fstring_t *line) |
void | print_window_w (window_t *w, int activity, const char *theme,...) |
static fstring_t * | remote_format_string (const char *str, time_t ts) |
__attribute__ ((visibility("hidden"))) | |
static void | format_add_c (const char *name, const char *value, int remote) |
void | format_add (const char *name, const char *value, int replace) |
Zmienne | |
static char * | prompt_cache = NULL |
static char * | prompt2_cache = NULL |
static char * | error_cache = NULL |
static const char * | timestamp_cache = NULL |
static int | no_prompt_cache = 0 |
static int | no_prompt_cache_hash = 0x139dcbd6 |
static struct format * | formats [0x100] |
#define BACK_COMMON | ( | x | ) |
#define FORE_COMMON | ( | x | ) |
#define FORE_COMMON_BOLD | ( | x | ) |
#define NPAR 16 /* ECMA-48 CSI have got max 16 params (NPAR) defined in <linux/console_struct.h> */ |
#define ROL | ( | x | ) | (((x>>25)&0x7f)|((x<<7)&0xffffff80)) |
__attribute__ | ( | (visibility("hidden")) | ) |
void format_add | ( | const char * | name, |
const char * | value, | ||
int | replace | ||
) |
Add format with name and value.
If replace set to 1, than if format with the same name exists. than format value will be replaced.
name | - name of format |
value | - value of format |
replace | - if this format exists and is set to 1 than format value will be replaced with new one. else do nothing. |
|
static |
|
static |
|
static |
const char* format_find | ( | const char * | name | ) |
char* format_string | ( | const char * | format, |
... | |||
) |
|
static |
void fstring_free | ( | fstring_t * | str | ) |
Free memory allocated by str
str | - fstring_t * to free. |
fstring_t* fstring_new | ( | const char * | str | ) |
Change formatted ansi string (str) to Nowy-i-Lepszy (tm) [New-and-Better].
str | - string |
fstring_t* fstring_new_format | ( | const char * | format, |
... | |||
) |
char *tmp = format_string("format", .....); fstr = fstring_new(tmp); xfree(tmp);
|
static |
|
static |
void print_window_w | ( | window_t * | w, |
int | activity, | ||
const char * | theme, | ||
... | |||
) |
Like print_window() but it takes window_t struct instead of target+session.
print_window_c(window_find_ptr(w), separate, theme, ...)
And in worst case text will be displayed in (__status / or __current) window instead of a usual one.. But ekg2 won't crash.w | - window to display, if NULL than __status or __current will be used. it depends on: config_default_status_window and config_display_crap variables. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |