#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 |
| #define | FORE_COMMON(x) |
| #define | FORE_COMMON_BOLD(x) |
| #define | BACK_COMMON(x) |
Funkcje | |
| static void | theme_cache_reset () |
| static | LIST_FREE_ITEM (list_format_free, struct format *) |
| DYNSTUFF_LIST_DECLARE (formats, struct format, list_format_free, static __DYNSTUFF_ADD_BEGINNING, __DYNSTUFF_NOREMOVE, static __DYNSTUFF_DESTROY) 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) |
| EXPORTNOT void | remote_print_window (int id, time_t ts, char *data) |
| static void | format_add_c (const char *name, const char *value, int remote) |
| void | format_add (const char *name, const char *value, int replace) |
| EXPORTNOT void | remote_format_add (const char *name, const char *value) |
| EXPORTNOT void | theme_free () |
| EXPORTNOT void | theme_init () |
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 | ) |
attr &= ~(FSTR_NORMAL+FSTR_BACKMASK); \ attr |= x << 3; \ break;
| #define FORE_COMMON | ( | x | ) |
attr &= (FSTR_BACKMASK); \
attr &= ~(FSTR_NORMAL+FSTR_FOREMASK); \
attr |= x; \
isbold = 0; \
break;
| #define FORE_COMMON_BOLD | ( | x | ) |
attr &= ~(FSTR_NORMAL+FSTR_FOREMASK); \ attr |= x; \ attr |= FSTR_BOLD; \ isbold = 1; \ break;
| #define NPAR 16 |
| #define ROL | ( | x | ) | (((x>>25)&0x7f)|((x<<7)&0xffffff80)) |
| DYNSTUFF_LIST_DECLARE | ( | formats | , | |
| struct format | , | |||
| list_format_free | , | |||
| static | __DYNSTUFF_ADD_BEGINNING, | |||
| __DYNSTUFF_NOREMOVE | , | |||
| static | __DYNSTUFF_DESTROY | |||
| ) | const |
| 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 void format_add_c | ( | const char * | name, | |
| const char * | value, | |||
| int | remote | |||
| ) | [static] |
| static const char* format_ansi | ( | char | ch | ) | [static] |
| static void format_ansi_append | ( | string_t | str, | |
| char | ch | |||
| ) | [static] |
| const char* format_find | ( | const char * | name | ) |
| char* format_string | ( | const char * | format, | |
| ... | ||||
| ) |
| 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 LIST_FREE_ITEM | ( | list_format_free | , | |
| struct format * | ||||
| ) | [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. |
| EXPORTNOT void remote_format_add | ( | const char * | name, | |
| const char * | value | |||
| ) |
| static fstring_t* remote_format_string | ( | const char * | str, | |
| time_t | ts | |||
| ) | [static] |
| EXPORTNOT void remote_print_window | ( | int | id, | |
| time_t | ts, | |||
| char * | data | |||
| ) |
| static char* split_line | ( | char ** | ptr | ) | [static] |
| static void theme_cache_reset | ( | ) | [static] |
| EXPORTNOT void theme_free | ( | ) |
| EXPORTNOT void theme_init | ( | ) |
| static char* va_format_string | ( | const char * | format, | |
| va_list | ap | |||
| ) | [static] |
char * error_cache = NULL [static] |
int no_prompt_cache = 0 [static] |
int no_prompt_cache_hash = 0x139dcbd6 [static] |
char * prompt2_cache = NULL [static] |
char* prompt_cache = NULL [static] |
const char* timestamp_cache = NULL [static] |
1.7.1